Microsoft® Windows® Script Host WorkingDirectory Property |
WSH Reference Version 1 |
Provides the working directory of a shortcut object.
object.WorkingDirectory = strWorkingDirectory
Part Description object WshShortcut object. strWorkingDirectory Directory in which the shortcut will start.
The following example creates a shortcut to Microsoft Notepad:
Set WshShell = WScript.CreateObject("WScript.Shell") Set oShellLink = WshShell.CreateShortcut("Notepad.lnk") oShellLink.TargetPath = "notepad.exe" oShellLink.WorkingDirectory = "c:\" oShellLink.Save