How to determine an icon's Index number
I'm creating a Group Policy Preference shortcut item. I want the shortcut to have this icon found in %SystemRoot%\system32\SHELL32.dll
:
The GPP's New Shortcut dialog box won't let me browse through the available icons in my file. Instead it's asking for the Icon index:
How do I find my icon's Icon Index?
How to determine an icon's Index number
Use IconsExtract from NirSoft:
The IconsExtract utility scans the files and folders on your computer, and extract the icons and cursors stored in EXE, DLL, OCX, CPL, and in other file types. You can save the extracted icons to ICO files (or CUR files for cursors), or copy the image of a single icon into the clipboard.
The results show the icon's index number next to the file name in the output.
Source IconsExtract
Disclaimer
I am not affiliated with IconsExtract in any way, I am just an end user of the software.
The Group Policy Preference's New Shortcut properties dialog actually does let you open the icon file (assuming it's accessible to the computer where you are configuring the preference!):
- Click the icon to the right of the Icon file path textbox
- Open your target icon file
- Select the desired icon
- The Icon index value will be populated with the correct index number