Login script application log event error

Posted on 2004-11-11
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
    LVL 1

    Author Comment

    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?
    LVL 3

    Expert Comment

    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

    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 :))
    LVL 1

    Author Comment

    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


    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

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    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…
    Read about the 3 stages of the buyer's journey: awareness, consideration, and decision.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now