#122791 - 2004-07-13 02:26 PM
Associating icons with desktop shortcuts
|
rhipkin
Lurker
Registered: 2004-07-13
Posts: 2
Loc: South Africa
|
Good day,
You will have to excuse me I am completely new to scripting and I have been assigned a task to place an Intranet shortcut on all users desktops, this I have managed to do due to the fact the previous IT chap had already written that part of the script. The thing is I now need to associate the specifically create icon to that shortcut(as it is the default windows icon), this is the script written to place the shortcut on the desktop:
Select Case @INWIN = 1 Copy "\\" + $Logonsvr + "\NETLOGON\RDSInt~1.URL" %SystemDrive% + "\DOCUME~1\ALLUSE~1\DESKTOP" Case @INWIN = 2 Copy "\\" + $Logonsvr + "\NETLOGON\RDSInt~1.URL" %WinBootDir% + "\DESKTOP" EndSelect
Select Case @INWIN = 1 Copy "\\" + $Logonsvr + "\NETLOGON\RDSInt~1.URL" %SystemDrive% + "\DOCUME~1\ALLUSE~1\Startm~1\Programs\startup" Case @INWIN = 2 Copy "\\" + $Logonsvr + "\NETLOGON\RDSInt~1.URL" %WinBootDir% + "\Windows\Alluse~1\Startm~1\Programs\Startup"
EndSelect
How can I go about associating an icon with the shortcuts?
|
|
Top
|
|
|
|
#122793 - 2004-07-13 02:37 PM
Re: Associating icons with desktop shortcuts
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Quote:
so, what you should do, is edit the original server side shortcut to have the correct icon.
This may mean copying the .ico file to the local PC as well.
|
|
Top
|
|
|
|
#122795 - 2004-07-13 02:44 PM
Re: Associating icons with desktop shortcuts
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I still don't see why you need to copy the Icon to the desktop for a web .URL file.
Code:
IF NOT EXIST($desktop+'\website.url') $rc=writeprofilestring($desktop+'\website.url','InternetShortcut','http://yoursite.com') ELSE IF READPROFILESTRING($desktop+'\website.url','InternetShortcut')<>http://yoursite.com' $rc=writeprofilestring($desktop+'\website.url','InternetShortcut','http://yoursite.com') ENDIF ENDIF
Thanks,
Kent
|
|
Top
|
|
|
|
#122797 - 2004-07-13 02:53 PM
Re: Associating icons with desktop shortcuts
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Quote:
I still don't see why you need to copy the Icon to the desktop for a web .URL file.
You don't necessarily have to, but it works better if the user is offline. Seems like some URLs hold their icon better if the .ico is local as well.
|
|
Top
|
|
|
|
#122798 - 2004-07-13 02:58 PM
Re: Associating icons with desktop shortcuts
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Then WSHSHORTCUT() UDF would be helpful.
Kent
|
|
Top
|
|
|
|
#122800 - 2004-07-13 03:07 PM
Re: Associating icons with desktop shortcuts
|
rhipkin
Lurker
Registered: 2004-07-13
Posts: 2
Loc: South Africa
|
I thank you all for the quick response...wow! I have copied the icon to the local machines via login script as well, as well as associating the server url shortcut with the icon, but the shortcut is placed minus the icon. Guess I will just keep on trying
|
|
Top
|
|
|
|
#122801 - 2004-07-13 03:14 PM
Re: Associating icons with desktop shortcuts
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
IF NOT EXIST($desktop+'\website.url')
$=writeprofilestring($desktop+'\website.url','InternetShortcut','URL','http://www.kixtart.org/')
$=writeprofilestring($desktop+'\website.url','InternetShortcut','IconFile','%windir%\website.ico')
$=writeprofilestring($desktop+'\website.url','InternetShortcut','IconIndex','0')
endif
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|