psexec stops when it can't connect to a computer, can this be changed?

my psexec stops when it can't connect to a computer, can this be changed?

for example:
if i run this:
psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.211,\\192.168.100.43 C:\SDWS.exe

it will run the program on 192.168.100.211, because it is there and is on the network, no prob.
(it will then stop on the next one tho.)

however, if i run this:
psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.43,\\192.168.100.211 C:\SDWS.exe

the psexec stops when it can't find 192.168.100.43, because it is not on the network. It then closes and never finishes the list, thus, it doesn't run the program on 192.168.100.211.

is there a way so it just skips 192.168.100.43 and continues down the list of ip's?

LVL 1
fwecoadminAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
B HConnect With a Mentor Commented:
what if you put it into a batch file, one per line?

psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.43 C:\SDWS.exe
psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.211 C:\SDWS.exe


if one fails it should keep on going
0
 
johnb6767Commented:
use the "-d" switch.... It makes first contact, and doesnt wait for it to be finished. Doesnt work with the interactive switch though....

" -d         Don't wait for process to terminate (non-interactive)."

psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.43 C:\SDWS.exe
psexec.exe -accepteula -e -i -n 1 -u <username> -p <password> \\192.168.100.211 C:\SDWS.exe
0
 
fwecoadminAuthor Commented:
i'll try both, then get back to you all
0
 
fwecoadminAuthor Commented:
yea, making a list of commands seems to get the gob done. thanks!
0
 
johnb6767Commented:
Easier way... Populate a text file called PCNames.txt with every PCName in the org.... Save it as C:\PCNames.txt

psexec.exe @C:\PCNames.txt -e -i -n 1 -d -u <username> -p <password> C:\SDWS.exe

Dont need the accept eula switch after the first time.....

It will go through each pc listed in the txt file, and if it launches, it will move on and give you the process ID
If it fails, it will report it, and move on using the -d switch.....
0
All Courses

From novice to tech pro — start learning today.