Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Windows 2003 Server (TECHNET) > Deploy a .bat file Using GPO
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 13th July 13:34
best
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Hi

Is there a way to deploy a .bat file and then run it once over 200 selected
machines using a GPO ?

If so, please how ?

Thanks

Best
  Reply With Quote


  sponsored links


2 13th July 13:34
ragnar
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Either you have to change the deployment to use a MSI file - if you're
copying files or performing software installation.

OR you could use Active Directory Computer Startup Script. Computer startup
scripts are run using local System, and when you access network resources -
the computer account is used.

The startup script will run the next time a computer startup connected to
the network (domain controller available). To only run it once, you could
use a simple "if exist" command in your batch file and check for a dummy
file name etc.

Good luck!


/Ragnar
  Reply With Quote
3 13th July 13:34
v-xuwen@onlinemicrosoftcom vincent xu
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Hi Best,

I agree with Ragnar, for GPO related operation, please refer to following
article:

<http://technet2.microsoft.com/WindowsServer/en/Library/df3ff735-91ff-4cbf-9
938-3b4af1d460cc1033.mspx?mfr=true>

Hope this helps.

Best regards,

Vincent Xu
Microsoft Online Partner Support

================================================== ====
PLEASE NOTE: The partner managed newsgroups are provided to assist with
break/fix issues and simple how to questions.

We also love to hear your product feedback!
Let us know what you think by posting
from the web interface: Partner Feedback
from your newsreader: microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties,and confers no rights.
================================================== ====

--------------------

startup

-
  Reply With Quote
4 13th July 13:34
best
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Thank you Ragnar
Hi Vincent

The article you supplied me with did not seem to be related to my question.

Regards

Best

=======
  Reply With Quote
5 13th July 13:34
dave britt
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


I would consider creating a logon script. If this needs admin rights it will
need to be run as a start-up script on the machine. Create a vbs script and
assign it using GPO. A rough outline of the script would be to first check's
to see if what you are try to achieve has already been complete. To ensure
the script does not run over and over again. You can use a check for a
registry key or file existence. Assuming the bat file needs to be run use
the logon script to copy it down and run it.

The script center is the best place to start but if you need more help come
back to me


--
Dave Britt

Dave's Weblog
http://davebritt.blogspot.com
  Reply With Quote
6 13th July 13:34
best
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Thanks Dave

Yes I still need more help if you don't mind.

I have the .bat file prepared for deployment. It consists of logging of
machines when inactive for 30 minutes. I tested it by just clicking on it.
Then it creates its key of course in Local Machine of the Registry hive.

The problem is that I am reluctant to go to 200 machines and apply it. The
reason is that those 200 machines were selected. They are mainly based at
reception and certain wards of the the hospital. Reception and those wards
are too busy with patients who have priority over me (I am sure that you
understand what I mean). Having said that, I can ultimately do it if no
other alternative is available. Beside this point there's also time which I
will spend going around the hospital, which is large, and find the targeted
machines, i.e. their exact location. It's time consuming to find them one by
one among 3.000 machines.

The .bat file is prepared and ready to be deployed. A GPO, I would think,
would be ideal. But how ? Your help is appreciated !

Regards

Best
  Reply With Quote
7 13th July 13:34
v-xuwen@onlinemicrosoftcom vincent xu
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


Hi Best,

Sorry, the article just introduced some operation to GPO. Sorry if it
didn't help. Check following article:

<http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies
/directory/activedirectory/stepbystep/gpfeat.mspx>

You can find a part called "Deploying Scripts Through Group Policy Objects"
Hope this helps. Let me know if you still have concerns.


Best regards,

Vincent Xu
Microsoft Online Partner Support

================================================== ====
Get Secure! - http://www.microsoft.com/security
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties,and confers no rights.
================================================== ====

--------------------

<uoEPQsIjGHA.1276@TK2MSFTNGP03.phx.gbl>
<pTIrAAejGHA.5832@TK2MSFTNGXA01.phx.gbl>

question.
  Reply With Quote
8 13th July 13:34
dave britt
External User
 
Posts: 1
Default Deploy a .bat file Using GPO


I will give you some help with a script no problems, but before we start on
that have you considered using pstools in your environment for problems like
this one and others ? Allows you to run commands and utilities remotly on
desktop machines.

http://www.sysinternals.com/Utilities/PsTools.html

This is a script (Yes this simple) that will copy all of the files for a
particular server and share accross to the machine. You will need to run
this as a startup script to overcome the security for the C:\ folder.
the machine will need access to the network share and NTFS read permissions
on the file which should be covered by giving read access to "Domain
Computers" group

A script for testing on a sample machine would be:

Set objShell = CreateObject("wscript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\ServerName\Share\script.bat" , "c:\" , True
objShell.run "C:\script.bat"

--
Dave Britt

Dave's Weblog
http://davebritt.blogspot.com

Start with a script
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666