HI AT ALL.
When I launching un batch it doesn't start.
When i take same string command in this batch and do copy and paste in prompt cmd it start.
Why?
Command is:
for /l %a in (1,1,10) do (echo 192.168.0.%a & psexec \\192.168.0.%a -u administrator -p prova wmic csproduct get name) >>c:\nomimacchina
This string if I launch in promt manually it start but if I save it in file .bat the windows open and disappears quickly without start.
I hope in answer
BATCH DOES NOT START
Moderator: DosItHelp
Re: BATCH DOES NOT START
In a command line FOR variables have one preceding percent sign (e.g. %a) while in a Batch script they need to have two (e.g. %%a).
Steffen
Steffen