Terminate Batch Job Y\N

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
gymiv
Posts: 38
Joined: 10 Jul 2012 13:47

Terminate Batch Job Y\N

#1 Post by gymiv » 04 Mar 2013 15:01

I have the following code
set inputfile=c:\hostnames.txt
set psexecdir=c:\pstools\psexec.exe
set outputfile=c:\output.log



for /f %%i in (%inputfile%) do %psexecdir% -i 0 -s -accepteula \\%%i cmd.exe /c "\\server\program.exe -f -v" >> %outputfile% 2>&1



After each computer in hostnames.txt before it moves onto the next computer i get a "Terminate Batch Job Y\N". This is very annoying. Is there a way to prevent the Terminate Batch Job from coming up and just continue down my computer list?

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: Terminate Batch Job Y\N

#2 Post by Squashman » 04 Mar 2013 15:10

I would assume it is because of the -i option. Why do you need it to interact?
Did you try using the -d option?

gymiv
Posts: 38
Joined: 10 Jul 2012 13:47

Re: Terminate Batch Job Y\N

#3 Post by gymiv » 04 Mar 2013 15:28

I thought i needed that for PSEXEC. Do i not need it?

Post Reply