Microsoft® Windows® Script Host IconLocation Property |
WSH Reference Version 1 |
Provides the icon location of a shortcut object.
object.IconLocation = strIconLocation
Part Description object WshShortcut object. strIconLocation Location and index of the icon. The format of the icon location should be "Path, index".
The following example creates a shortcut to the currently executing script:Set WshShell = WScript.CreateObject("WScript.Shell") Set oShellLink = WshShell.CreateShortcut("Current Script.lnk") oShellLink.TargetPath = WScript.ScriptFullName oShellLink.IconLocation = "notepad.exe, 0" oShellLink.Save