Microsoft® Windows® Script Host Save Method |
WSH Reference Version 1 |
Saves a shortcut to the specified location.
object.Save
Part Description object WshShortcut or WshUrlShortcut object.
The following examples create 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.SaveSet oUrlLink = WshShell.CreateShortcut("Microsoft Web Site.URL") oUrlLink.TargetPath = "http://www.microsoft.com" oUrlLink.Save