Microsoft® Windows® Script Host
Save Method
WSH Reference
Version 1

Applies To


Description
Saves a shortcut to the specified location.
Syntax
object.Save
Parameters
Part Description
object WshShortcut or WshUrlShortcut object.
Example
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.Save

Set oUrlLink = WshShell.CreateShortcut("Microsoft Web Site.URL") oUrlLink.TargetPath = "http://www.microsoft.com" oUrlLink.Save