Running a batch file from GPO "computer" logon script

Posted on 2006-05-08
Last Modified: 2008-02-01
I am currently running Windows 2003 Server with Active Directory.
I would like to run a batch file from the logon script based on the computer rather than the user.

1. Where do i place the batch file(s) on the Server
2. In the GPO editor how and where do i reference these batch files

Any help will be greatly appreciated

Larry C
Concept Consulting
Question by:Concept22
    LVL 10

    Expert Comment

    by:Walter Padrón
    Hi Concept22,

    Open Group Policy Management Console\Computer Settings\Windows Settings\Scripts\Startup
    Under "Script Name" click on Browse and when the dialog open paste your batch file there and then select the file you just copied.


    Author Comment

    here is the bat file

    \\cc2003\batch\con2prt.exe /c \\cc2003\hp1000c

    the file runs on it's own just fine
    the shares are visible
    the computer and user are located in the proper OU

    i have used the GP manager from microsoft and it says that all the policy changes are applied to both user and computer, yet no results.

    if have also put the bat and exe file in the correct script directoy under sysvol

    any suggestions?

    thanks again...

    LVL 10

    Accepted Solution

    Hi Concept22,

    Instead of running this script at computer startup run it at user Logon
    Group Policy Management Console\User Settings\Windows Settings\Scripts\Logon

    LVL 13

    Expert Comment

    you could run VB script at the startup script that will check
    if the computer is a member in a group that you will create.
    if member= true run the program for share
    if member = false don't run.
    then it will be easy to manege which computer will get the program.

    you can find some script examples in script center at

    good luck.
    LVL 13

    Expert Comment

    LVL 7

    Expert Comment

    who has access permissions to the share/file -- as the startup scripts run under the computer account you'll need to ensure it's included with at least read permission
    LVL 25

    Expert Comment

    by:Ron M
    Install GPMC from microsoft for managing group policy in win2003 domain.
    open it.
    Create a GP object called... Computer Specific Logon Script....edit it, and create the batch file.  Do this under Computer, not user.

    Create an OU in Active Directory for your computers that you want this to apply to....put them into the OU container.
    Now right click the container and click "link existing GP object". select the GP object you just created.

    Go logon to one of those machines and test it .

    good luck.

    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

    Suggested Solutions

    Title # Comments Views Activity
    AS400 application emulation 7 37
    Question to Zip 8 65
    How do I get XP mode to work on WIndows 7? 14 83
    aix tls version 6 106
    I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
    In a recent article here at Experts Exchange (, I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    755 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

    21 Experts available now in Live!

    Get 1:1 Help Now