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

Applies To


Description
Provides the icon location of a shortcut object.
Syntax
object.IconLocation = strIconLocation
Parameters
Part Description
object WshShortcut object.
strIconLocation Location and index of the icon. The format of the icon location should be "Path, index".
Example
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