![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br>
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||
|
Guest
Posts: n/a
|
The shortcut works fine, but I can't seem to get it to use the
favorite icon. $wsh = new-object -com "WScript.Shell" $FileName = "C:\Documents and Settings\xxx\Desktop\CNN.lnk" $shortcut = $wsh.CreateShortcut($FileName) $shortcut.IconLocation = "http://www.cnn.com/favicon.ico" $shortcut.TargetPath = "http://www.cnn.com" $shortcut.Save() What am I missing? __________________ Note: To reply, replace the word 'spam' embedded in return address with 'mail'. |
||
|
|
|
|
|
|
#2 | ||||||||||||||
|
Guest
Posts: n/a
|
As far as I remember .LNK files generally do not support IconLocation beeing
specified as an URL. Internet Shortcut files (.URL) do. $isc= @' [InternetShortcut] URL=http://www.cnn.com/ IconFile=http://www.cnn.com/favicon.ico IconIndex=1 '@ sc "$($env:userprofile)\Desktop\CNN.url" $isc -- Gerd "Barry S." wrote:
|
||||||||||||||
|
|||||||||||||||
|
|
#3 | ||||||||||||||||||||||||||
|
Guest
Posts: n/a
|
The IconIndex=1 is nonsense of course, it's a leftover from my sample file.
-- Gerd "Gerd Schneider" wrote:
|
||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|
|
|