WSH » WshShortcut » WorkingDirectory

Syntax:
object.WorkingDirectory

The WorkingDirectory property sets or retrieves the default working directory for the application pointed to by the shortcut. All relative paths specified in file operations are taken as being relative to the working directory.

Examples

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut _
    ("C:\Documents And Settings\DevGuru\Desktop\Shortcut to Test.vbs.lnk")
objShtCut.WorkingDirectory = "C:\temp"
objShtCut.Save
WScript.Echo objShtCut.WorkingDirectory
Output:
C:\Temp
Explanation:

This VBScript code sets the working directory of the shortcut "Shortcut To Test.vbs.lnk" to "C:\Temp".

Language(s): VBScript