Hi , I need change the icon of a ShortCut via Vbs on login Scripts.

Ex: This is the Script than i use to create the ShortCuts


Set objShortcut = objShell.CreateShortcut(DesktopPath & "\" & CompanyName &
" New Corporate Website.url")
objShortcut.TargetPath = "ht*p://xxxxxx/"
objShortcut.Save

Re: Change Shortcut icon via Vbs by mr_unreliable

mr_unreliable
Tue Jul 11 15:59:01 CDT 2006

hi Ariel,

What many people miss when reading the documentation is that
"CreateShortcut" can be used to both create a new shortcut
or to load an existing shortcut.

In your case, use createshortcut, and give it a path to
your existing shortcut that you wish to edit. vbs will
then load your shortcut into memory.

Then use:

objShortCut.IconLocation = "notepad.exe, 0"

where you would obviously substitute your icon path in place
of "notepad.exe, 0"

Then save it again.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)





Ariel Correa wrote:
> Hi , I need change the icon of a ShortCut via Vbs on login Scripts.
>
> Ex: This is the Script than i use to create the ShortCuts
>
>
> Set objShortcut = objShell.CreateShortcut(DesktopPath & "\" & CompanyName &
> " New Corporate Website.url")
> objShortcut.TargetPath = "ht*p://xxxxxx/"
> objShortcut.Save
>
>