Page 1 of 1 1
Topic Options
#33219 - 2002-11-22 11:39 AM shortcut on user desktop..HELP!
davley2 Offline
Fresh Scripter

Registered: 2002-11-21
Posts: 5
I am using the following piece of script to try and copy an icon to everyone's desktop. The drive is mapped ok, but the icon is not copied. Why isn't it working? Help!

$desktop = READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
IF INGROUP("test")=1
USE K: /DEL
USE K: "\\FILE_SRV\overdrive"
COPY "k:\MEDAX.lNK" $desktop
ENDIF

Top
#33220 - 2002-11-22 11:49 AM Re: shortcut on user desktop..HELP!
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hmmm ...

works ok for me !

is it during logon ? Then HKEY_CURRENT_USER could be the issue as it will most likely not accessible to logon scripts

Try to add in :

code:
$desktop ? ; displays path on console
get $ ; pauses script

_________________________



Top
#33221 - 2002-11-22 11:51 AM Re: shortcut on user desktop..HELP!
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ah yes,

and prepare for being hit by some 'Do not cross-post' replies [Big Grin]
_________________________



Top
#33222 - 2002-11-22 03:46 PM Re: shortcut on user desktop..HELP!
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Please check out the FAQ forum as this is discussed in Copy a shortcut to the Desktop, Start Menu, etc. .

Also, since this shortcut is supposed to be availabe for all users, the appropriate place would rathger be the 'All Users' desktop since the user won't be able to delete the shortcut.

Finally, the COPY command supports UNC filename, thus the USE staement will not be necessary.

you can use
code:
? 'Error '+@ERROR+' - '+@SERROR

to display potential error messages.
_________________________
There are two types of vessels, submarines and targets.

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
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.05 seconds in which 0.023 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