Link to home
Start Free TrialLog in
Avatar of andrewjones1987
andrewjones1987

asked on

Logon Script to Create Shortcuts

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?
Avatar of entcee
entcee
Flag of United States of America image

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.
Avatar of Jeremy Weisinger
Jeremy Weisinger

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.
Avatar of andrewjones1987

ASKER

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.
Use entcee's method then, only make it accessible just to admins.
buy making it accessible just to admins, does that mean the permissions on shared folder on the server that contains the shortcuts?
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?
yes please
ASKER CERTIFIED SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
great, thanks alot
No problem. Let me know how it works out or if you have any other questions.
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"?
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.

"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)
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.
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 --> *.* <--
thanks very much for your help. i am going to try on monday.
OK. Let us know how it goes.
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/questions/22861383/adm-Template-Question.html

FROM ANDREW
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.