Announcement

Collapse
No announcement yet.

Logon Scripts fail to run.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logon Scripts fail to run.

    Hey all,

    Starting to iron out a few small niggles that we have in our LAN at the moment and this one is the big pain in the preverbiale at the moment.

    All of our users have AD profiles which all have logon scripts attached to them. We currently have 2 as i'm testing the new one first.

    Now any user that logs on should get the logon script running and it should map their drives for them. Unfortunately this doesn't happen all the time.

    Random users logon scripts will fail to run but they seem to successfully logon to the domain with no issues.

    If this happens the users are told to wait a few seconds after they press CTRL+ALT+DEL before typing in the password then pressing enter.

    It has never happened to me or my IT colleagues so i can't replicate the problem. It does happen randomly and could be any user that it happens to.

    I have enabled NETLOGON logging on a few users accounts and have advised them to email me when it happens. The only thing i can see diffrerently in there log compared to mine is this error

    [INIT] Netlogon.dll has been unloaded (recover from it).

    I am also trawling through the GPO's that are applied to the machine and user accounts at the moment.

    Any one have any ideas???

    I'm running out pretty fast lol.

  • #2
    Re: Logon Scripts fail to run.

    It would probably work better if

    Comment


    • #3
      Re: Logon Scripts fail to run.

      i didnt hit refresh halfway through trying to post!
      i was going to say it would probably work better and be easier to troubleshoot, If you created a GPO and added your script to - User Configuration - Windows Settings - Scripts (logon/logoff).
      that way you dont have to worry about individual profiles and can apply your GP to whatever you like. I also think it would be easier to troubleshoot if any problems as you can make use of gpresult, event vwr etc etc.

      hope this helps

      Comment


      • #4
        Re: Logon Scripts fail to run.

        I agree with Hazey, configuring logon scripts directly on the users user account within AD is the legacy method. Typically you would Group Policy to do what your after.

        Anyway can you post the script?
        I've had problems in the past where scripts I created are supposed to delete then remap drives. Except they don't seem to remap. My solution for this was to change the unmapping of drives to be done at logoff. This though is done using Group Policy.
        Please remember to leave positive reputation points (The Ying Yang Icon) if someone helps you.

        Comment


        • #5
          Re: Logon Scripts fail to run.

          WullieB,

          Have you checked the eventviewer, DNS and have you checked if the scripts are replicated across the domain controllers?
          Are their any other problems when this is happening eg slow login or does it takes a long time to process "configuring the network settings"?
          Marcel
          Technical Consultant
          Netherlands
          http://www.phetios.com
          http://blog.nessus.nl

          MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
          "No matter how secure, there is always the human factor."

          "Enjoy life today, tomorrow may never come."
          "If you're going through hell, keep going. ~Winston Churchill"

          Comment


          • #6
            Re: Logon Scripts fail to run.

            Originally posted by hazey View Post
            i didnt hit refresh halfway through trying to post!
            i was going to say it would probably work better and be easier to troubleshoot, If you created a GPO and added your script to - User Configuration - Windows Settings - Scripts (logon/logoff).
            that way you dont have to worry about individual profiles and can apply your GP to whatever you like. I also think it would be easier to troubleshoot if any problems as you can make use of gpresult, event vwr etc etc.

            hope this helps
            Yeah thats the way i want to do it as the old way is legacy. I might create a new OU for him and see if that affects it.

            Comment


            • #7
              Re: Logon Scripts fail to run.

              Originally posted by ]SK[ View Post
              I agree with Hazey, configuring logon scripts directly on the users user account within AD is the legacy method. Typically you would Group Policy to do what your after.

              Anyway can you post the script?
              I've had problems in the past where scripts I created are supposed to delete then remap drives. Except they don't seem to remap. My solution for this was to change the unmapping of drives to be done at logoff. This though is done using Group Policy.
              The script works perfectly for all of the users. It is a very intermittent issue that doesn't affect the same user consistently.

              I'll create a new GPO for one user it is happening to at the moment.

              Comment


              • #8
                Re: Logon Scripts fail to run.

                Originally posted by Dumber View Post
                WullieB,

                Have you checked the eventviewer, DNS and have you checked if the scripts are replicated across the domain controllers?
                Are their any other problems when this is happening eg slow login or does it takes a long time to process "configuring the network settings"?
                Nothing in Event Viewer and DNS is pointing to our internal servers only. All scripts are on all servers and replication is working normally.

                No slow logins that i'm aware of. We do have a GPO that waits on the network coming up before allowing the user to login but the GPO seems to be getting applied successfully. Well according to gpresult it is.

                Comment


                • #9
                  Re: Logon Scripts fail to run.

                  i forgot to ask what sort of scripts are you using?, as you are using the AD user profile script option i am guessing a batch file or cmd? if yes i would also when creating the GPO change the script to vbs. seems to work better. Here is a script you can modify

                  Set objNetwork = CreateObject("WScript.Network")
                  objNetwork.MapNetworkDrive "I:" , "\\servername\share1"
                  objNetwork.MapNetworkDrive "S:" , "\\servername\share2"
                  objNetwork.MapNetworkDrive "T:" , "\\servername\share3"
                  WScript.Quit

                  Comment


                  • #10
                    Re: Logon Scripts fail to run.

                    another thing worth trying would be to put a pause in your script (for a test user at least) that way it would be very easy to see if the script is being run.

                    Comment


                    • #11
                      Re: Logon Scripts fail to run.

                      Can you post the script?
                      Please remember to leave positive reputation points (The Ying Yang Icon) if someone helps you.

                      Comment


                      • #12
                        Re: Logon Scripts fail to run.

                        Originally posted by ]SK[ View Post
                        Can you post the script?
                        Not without a whol heap of editing.

                        Its not just asingle scrip this affects is both our old kix script and our new hta script

                        Comment


                        • #13
                          Re: Logon Scripts fail to run.

                          Is everything fine if you login without any scripts?
                          If yes, I would suggest to let Rems checking your script
                          Marcel
                          Technical Consultant
                          Netherlands
                          http://www.phetios.com
                          http://blog.nessus.nl

                          MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                          "No matter how secure, there is always the human factor."

                          "Enjoy life today, tomorrow may never come."
                          "If you're going through hell, keep going. ~Winston Churchill"

                          Comment


                          • #14
                            Re: Logon Scripts fail to run.

                            Look for any error messages in the application event viewer with USERINIT as the source. The error message will provide the path and name of the script along with the reason for failure to run the script.

                            \Rems

                            - http://www.microsoft.com/technet/scr...xtension1.mspx
                            - http://www.microsoft.com/technet/scr...xtension2.mspx

                            - discussion about logonscript behavior
                            .
                            Last edited by Rems; 21st August 2008, 10:04.

                            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

                            Comment

                            Working...
                            X