Discussion Locked

GP or not

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have been troubleshooting the logon batch file that maps drives to users according to their group membership (using ifmember.exe)in a W2K domain. The domain was migrated from NT4 to 2000 before I joined the company.
Logon batch file executes andseems to make the right selections, but exactly upon completion of the batch file, the rest of the drives get mapped for all users.
Upon further examination, I realized that no reference to logon.bat is even necessary in the user profiles. The batch file will run regardless.
I checked domain policy using GPMC.msc or GPedit.msc and any other tools I could find, and there are no such domain policies to map all drives for all users.
They show the same logon.bat file will be running as a logon script in "default domain policy\user configuration\windows settings\scripts\logon" section.
I am at a loss.
How can all drives be mapped for a brand new user without having a logon batch file defined in profiles, or a group policy defining the mapping of drives?

6 replies

by mashtifered

I must add the following information.
If I unmap all network drives on my machine, bring in the logon.bat file and ifmember.exe onto my desktop and then run logon.bat file locally, I get just the correct drives mapped, based on my group membership.
The problem occurs only when the file is run at logon to the domain.

by curlergirl

Well, the default domain policy that you refer to is what is causing the login script to run. If you have a script defined in the default domain policy as you described, then it ignores whatever is in the profile settings in the user setup. Are you sure that the login.bat file that is stored in the policies section of the sysvol is the same as the one you are thinking is running at login? This file would be stored in the following location: %systemroot%\sysvol\sysvol\[domainname]\policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\user\scripts\logon. Note that this is NOT the same as the standard NETLOGON folder, which is where the system looks for the login batch file that is specified in the user settings. I'd suggest first check to seeif there is a batch file in that location and, if so, is it the same file.

The other possibility is that someone at some previous time went around and added manual persistent drive mappings on each workstation and this is why all the drives arebeing mapped even though your login script is working. One thing you might do is to add the following statement to the beginning of the script:

net use * /delete

This will remove any manual persistent drive mappings that may have crept in there when you weren't looking before remapping the drives from your login script.

by curlergirl

Are these Win2K or XP workstations, or are they an older OS like Win9x or Me? If they are Win2K +/or XP, you might try looking at the Default User profile (either local on the workstation or on the domain if there is a domain-wide one) to see if ithas been configured with persistent drive mappings in the registry that are being copied to the users' profiles as they log on for the first time.

If none of these possibilities makes sense or pans out, let me know by comment when you rate this answer if there are any other clues we can look at. For example, are there any error messages happening at either workstation or server while the login script is running?

Hope this helps!

by mashtifered

Thanks for thinking this through. Unfortunately it did not help. There is nothing in %systemroot%\sysvol\sysvol\[domainname]\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\USER\Scripts\Logon
Additionally, in the logon.bat file, before every drive I map, I delete the same drive letter. Also, during the testing, I remove all mapped drives manually before I reboot.
The machines are all W2K Pro and Server, and one XP Pro. I am aware of XP booting to cached settings, and log on twice before it starts running logon.bat.
The fact remains that I get all drives mapped, regardless of whether I HAVE the logon.bat file in the user profile or NOT.

This discussion is closed to new replies.