Microsoft® Windows® Script Host
WorkingDirectory Property
WSH Reference
Version 1

Applies To


Description
Provides the working directory of a shortcut object.
Syntax
object.WorkingDirectory = strWorkingDirectory
Parameters
Part Description
object WshShortcut object.
strWorkingDirectory Directory in which the shortcut will start.
Example
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