New
#771
This can be used:
This is the another file (you can attach this in the code and create the file in Temp folderCode:::before the code ::paste the code here starting with echo start "%tmp%\output.bat" WMIC recoveros set autoreboot = false >%tmp%\output.log 2>&1 ::this will output the STDOUT and STDERR in another CMD window echo 1 >%tmp%\ready.log ::this will output the file in another CMD window ::In before the exit, this is the added code: Echo 2 >%tmp%\ready.log ::this will dictate the Another CMD to close Del %tmp%\output.log Del %tmp%\ready.log
- - - Updated - - -Code:@echo off :[0] if exist "%tmp%\output.log" ( goto [OutputExist] ) else ( goto [WaittoExist] ) :[OutputExist] set /p "ready=" <%tmp%\ready.log if "%ready%"=="0" (goto [OutputExist] ) if "%ready%"=="1" (goto [Ready] ) if "%ready%"=="2" (goto [Exit] ) :[WaittoExist] if exist "%tmp%\output.log" (goto [0] ) goto [WaittoExist] :[Ready] type %tmp%\output.log :[Exit] exit /b
I can improve this when I got PC opened tomorrow.