Solved

Drive Map Script not working with Windows 7

Posted on 2010-11-29
5
1,292 Views
Last Modified: 2012-05-10
I have a vbs script i am using to map drives at logon in my windows server 2003 R2 environment. This script has always worked perfectly in the past. Now when I implement this script in the main "Sales GPO" by adding it to the  user config >windows settings > logon script it will not work for the users in this OU. If i take the same script and place it in the profile tab of the user object it seems to work. I checked the netlogon location and the script is there, I just don't get it. Is this something with Windows 7 or am I missing something simple here???

driving me crazy, please help....
0
Comment
Question by:Sysadmin12881
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:essaydave
Comment Utility
Hi

In the GPO, when you go to the scripts section, can you try clicking on the Show Files button at the bottom, and then put the script in the folder that comes up?  Something like

\\domain.local\SysVol\domain.local\Policies\{69A748C0-6721-441A-9A30-038FB2EEE19F}\Machine\Scripts\Startup



0
 
LVL 6

Expert Comment

by:essaydave
Comment Utility
Also, another thing you can try is the EnableLinkedConnections registry key.  

From Josh Philips at http://windowsconnected.com/blogs/joshs_blog/archive/2007/02/20/windows-vista-tip-enabledlinkedconnections.aspx :

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLinkedConnections = 1 (DWord)
0
 
LVL 8

Accepted Solution

by:
TheMak earned 250 total points
Comment Utility
With UAC enabled you cannot map drives in a logon script that is assigned using a Group Policy Object (GPO). The GPO logon script does run, but under a different security context, so the mappings get lost.

Microsoft provides a sample script, called launchapp.wsf that works around this problem by running your real logon script a moment later under the correct security context.

It is available here: http://technet.microsoft.com/en-us/library/cc766208(WS.10).aspx

Look for the section titled “Group Policy Scripts can fail due to User Account Control” and also Appendix A, which is the source code for launchapp.wsf.

launchapp.wsf does fix the problem of mapping drives on Vista (and Windows 7) PCs that have UAC enabled. However, it causes another problem: it doesn't work in Windows XP, so XP computers show an error instead of running the logon script.

Fortunately XP computers don't need the launchapp hack, so my company made a modified version of launchapp that tries to do things the Vista way, but if that fails (because you're running XP), it just launches the real logon script straightaway. I can’t share this with you as it’s internal to my company (has real server names etc.) but it wasn’t too hard to do.

http://serverfault.com/questions/95379/why-wont-my-logon-scripts-map-drives-under-windows-7
 
0
 

Author Comment

by:Sysadmin12881
Comment Utility

Hey essaydave,

Thanks for the quick response.

I am pretty sure it is in there now, have to check in the morning though.... Doesn't it have to be in there in order to add it to the GPO?
0
 
LVL 8

Expert Comment

by:TheMak
Comment Utility
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

763 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

10 Experts available now in Live!

Get 1:1 Help Now