Hi
If you create a shortcut to an .msc file, such as (but not limited to) [tt]%windir%\system32\ipaddrmgmt.msc[/tt] the shortcut will have an appropriate icon. As I'm creating other shortcuts which run a script which then calls .msc file I wanted these shortcuts to have the same icon as the original .msc file.
So, I cobbled together this little script:
This script works with other shortcuts but not the .msc shortcuts I've been trying to find the icons for.
Other examples of non-cooperative .msc file shortcuts are
[tt]diskmgmt.msc
secpol.msc
pkmgmt.msc
rsadmin.msc
rsop.msc
schmmgmt.msc[/tt]
Does anyone know why these shortcuts don't return the icon being used?
Or how I can find out which icon is being used (currently I'm trawling through HUNDREDS of icons using IconSearch which comes with Easy Icon Maker)?
JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]
If you create a shortcut to an .msc file, such as (but not limited to) [tt]%windir%\system32\ipaddrmgmt.msc[/tt] the shortcut will have an appropriate icon. As I'm creating other shortcuts which run a script which then calls .msc file I wanted these shortcuts to have the same icon as the original .msc file.
So, I cobbled together this little script:
Code:
Set vArgs = WScript.Arguments
file = vArgs(0)
Set Shell = CreateObject("WScript.Shell")
Set link = Shell.CreateShortcut(file)
wscript.echo file & ",""" & link.IconLocation & """"
set link=nothing
This script works with other shortcuts but not the .msc shortcuts I've been trying to find the icons for.
Other examples of non-cooperative .msc file shortcuts are
[tt]diskmgmt.msc
secpol.msc
pkmgmt.msc
rsadmin.msc
rsop.msc
schmmgmt.msc[/tt]
Does anyone know why these shortcuts don't return the icon being used?
Or how I can find out which icon is being used (currently I'm trawling through HUNDREDS of icons using IconSearch which comes with Easy Icon Maker)?
JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]