Results 1 to 6 of 6

Thread: Group policy logon script doesn't run

  1. #1
    CryptiniteDemon Guest

    Group policy logon script doesn't run

    Okay, I made a simple .bat file to map a network drive on logon and put it
    under the group policy in an OU I made.

    The script is simply

    net use z: \\THETEST\FXI

    When I run the bat file manually from any of the computers it maps the drive
    just fine. However, when I login the script never maps the drive.

  2. #2
    Pegasus \(MVP\) Guest
    Perhaps the batch file never runs when you log in . . .?
    Modify it like so to make sure:

    @echo off
    echo The logon script %0 ran on %date% at %time% >> c:\logon.log
    net use z: \\THETEST\FXI
    net use

    I may be wrong but don't scripts in group polciy have to be VB script files?

  3. #3 Guest
    Did you place the login script in the startup folder of the
    corresponding policy? For example, browse to \\DomainController
    \SYSVOL\domain\Policies\GUIDofyourPolicy\Machine\Scripts\Startup ?

    Also did you link the GPO to the OU that contains the computers that
    you are trying to run this startup script on?

    Actually, I think you might be right. Can you try wrapping that
    script in a vbscript and seeing if that works?

  4. #4
    Paul Mckenna Guest
    I'm getting all emotional

    Maybe try creating a login.vbs file with the following

    Set WshNetwork = WScript.CreateObject("WScript.Network")
    on error resume next
    wshnetwork.mapnetworkdrive "Z:"," \\THETEST\FXI"

    Hope this helps or at the very least gives you an idea on how to make it

    I only use .cmd scripts, and they run for both logoff and logon.

  5. #5
    Join Date
    Jul 2009

    Re: Group policy logon script doesn't run

    Paul, you are ABSOLUTELY correct so do not listen to these other knuckleheads about you being wrong. I spent an entire DAY trying to debug a working BATCH, but as soon as I added it to the GPO under STARTUP SCRIPTS it did not work. I kept banging my head thinking it was permissions and all the other nonsense people are spouting on these boards but it was the VBS solution...

    Once again, this is for STARTUP scripts and NOT logon but I am not going to bother testing that one since I am "tired"... :P So everyone else having problems getting their BAT files to run properly as a STARTUP SCRIPT in the GPO? Just change it to a VBS startup file... Good luck...

    If you are NOT a VB Script guru?

    TimeTraveller - You are WRONG. I could NOT get BAT files to work as STARTUP scripts on a Windows 2003 R2 server
    Last edited by DonChino; 19-07-2009 at 11:38 PM.

  6. #6
    Lanwench [MVP - Exchange] Guest

    Re: Group policy logon script doesn't run

    I have no idea what you're on about, but I can see that you're using
    the horrible techarena interface to access these groups. Don't. It doesn't
    quote replies, and nearly all the posts we see in here from techarena are
    replies to threads that have long since been retired from the news servers.

    Try using a news client, such as Forte Agent, Thunderbird, or even Outlook
    Express instead. It's a lot easier to do nearly everything that way. You can
    mark messages to be watched, filter the views so you can see replies to your
    posts easily, and search.

    The Microsoft public news server is and you can
    subscribe to as many groups as you like; no authentication is required.

    The following is from a post by MVP Malke ...

    Here's information on Usenet and using a newsreader:

    Some newsreaders for Windows

Similar Threads

  1. Group Policy Startup Script Issue (Trend OfficeScan) - Autopcc
    By Flaco in forum Small Business Server
    Replies: 3
    Last Post: 23-09-2010, 10:17 PM
  2. Replies: 3
    Last Post: 17-08-2010, 09:06 PM
  3. Group Policy logon script not applied if connected by WiFi
    By Alister in forum Active Directory
    Replies: 8
    Last Post: 09-01-2010, 12:10 AM
  4. Replies: 3
    Last Post: 23-10-2008, 06:58 AM
  5. Replies: 1
    Last Post: 13-07-2008, 12:43 AM

Posting Permissions

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