Solved

Drive Map Script not working with Windows 7

Posted on 2010-11-29
5
1,302 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

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.

Question has a verified solution.

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

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, 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.

786 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