Need to start process ("runas") with waiting for results (like "CALL" or "start /wait").. But, how do that? Thx..
Now use this construction:
1:
FOR "skip=3 tokens=1" %%i IN ('tasklist') DO IF %%i equ %wayted_process% GOTO 1
%-) have a simplest solve?
RUNAS with wait for process exit.
Moderator: DosItHelp
Re: RUNAS with wait for process exit.
I never used it, but did you try
Regards
aGerman
Code: Select all
runas /user:XXXXX start "" /wait "xyz.exe"
Regards
aGerman
Re: RUNAS with wait for process exit.
runas /user:test "start /wait calc.exe"
File not found: "start /wait calc.exe"
File not found: "start /wait calc.exe"
Re: RUNAS with wait for process exit.
Of course. Have a look at the difference
Yours:
runas /user:test "start /wait calc.exe"
Mine:
runas /user:test start "" /wait "calc.exe"
Regards
aGerman
Yours:
runas /user:test "start /wait calc.exe"
Mine:
runas /user:test start "" /wait "calc.exe"
Regards
aGerman
Re: RUNAS with wait for process exit.
I tried that. Ofcourse RUNAS was return syntax error.
Re: RUNAS with wait for process exit.
Hmm, try to escape the quots.
runas /user:test "start \"\" /wait \"calc.exe\""
Otherwise write the entire path.
Regards
aGerman
runas /user:test "start \"\" /wait \"calc.exe\""
Otherwise write the entire path.
Regards
aGerman
Re: RUNAS with wait for process exit.
aGerman, no.. equivalently
Re: RUNAS with wait for process exit.
Strange. Let's wait for the "runas-experts".
Regards
aGerman
Regards
aGerman