Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1035
  • Last Modified:

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?
0
andrewjones1987
Asked:
andrewjones1987
  • 9
  • 9
1 Solution
 
entceeCommented:
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.
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
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.
0
 
andrewjones1987Author 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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
Use entcee's method then, only make it accessible just to admins.
0
 
andrewjones1987Author Commented:
buy making it accessible just to admins, does that mean the permissions on shared folder on the server that contains the shortcuts?
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
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?
0
 
andrewjones1987Author Commented:
yes please
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
OK, there are a few options.

If you only have a few admin then the easiest would be to go to each admin's user properties in ADUC, click on the Profile tab and fill in the name of the script i the Logon Script field. Then place the script in the NETLOGON share on a DC.

If you have more admins then assigning it via Group Policy is the way to go.

If all the admins are in an OU by themselves then:
create and link a GPO to the OU. Add the logon script to the User Configuration\Windows Settings\Scripts

If all the admins are not in an OU by themselves then:
do the same as above only make sure the the GPO will affect all the admins if they're in different OUs (link it to the domain if necessary).
While you have the GPO open in the gpo editor, right-click the GPO's name (the top of the tree) and select Properties > Security tab and change it so that only admins have permission to "Apply Group Policy".
(this usually means unchecking Apply Group Policy for Authenticated Users and adding any group(s) necessary and checking Apply Group Policy for them)


HTH
0
 
andrewjones1987Author Commented:
great, thanks alot
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
No problem. Let me know how it works out or if you have any other questions.
0
 
andrewjones1987Author 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"?
0
 
andrewjones1987Author 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.

0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
"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)
0
 
andrewjones1987Author 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.
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
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 --> *.* <--
0
 
andrewjones1987Author Commented:
thanks very much for your help. i am going to try on monday.
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
OK. Let us know how it goes.
0
 
andrewjones1987Author Commented:
HI,

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

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

FROM ANDREW
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 9
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now