Solved

Add desktop shortcut using GPO or login script in Windows 7

Posted on 2010-11-09
11
1,874 Views
Last Modified: 2012-09-04
Hi,

I've been using a simple batch file to add shortcuts to all my domain users desktop in Windows XP. The file looks like this:

"if not exist "%USERPROFILE%\Skrivebord\Fjernbetjening.url" copy "\\servername\NETLOGON\Genveje\Fjernbetjening.url" "%USERPROFILE%\Skrivebord\""

Skrivebord is the Danish word for desktop. However this is not working on Windows 7. At first I was running it from the login script but I've also tried running it via GPO and none of them works. Can the shortcuts be added using a batch file or will it have to be a VB script?

Thanks in advance,
Ronnie
0
Comment
Question by:ronnie13
  • 6
  • 4
11 Comments
 
LVL 4

Expert Comment

by:tausifsfarid
ID: 34101087
0
 
LVL 3

Accepted Solution

by:
eviljester earned 500 total points
ID: 34101243
Hi ,
Are you running Server 2003/2008 or R2?
gposhortcuts.jpg
0
 

Author Comment

by:ronnie13
ID: 34101378
Hi,

there are Server 2003, 2008 and 2008 R2 in my domain.
0
 
LVL 3

Expert Comment

by:eviljester
ID: 34107319
Well if any of your DC's are server 2008/R2, then you can use Group Policy to Propergate your shortcuts, as shown in the image of my last post.
0
 

Author Comment

by:ronnie13
ID: 34109568
Excellent. I'll try that.

Another thing is that some shortcuts should be placed on all users dekstop while others shlould only be added based on membership of a specific group in AD. Can that be managed as well?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Expert Comment

by:eviljester
ID: 34114166
Sure, under the common tab  shown above, you'll find item level targeting. Where you can set a vast amount of criteria or none....
0
 
LVL 3

Expert Comment

by:eviljester
ID: 34116659
Just thought I'd add an image, the filters for targeting should cover you for an scenario. item level targeting
0
 

Author Comment

by:ronnie13
ID: 34119668
Hi,

that would be a good solution but I did it by linking the GPO to the two OU's containig my users which worked as well.    
GPO.jpg
0
 
LVL 3

Expert Comment

by:eviljester
ID: 34119745
Fair enough, I just used item level targeting because I just wanted one policy for mapping drives e-z, and each drive has it's own security permissions. So one policy vs twenty two...
0
 

Author Comment

by:ronnie13
ID: 34247796
Hi eviljester,

can you tell me how you create one policy and have this mapping all the drives?
0
 
LVL 3

Expert Comment

by:eviljester
ID: 34251734
Hi Ronnie13

As above, this applies to Server 2008 or 2008R2...

Setup a GPO with the computer configuration settings disabled (under 'details' tab). Edit the GPO, and go to 'user configuration, preferences, windows settings, drive maps' Setup policies to map each individual drive, with 'Replace' as the action, 'reconnect' selected under the 'general' tab. Under the 'common' tab, Select 'run in logged-on user's security context', 'remove this item when it is no longer applied', and 'item-level targeting', then click on the 'targeting' button, select 'new item' and specify the criteria for mapping that drive.

Each of my drive mappings is targeting a different security group, I use 'security group' (under 'new item') so that only users of that group have that drive mapped, when they are removed from that group, so is the drive mapping.

I have the policy sitting in the root of the domain so that it is applied no matter where they login, you can be more specific if you wish.

Also I have the security filtering of the GPO set to 'domain users', so that all domain users process the policy, but only users belonging the to the applicable security groups, get the applicable drives mapped.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
romain user profiles for windows users 22 62
prezi for presentation 2 45
command prompt wont close after executing batch file 11 37
Get SMB version on Windows 7 3 15
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now