• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 637
  • 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
0
Concept22
Asked:
Concept22
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.

cheers
0
 
Concept22Author Commented:
here is the bat file

printers.bat
\\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...

LC
0
 
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

cheers
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
haim96Commented:
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.
0
 
haim96Commented:
0
 
CGretskiCommented:
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
0
 
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.

now...
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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