Results 1 to 8 of 8

Thread: Logon scripts using GPO

  1. #1
    mckormack is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    4

    Default

    My .bat logon scripts no longer work when AD users logon to the domain. I checked settings over and over but could not find anything wrong, the proof being that .vbs scripts work just fine. However, if I assign the .bat script at a user level (under the profile tab in AD) rather than using GP, the .bat script will work fine.
    If it were a GP corruption problem, this would affect all scripts and not just .bat scripts, would it not?
    Any help is appreciated

  2. #2
    graycat is offline 30+ Helpful Posts 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    57

    Default

    any chance of some more info? what are you applying? where? etc are you assigning the bat file gpo in the right place(s)? ie: OU / site / domain

  3. #3
    mckormack is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    4

    Default

    I am applying a simple NET USE batch file and a XCOPY batch file with some line switches so that domain users get fresh copies of certain files. I think I am assigning the .bat files in the right place (\\myserver\SYSVOL\mydomain.local\Policies\{31B2F3 40-016D-11D2-945F-00C04FB984F9}\USER\Scripts\Logon). Indeed, they were running fine until 10 days ago. Then suddenly they stopped working. Now only .vbs scripts located in that directory seem to work.
    Thanks for any help you may spare

  4. #4
    AndrewTerry is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    21

    Default

    I guess the obvious question is, "what's changed"? But, if you were to browse to that location, does the script still execute correctly when you double-click it...?

    (I'm wondering if it's a script problem, rather than a policy problem - the script might be being invoked by GPO, but not completing)

    Cheers

    Andrew

  5. #5
    mckormack is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    4

    Default

    [quote="AndrewTerry"]I guess the obvious question is, "what's changed"? But, if you were to browse to that location, does the script still execute correctly when you double-click it...? ...snip ...

    That's what I have been wondering, as I have made no changes whatsoever. Double-clicking on the .bat file triggers it off nicely. Also, as I said if I assign the same .bat file under Active Directory >Users>[Username]Profile>Logon script, it will execute correctly.
    Could it be that GPO is no longer reading .bat files (again, .vbs scripts execute correctly).
    Thanks

  6. #6
    AndrewTerry is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    21

    Default

    Strange...
    ... the next to check is that user is actaully receiving the GPO. Run:
    [code:1]gpresult /scope user[/code]
    from a command-line of logged-on user. Make sure that the policy with logon script is being applied.

    Cheers

    Andrew

  7. #7
    mckormack is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    4

    Default

    Andrew, I ran the gpresult as suggested. Everything looks fine to me, unless I should be looking for anything special in the results being displayed. I am positive the policy is being applied because I placed two scripts in the folder, one being .bat and the other .vbs. When the user logs on only the .vbs script executes. So it's got to be an issue affecting .bat files. I even tried something silly like:
    [code:1]@ECHO OFF
    ECHO.
    ECHO.
    ECHO ******************************************
    ECHO * H E L L O W O R L D *
    ECHO ******************************************
    PAUSE > NUL[/code]

    It executes if you double-click or insert it in the User /Profile tab, but it won't work under GP.
    Getting desperate!

  8. #8
    AdamV is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    669

    Default

    Maybe I'm being dumb here, but have you actually added both scripts to the policy itself (eg through GPMC), or just manually hacked them into the policy folder by hand?

    It sounds like the Policy does not know of the existence of one of these so it is not being applied, even though it is in the folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO