Link to home
Start Free TrialLog in
Avatar of sharkbot221984
sharkbot221984Flag for United States of America

asked on

Logon Scripts don't run

I have a logon.bat file containing the following:

REM NETWORK SCRIPT
net time \\<dc ip address> /set /y
net use U: \\<server>\u$

The file is saved in the NETLOGON folder of my DC.  Under my user profile in AD for Logon Script: logon.bat

I had this working but now it's stopped for some reason any idea?

If I browse to the NETLOGON folder and execute the batch file it runs and maps the drive.  I've tried this with 2 different user accounts and 2 different machines.
Avatar of debuggerau
debuggerau
Flag of Australia image

If you log out immediately and then log in straight away, does the script run the second time?
Avatar of sharkbot221984

ASKER

No it didn't, but I got it fixed already here's what happened:

I was setting up a 2nd script called logon_sales.bat, I was also having issues with this one.  On MY user account I wanted logon.bat to run and it would only run on logon if in AD I called it just plain logon (no .bat), the 2nd script called logon_sales.bat would only run if in AD I called it logon_sales.bat, but in NETLOGON both scripts are shown as just logon and logon_sales, but are recognized as batch files anyways.  IF you add the .bat to them in NETLOGON so they appear as logon.bat and logon_sales.bat then you go to Start -> Run and type \\server\NETLOGON\ they show up as logon.bat.bat and long_sales.bat.bat  I'm guessing NETLOGON assumes what you put in the is going to a Batch file?
ASKER CERTIFIED SOLUTION
Avatar of debuggerau
debuggerau
Flag of Australia 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
Thanks, I usually set my machines to not hide extensions, just inherited this machine and it wasn't setup that way and haven't done it yet.  Thanks for the reminder!