Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get login scripts to work 3

Status
Not open for further replies.

gmc74

Technical User
Jul 25, 2003
30
US
Hi everyone,

I have a support domain that we use in our office for testing. I wanted to have a logon script for each user so their maps and some other items we are doing will follow them from pc to pc.

I set up the .bat file (I started with logon.bat but read that this may be an issue and renamed it play.bat) in my C:\winnt\sysvol\sysvol\support.com\scripts directory, which is also accessible as \\SERVER\netlogon\play.bat

I then went into the Active Directory Users and Computers, then to Users, right clicked the user, clicked on profile and inserted \\SERVER\netlogon\play.bat as the Logon script (there is nothing under Profile path). I have also attempted to assign T: as the home folder in \\SERVER\test_share\username, but that isn't working either.

I do have the ability to run the batch file from the run command of the workstation by typing the exact path that I have listed as the logon script above, but no matter what I do I can't get these scripts to run on their own. This particular script is just for testing until I get it working, all it contains is a drive map using net use. The script does work when launched from run.

I am running multiple Domain Controllers, and they are updating eachother quickly with the information.

Any ideas? This is really boggling my mind! I thought this would be simple, but apparently I was wrong... it is almost like there is a switch somewhere that I need to turn on.

Thank you in advance for your help,

Grant
 
One more thing.

The workstations are all running Windows 2000 as well (I do have other O/S's on the domain, but I haven't even gone there yet).

Thanks again

Grant
 
Did you assign the logon script in group policy? Open Active Directory, right click your domain, properties, select group policy tab (you can go to OU's to do policies other than the domain if you wish). Pick a policy to edit. In the policy, you can set a machine or user script. Both will be under windows settings/scripts. Like before, use the network path. Machine policies are to the machines. I think what you need will be a user policy. In your script you my try using the windows %username% variable to pass the username into the script for specific user settings.
 
One more update. I am not sure what I did, but the home directory map seems to work. I mapped T: to \\server\test_share\username and it is working. But the logon script is not.

Thanks again
 
Have you tried just putting in play.bat rather than \\SERVER\netlogon\play.bat in the User profile properties?



Claudius (What certifications??)
 
WOW!

I can't believe it was that easy!

Thanks guys!!!

I spent the better part of a day researching this yesterday, I guess I should have found this site earlier.

I replaced the path with the file name and all is well.

Thanks again for the quick responses!

Grant
 
Using a batch file for earlier OS such as WinMe and Win98se should work okay too. But if you were using a VBScript .VBS file, then that would be another matter entirely. We have several Windows versions and we are forced to use BAT batch files for the older Win9x and WinMe family, since it seems that the VBS scripting capability is not loaded yet at logon time. In summary, you can use BAT with any version, but VBS only with WinXp, Win2000 and probably WinNT.
 
gmc74,

I did the same thing as you did. Thanks a million claudek and fitzie!! Fortunately I only spent a few hours on this.


Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top