[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Group Policy Login Script - It Runs Perfectly, Does Not Map Drives For User

Hi Folks-

We recently modified the actual login.bat files that live in the unique GPO folders on the domain controller - add a line here, remove a line there - that was all we did.

Now - it seems like the login scripts do not run.

So I found a link to modify the GPOs to run the scripts visible - and now I can see the batch file running.

I modified it now to put in pause commands so I could actually see the script run - and it runs each line perfectly, net use commands respond with a completed successfully result.

The problem is - when you click on My Computer, there are no drive mappings.

If I browse to the sysvol folder and dive into the gpo folder - and run the batch file manually - all the drives map fine.

Any ideas?  Thanks.
0
niwuser
Asked:
niwuser
  • 5
  • 5
1 Solution
 
Gerald26Commented:
There might be another GPO or script deleting mapped drives at startup.

An easy way to check this could be to add a PAUSE at the begining of the file.
If there is an "Echo off" line, remove it temporarily

When script launches at session login, wait a few seconds for the desktop to appear then press a key to run the script. This way, you will be sure that the script works perfectly.
0
 
niwuserAuthor Commented:
Thanks Gerald26 - my script looks like this:

net use * /d /y
pause
net use p: \\server\public /persistent:no
pause
net use z: \\server\private /persistent:no
pause

When I put pause commands in there - I see the net use /d run fine.

Then I see the P and Z drive map - but even after each pause line, the drive maps - but when I click on My Computer - there is no drives mapped.

It seems like it works fine on a Windows XP computer, but the Windows 7 computers have this problem.
0
 
Gerald26Commented:
Ok,

Can you do the same test without using "My Computer Window" to check for mapped drives ?
You will instead open a new cmd.exe windows and check the outpput of the net use command after the second pause.

Maybe the drive is mapped but your display is either limited by a GPO or filtered.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
niwuserAuthor Commented:
Right - should have listed that also.

I did run a net use from a command prompt while in the middle of the login script (during the pause command) - it shows no drive connections.

So it's mapping them - somewhere, but the logged in user does not see that anywhere.
0
 
Gerald26Commented:
That sounds ... strange.
I'm a bit curious, can you add ECHO %USERNAME% jsut after the first pause please ?
0
 
niwuserAuthor Commented:
Hi Gerald26 - that's exactly what I thought.  How could it run while the user is logged in but not actually be mapped.

I added the line you told me to - it responds with testuser, which is the name of the user that I am working with.

We have 10 or so different Group Policies, while I haven't tested all of them, I know specifically 2 groups this is happening to.

Thoughts?
0
 
Gerald26Commented:

while we are doing first level tests, and before going through some rsop and gpresult commands, can you turn off UAC on the windows seven client and try to log on again ?

0
 
niwuserAuthor Commented:
Disabling UAC fixed this - now I can see my drive mappings.


Although, I'm not entirely sure I want to do this.  I could disable UAC, but my users aren't very bright - so I'd like to offer them a level of protection.

I know there are different levels of UAC - but why wouldn't a group policy that comes from the domain server that the PC is attached to not be able to know that this is a valid program to run?

What would you recommend?  
0
 
Gerald26Commented:
Make sure your seven client are SP1 up to date.
If it still not works with SP1, then maybe this link will give you more informatiosn about why it happens :

Programs may be unable to access some network locations after you turn on User Account Control in Windows Vista or in Windows 7
0
 
niwuserAuthor Commented:
Thanks Gerald26 - SP1 was the problem.

Very odd - but resolved.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now