Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desktop Shortcut Change

Status
Not open for further replies.

pickletech

IS-IT--Management
Dec 20, 2004
88
US
Hello everyone, I need some help please. I need to copy a desktop shortcut to all my user's desktops. I didn't think this would be very hard to do, but I can't seem to find a way to get the path to their desktop remotely. Does anybody know how to do this, or even just read registry settings remotely? All your help is appreciated. I know I could put it in a login script, but my user's wouldn't logoff/login if i tell them too, and I would have to do it manually anyway.
 
>but my user's wouldn't logoff/login if i tell them too
Why do they have to to make a shortcut on their desktop?
 
I would create a vbscript to create the desktop shortcut and place it on a share everyone can access.
Then send an email to everybody with the link to the vbscript and the explanation that if they want to have the shortcut they have to click the link...

sample code of the script:
Code:
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
'DesktopPath = Shell.SpecialFolders("AllUsersDesktop")
Set link = Shell.CreateShortcut(DesktopPath & "\Shortcut.lnk")
link.Arguments = ""
link.Description = "New Shortcut"
link.HotKey = "CTRL+SHIFT+S"
link.IconLocation = ",0"
link.TargetPath = "\\server\share\file"
link.WindowStyle = 1
link.WorkingDirectory = "\\server\share\"
link.Save
set link = Nothing
set shell = Nothing

Please tell me if I'm wrong I like to learn from my mistakes...
_____________________________________
Feed a man a fish and feed him for a day.
Teach a man to fish and feed him for a lifetime...
 
tsuji, the shortcut is for a terminal emulation program that we use to access our OpenVMS VAX. We are changing our subnet, so we have to change the 'session' (the shortcut) they use to access it. Actually, I guess I kind of lied, and its not really a shortcut, but a session file.

K0b3, that would be a good idea, but I am trying to make this as invisible to the user as possible.

All, I did think of a solution and went about this kind of a different way than originally planned. Instead I am just accessing everyone's administrative share (c$) and assuming everyone's desktop is in "c:\documents and settings\username\desktop\". The script goes through every folder in "documents and settings" i.e. each users folder, then searches their desktop folder for the old shortcut and deletes it. It then places the new one in the "all users" desktop folder. I am just about done, and will post it when I'm done if anyone is interested.
 
pickletech,
I just meant they don't have to logout-logbackin to make the shortcut appear. If it is done with login script, it would appear all right. I was not questioning why it needs be made, only why the cycle logoff-login. But, I did not help.
regards - tsuji
 
tsuji,
Oh, many of my users don't log off every night. If I ran it in a login script I would have to tell them to log off and log in for it to take affect, and most of the time they never read my e-mails i send them about stuff i am doing, so I would have to answer a lot of calls.
Thanks though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top