Creating a lnk in VBS
问题 I get an error that on line 6, the one with lnk.TargetPath, that the argument is invalid. I am hoping to make a link to this program under the start menu on the desktop. Anybody know why it is doing this? Set objShell = WScript.CreateObject("WScript.Shell") Set lnk = objShell.CreateShortcut("C:\Users\%USERDATA%\Desktop\Shutdown.LNK") Dim strUserProfile strUserProfile = objShell.ExpandEnvironmentStrings("%USERPROFILE%") lnk.TargetPath = "C:\Users\" & strUserProfile & "\AppData\Roaming