![]() Optional sections in the VBscript below are commented out: Set objWS = WScript.CreateObject("WScript.Shell") If shortcut.exe fails to create a new shortcut, it does NOT set an errorlevel.Įxample SHORTCUT -f -t C:\MyApp.exe -n %userprofile%"\start menu\programs\MY APP\MY APP"Īn alternative, is to use VBScript, call the VB script with cscript like so: l logfile : Save any error messages in the specified file The same option can be specified more than once e.g. Of 'natdix' specify the options to be exported 'all' is the same as 'natdix' but the letters u : ECHO the contents of an existing shortcut. s : Make shortcut simple (don’t use LinkResolve) f : Force overwrite of an existing short cut. n name : The path and file name (.LNK) of the shortcut file. Options for the shortcut file to be created d directory : The folder to start the application in. a arguments : The arguments passed when the shortcut is used. t target : The path and file name of the application/document to open. Originally in the NT4 Server Resource Kit, this utility fails under Windows 10.Ī good free alternative is shortcut.exe from.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |