Solved

Drive Map Script not working with Windows 7

Posted on 2010-11-29
5
1,297 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
ID: 34236362
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
ID: 34236383
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
ID: 34236388
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
ID: 34236396

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
ID: 34236408
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cloning computer 13 63
Twitching screen 11 74
domain controller migration seems succesful, however.... 9 53
Undelete files from a formatted drive 28 33
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

932 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

19 Experts available now in Live!

Get 1:1 Help Now