Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Batch file failing on some machines, not others???

  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch file failing on some machines, not others???


    Looking for some troubleshooting ideas.

    Through GPO I call a login script which calls a bat file that starts our web filter authentication. On some machines the it runs fine and I can see the process that was started in the Task manager. However on other machines in the same OU it will fail.

    We put a pause in the bat file to test and we found that as soon as you click a button to continue through the pause, the process that was started, stops when the shell window closes

    also, If I run the bat file manually after login on the machines that fail, it works fine. Does not matter what user logs in. Any help or ideas are most appreciated.


  • #2
    Re: Batch file failing on some machines, not others???

    Are there any other logon scripts defined, eiher through GP or AD?

    Could you please post the script(s) so we can get an idea of what's happening?

    Is your server running Windows 2000 or 2003?

    What OS are the clients running?

    Do any errors show up in the event logs o the clients?
    Last edited by gforceindustries; 25th November 2008, 20:06.
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.


    • #3
      Re: Batch file failing on some machines, not others???

      The computers on where the called batch terminates when the logonscript is ended,, search the registry for a value name "RunLogonScriptSync".

      If not found, then you can add it manualy in this key,
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
      "RunLogonScriptSync" REG_DWORD value: 0 = disabled, 1 = enabled
      For your case, the logonscripts should always run logonscripts "asynchronously" (value 0).
      Note: This restriction can also be set on a user by user basis by adding it to HKEY_CURRENT_USER)

      Or, you can configure this via a Group Policy for the computers,
      Computer Configuration\Administrative Templates\System\Scripts
      "Run logon scripts synchronously" <- disable!
      NOTE, an equivalent option for this policy is also available under the User Configuration node! However, the setting you specify for the Computer has precedence over the one set for the users.

      If the batch would have been called from a startup script, then you should search for the value name "RunStartupScriptSync" in the registry or, use the GPO
      Computer Configuration\Administrative Templates\System\Scripts
      "Run startup scripts asynchronously" <--enable!

      Alternatively, you could use a startup script or logon script to create a link to the batch in a autorun path on the computer. Then the batch will be started after the logon script.


      Related Threads
      - WSH logon script only runs if there's user interaction
      - Printer does not map to all clients

      Last edited by Rems; 24th December 2008, 10:13.

      This posting is provided "AS IS" with no warranties, and confers no rights.


      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts