Microsoft® Windows® Script Host TargetPath Property |
WSH Reference Version 1 |
Sets the path to a shortcut object's executable file.
object.TargetPath
Part Description object WshShortcut or WshUrlShortcut object.
The following example creates a shortcut to the currently executing script and a URLshortcut to www.microsoft.com:Set WshShell = WScript.CreateObject("WScript.Shell") Set oShellLink = WshShell.CreateShortcut("Current Script.lnk") oShellLink.TargetPath = WScript.ScriptFullName oShellLink.Save Set oUrlLink = WshShell.CreateShortcut("Microsoft Web Site.URL") oUrlLink.TargetPath = "http://www.microsoft.com" oUrlLink.Save