Solved

Push out a BAT file using Group Policy

Posted on 2010-09-07
6
1,055 Views
Last Modified: 2012-05-10
What's the best way to push out a BAT file to multiple clients using group policy?  We are using Windows Server 2003.
0
Comment
Question by:DHPBilcare
6 Comments
 
LVL 70

Accepted Solution

by:
KCTS earned 300 total points
ID: 33620334
Why not assign it as a startup or logon script see http://techsupt.winbatch.com/ts/T000001048F90.html
0
 
LVL 35

Assisted Solution

by:Joseph Daly
Joseph Daly earned 100 total points
ID: 33620514
Where are you trying to push the file to? This can be very easily done with a computer startup script as mentioned above. Below is some code that will assist you with this task.
IF EXIST C:\somelocation\file.bat GOTO END1
copy \\server\share\file.bat c:\somelocation
:END1
exit

Open in new window

0
 
LVL 5

Expert Comment

by:jhill777
ID: 33620521
What are you trying to do with the BAT file?  There may be alternatives.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 11

Expert Comment

by:Ben Personick
ID: 33621312
Agreed is this a logon script or a one time script or what?  and what do you mean by push out?  to have it run or have it copied?
0
 

Author Comment

by:DHPBilcare
ID: 33621439
We're going through an ERP project and the BAT file part configures the client computers to access the software.  I dont really know what the script does but believe if I link the BAT file to the startup script under group policy this will apply it to all.  I have been infomred that the BAT file does need to be run at startup each time the user logs in.
0
 
LVL 11

Assisted Solution

by:Ben Personick
Ben Personick earned 100 total points
ID: 33621628
then just place the batch file you need to have run into your netlogon folder as whatever you want to call it.bat (Into \\YourDomain.com\Netlogon\  As TheBatchFile.bat )

Then simply add this line to your existing logon script batch file:
CALL "\\YourDomain.Com\Netlogon\TheBatchfile.bat"

Since this is the normal script repository all users have read permissions to run scripts from here so you should be good to go.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Learn about cloud computing and its benefits for small business owners.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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