warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\inetpub\Websites\DevGuru\www\includes\common.inc(1762) : eval()'d code on line 1.

WSH » WshShortcut » IconLocation

Syntax:
object.IconLocation

IconLocation is a String property that sets or retrieves the location of the icon used to represent the shortcut. The string is of the form "path,index", where path is the full path to the file containing the icon, and index is the zero-based index of the icon within the specified icon file.

Specifying an invalid value for this property will not cause an error. However, the icon that will be displayed for the shortcut may be changed. Setting this property to the empty string restores the shortcut's default icon.

Examples

Code:
objShell = WScript.CreateObject("WScript.Shell")
objShtCut = objShell.CreateShortcut
    ("C:\\Documents And Settings\\DevGuru\\Desktop\\Shortcut To Test.vbs.lnk") objShtCut.IconLocation = "C:\\winnt\\system32\\shell32.dll,3"
objShtCut.Save()
WScript.Echo(objShtCut.IconLocation)
Output:
C:\WINNT\system32\shell32.dll,3
Explanation:

This JScript code sets the icon for a shortcut called "Shortcut to Test.vbs.lnk" to the 4th icon (since the icons are zero-indexed) in the shell32.dll file.

Language(s): JavaScript