Link to home
Start Free TrialLog in
Avatar of niwuser
niwuser

asked on

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.
Avatar of Gerald26
Gerald26
Flag of France image

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.
Avatar of niwuser
niwuser

ASKER

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.
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.
Avatar of niwuser

ASKER

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.
That sounds ... strange.
I'm a bit curious, can you add ECHO %USERNAME% jsut after the first pause please ?
Avatar of niwuser

ASKER

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?

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 ?

Avatar of niwuser

ASKER

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?  
ASKER CERTIFIED SOLUTION
Avatar of Gerald26
Gerald26
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of niwuser

ASKER

Thanks Gerald26 - SP1 was the problem.

Very odd - but resolved.