Solved

Drive Map Script not working with Windows 7

Posted on 2010-11-29
5
1,307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Do Windows 2003 SBS sp1 CALs valid for accessing a Windows 2003 R2 server? 2 71
Changing Monitor IDs 3 54
Scripting 4 37
bitlocker admin and monitoring 2 44
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

752 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