Hi im wondering how to best write a dos script that takes computer from a file and runs a bat file on that computer remotely
how would i write it to load the file and take each computer and run the task on em and is it possible to do if the computer name isnt reponding that the script pings the computer and run the ip adress instead.
Many thanks Andreas
Dos Script Multiple computers
Moderator: DosItHelp
Re: Dos Script Multiple computers
sorry i'm confused
what do u wan't to do?
to run any command or program remtly u have to get permissions first like if u are the admin of a croup of computer
what do u wan't to do?
to run any command or program remtly u have to get permissions first like if u are the admin of a croup of computer
Re: Dos Script Multiple computers
Hi yes i have the access for running the script, but what i want is to put a list of computers in a file and have then have dos load the computers names and remotely copy over the bat file i created and then run it on the computer.
Basicly i have the dos script on a group disk and i want my other dos script run on my computer then load all the computers names i have put in a file then copy my fix over to all the computer then run it i have the client side fix rdy.
Thanks Andreas
Basicly i have the dos script on a group disk and i want my other dos script run on my computer then load all the computers names i have put in a file then copy my fix over to all the computer then run it i have the client side fix rdy.
Thanks Andreas
Re: Dos Script Multiple computers
One of the PS tools from Microsoft/sysinternals can help you.
Google for psexec
Google for psexec
Re: Dos Script Multiple computers
im more intrested in knowing how to get the dos script to load from a txt files computer names so i can just put in 100 computer and run it so it copys my fix over to the users computers.
Re: Dos Script Multiple computers
Andy80 wrote:im more intrested in knowing how to get the dos script to load from a txt files computer names so i can just put in 100 computer and run it so it copys my fix over to the users computers.
You have a few options for running a Batch file remotely on computers.
1) Push it down with a Domain Policy
2) As Foxi said, you can do it with PSEXEC as well.
Re: Dos Script Multiple computers
Andy80 wrote:im more intrested in knowing how to get the dos script to load from a txt files computer names so i can just put in 100 computer and run it so it copys my fix over to the users computers.
Like this?
Code: Select all
@echo off
(
echo computerone
echo computertwo
echo computerthree
)>file.txt
for /f "delims=" %%a in (file.txt) do echo run my script with %%a