Page 1 of 1 1
Topic Options
#133338 - 2005-02-03 08:55 PM Shortcut to URL to user's Desktop
PrinterQueen Offline
Lurker

Registered: 2005-02-03
Posts: 1
All Windows 2000 SP4
I have a kix script that is working fine when I am copying .lnk (shortcuts) to user's desktops. Now I need a shortcut to a URL site. So I right click on destop create new shortcut, put in the address, assigned it an icon. It is in the \netlogon folder on the DC. Then in the kix script I wrote this. I tried saftey.lnk and safety.url. Is it a lnk file that is created or an URL? Anyway neither will work. Can anyone point out what I am doing wrong.
Code:
 :SAFETY
if ingroup ("TX-Safety-Smart-Online")
$desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\Server-pdc\netlogon\shortcuts\safety.lnk" $desktop
endif


Top
#133339 - 2005-02-03 10:39 PM Re: Shortcut to URL to user's Desktop
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
You might probably want to use wshShortcut() function.
Try the second one wich supports URL shortcuts.
You need Windows Scripting Host (ActiveX Control) installed.
This UDF is wonderfull.

If you have never used UDF´s go here.
_________________________
Life is fine.

Top
#133340 - 2005-02-03 10:44 PM Re: Shortcut to URL to user's Desktop
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Ahh by the way......welcome.
_________________________
Life is fine.

Top
#133341 - 2005-02-03 10:54 PM Re: Shortcut to URL to user's Desktop
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Maybe give a little jump start

Just like the examples in the UDF comments say this....

Code:

Call @SCRIPTDIR + "\functions\wshshortcut.udf"
$=wshShortcut("KiXtart Web Page","http://www.kixtart.org")



...does the trick. No copy, just cerate a shortcut on the users desktop.

This...

Code:

del "c:\documents and settings\" + @USERID + "\desktop\kixtart web page.url"


...will remove the shortcut.


By this example you can see it is a .url file that is created. Only files are .lnk, webpages are .url.


Edited by R2D2 (2005-02-03 10:56 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#133342 - 2005-02-07 09:33 PM Re: Shortcut to URL to user's Desktop
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Could you work it out with R2D2 sample PrinterQueen ?
Shout it out if you coudnt.
_________________________
Life is fine.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.055 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org