• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

Running a batch file from GPO "computer" logon script

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
1 Solution
Walter PadrónCommented:
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.

Concept22Author Commented:
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...

Walter PadrónCommented:
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

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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 www.technet.com

good luck.
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
Ron MalmsteadInformation Services ManagerCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now