Pages

Showing posts with label set working directory for shortcut vbscript. Show all posts
Showing posts with label set working directory for shortcut vbscript. Show all posts

Monday 29 August 2011

Set Working Directory to Shortcut Using VBScript

Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.Createshortcut("C:\Documents and Settings\All Users\Start Menu\Programs\ShortcutName.lnk")
objShtCut.WorkingDirectory = "C:\PROGRA~1\MKSTOO~1\Demonstrations\bin"
objShtCut.Save
'WScript.Echo objShtCut.WorkingDirectory