Skip to content
34 changes: 33 additions & 1 deletion tests/process/process.bat
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well you gotta START the apps first don't you? i'm pretty sure there's a way to start something in batch and then make it so it immediately continues. in fact you can even install stuff via winget and run it on that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4e83445. Now starting apps (notepad, calc, mspaint, cmd, powershell, win-witr) with start /B, waiting briefly with timeout, testing them, then cleaning up with taskkill. The pattern: start app → wait 1 sec → test with win-witr → kill app.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REM Test system processes that should always be running
win-witr winlogon.exe
win-witr lsass.exe
win-witr win-witr.exe
Expand All @@ -9,11 +10,42 @@ win-witr fontdrvhost.exe
win-witr svchost.exe
win-witr smss.exe
win-witr services.exe
win-witr MsMpEng.exe
win-witr powershell.exe
win-witr Runner.Listener.exe
win-witr cmd.exe
win-witr pwsh.exe
win-witr Runner.Worker.exe
win-witr hosted-compute-agent
win-witr conhost.exe
win-witr dwm.exe
win-witr RuntimeBroker.exe
win-witr SearchIndexer.exe
win-witr spoolsv.exe
win-witr taskhostw.exe
win-witr dllhost.exe

REM Start notepad and test it, then close
start /B notepad.exe
timeout /t 1 /nobreak >nul
win-witr notepad.exe
taskkill /F /IM notepad.exe >nul 2>&1

REM Start calc and test it, then close
start /B calc.exe
timeout /t 1 /nobreak >nul
win-witr calc.exe
taskkill /F /IM calc.exe >nul 2>&1

REM Start mspaint and test it, then close
start /B mspaint.exe
timeout /t 1 /nobreak >nul
win-witr mspaint.exe
taskkill /F /IM mspaint.exe >nul 2>&1

REM Start PowerShell and test it, then close
start /B powershell.exe -NoProfile -Command "Start-Sleep -Seconds 5"
timeout /t 1 /nobreak >nul
win-witr powershell.exe
taskkill /F /IM powershell.exe >nul 2>&1