Login script application log event error

Posted on 2004-11-11
Medium Priority
Last Modified: 2010-04-14
Hey Guys,
I have a standard login script in the netlogon share. This runs fine for many machines etc. It has problems with various users. I have the script being executed via the profile page with only the name "login.bat" in the box. I have noticed on many XP and 2000 machines, in the APP log, I get a userinit error 1000 saying that

Windows could not execute c:\winnt\sysvol\sysvol\domain\scripts\login.bat. The system cannot find the fle specified.

Why does it reference c: at all from the workstation? It should be a UNC designation at  time of login, is that correct?

Also, if I change to a test login script in the same location, change it in the user profile page, why does it not run?
There is no script designated int GP.
Thanks a million
Question by:Premiernc
  • 2
  • 2

Author Comment

ID: 12559163
Sorry guys, I was just exploring the Default domain policy and it appears there is a login script for users assigned in there. It appears when you browse for your login script to add to the domain, it inserts the c:\winnt\sysvol\sysvol\domain\scripts\login.bat path. This could be the error I get on the workstations. What should the line read in the GP?

Expert Comment

ID: 12559926
That is where you want your login scripts in my opinion - Then you can assign by GPO. Assigning at the profile isnt efficient - depending on number of users - OU etc. my .02
LVL 20

Accepted Solution

Debsyl99 earned 2000 total points
ID: 12559954
Hi Premiernc,

Thought it sounded odd! You can run one, or the other but not both without probs sometimes, so make a decision on which you want to use in relation to gp based scripts or netlogon. If you opt for group policy (easier to manage I think) then you need to ensure that the script itself is in the relevant script folder for the login script on that group policy object, and delete the .bat from the logon script path in the users profile properties in ADUC. A handy tip is to right click and copy the .bat file - then go into group policy and edit the relevant policy object. When you get to the login-script setting, you should see the option to "show files" - Most of the problems come when people then browse to the files that are in for example the folder c:\winnt\sysvol\sysvol\domain\scripts\login.bat - as this won't work. When you hit "show files" it opens the relevant logon script folder for that GPO - so simply paste your .bat in there. You don't need to specify a path, it just needs to be in that folder. If you can confirm it is, the policy should then work ok.

Once you've done, run "secedit /refreshpolicy user_policy"  (without the "") from a command prompt on the server to refresh the policy if necessary. Then test it. I've written this direct from memory as I'm now at home for the evening and away from my domain, but post back if you need clarification,

Deb :))

Author Comment

ID: 12597940
Hey Deb,
When I remove the .bat from the netlogon share, will I get all kinds of errors if I do not take out the .bat in thier profile setup?
LVL 20

Expert Comment

ID: 12597992

Good question and I don't honestly know as it's a long time since I've done that one - I doubt you'll get lots of errors but you'll probably get a complaint or two in the event logs that it couldn't find the file. Any reason you don't want to take it out of the profile?

If you want to wait I can run it quickly on my test network tomorrow, but just try it for one and see what happens...


Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question