We help IT Professionals succeed at work.

Logon Script to Create Shortcuts

1,070 Views
Last Modified: 2009-04-15
I know that there is a way of Adding Shortcuts to Programs and Folders on a Users Desktop using a logon script, but i don`t know how.

Can anyone help?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
First you need to do is copy shortcut from you desktop and put them in a new folder (Everyone can access to this folder).
Example: H:\install\desktopicons\

In H:\install\desktopicons\ create a cmd file with notepad call desktopicons.cmd.  
The desktopicons.cmd script will be this:
copy H:\install\desktopicons\*.lnk "%USERPROFILE%\desktop"

In your login script add this to your last line:
call H:\install\desktopicons\desktopicons.cmd

When user login, login script will open desktopicons.cmd. desktopicons.cmd will copy shortcuts to  user's desktop.
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
You could also use the All Users profile so that every user who logs on will have them.... unless you only want it for specific users.

Author

Commented:
well, what i really want is for domain administrators to have shortcuts to cetain tools that i have and for standard domain users to have no access at all, and to not see the shortcuts.
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
Use entcee's method then, only make it accessible just to admins.

Author

Commented:
buy making it accessible just to admins, does that mean the permissions on shared folder on the server that contains the shortcuts?
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
Correct. But you will also only want the admins to run the script or else you will be getting errors.

Do you need help in assigning the script just to the admins?

Author

Commented:
yes please
Senior Network Consultant / Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
great, thanks alot
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
No problem. Let me know how it works out or if you have any other questions.

Author

Commented:
all of my administrators are in one OU. What would happen if i put a user in that OU, and then decided that i no longer wanted them to be an administrator, so i moved them from that OU, would they still get the shortcuts?

Also i have GPMC installed, how do i change it so that only admins have permission to "Apply Group Policy"?

Author

Commented:
Also, my user profiles are stored on the server, do i need to change the script in any way?
 
copy H:\install\desktopicons\*.lnk "%USERPROFILE%\desktop"

also if i have another script for standard users, is read-only permission on the shortcut folder sufficient? otherwise they might find it on the server and add their own shortcuts or delete.

Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
"would they still get the shortcuts?"
Well, yes, but not because the script is still running. They would have the shortcuts because they were copied to the profile previously. Maybe we could write a logoff script that would delete the shortcuts?


"Also i have GPMC installed, how do i change it so that only admins have permission to "Apply Group Policy"?"
Excellent. GPMC makes things easy. All you have to do is remove the Authenticated Users from the Security Filtering section and add the admins group.


"Also, my user profiles are stored on the server, do i need to change the script in any way?"
No, that shouldn't affect it.


"read-only permission on the shortcut folder sufficient? "
Yes.


Now about your script; do all the admins have an H: drive mapped? The "H:\" was just an example. You can use a UNC path just fine (e.g. \\server\share\*.lnk)

Author

Commented:
a UNC Path would be best.

Also how can i get a logoff script to delete them then? would this be the best solution?

thanks for your help, you are great.
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
For a logoff script you will need to be very specific. (because you don't want to delete all the shortcuts)
Something like:

del %USERPROFILE%\desktop\ServerCP.lnk
del %USERPROFILE%\desktop\disk_management.lnk
del "%USERPROFILE%\desktop\Admin Website.lnk"
etc.

Notice that if there's a space you'll need to enclose it in double quotes ["]
Also note that --> *.lnk <-- will only copy shortcuts. So if you have other things than shortcuts you want to put on the desktop then you'll need to either add a copy line for that or you can copy everything by using --> *.* <--

Author

Commented:
thanks very much for your help. i am going to try on monday.
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
OK. Let us know how it goes.

Author

Commented:
HI,

CAN YOU PLEASE HAVE A LOOK AT ANOTHER QUESTION FOR ME AND SEE IF YOU HAVE A SOLUTION PLEASE?

IT IS HERE:
https://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_22861383.html

FROM ANDREW
Jeremy WeisingerSenior Network Consultant / Engineer
CERTIFIED EXPERT

Commented:
Sorry Andrew, but I'm very limited in my knowledge of custom adm files. The major problem I see is that there's no way that I know of to remove a key with the template.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.