Skip to content

Commit ea6c946

Browse files
committed
feat: close taskmanager on /silent
1 parent 6cbd1a3 commit ea6c946

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Uninstall Process Explorer.cmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Executi
3838
del /f /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk" > nul
3939

4040
:: Check if Task Manager is still broken
41+
4142
taskmgr.exe > nul 2>&1
4243
if %ERRORLEVEL% NEQ 0 (
4344
echo Warning: Task Manager is still not working, applying fallback fix...
44-
45+
4546
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe" /v "Debugger" /f > nul
4647
del /f /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk" > nul
4748
winget uninstall -e --id Microsoft.Sysinternals.ProcessExplorer --force --purge --disable-interactivity --accept-source-agreements -h > nul 2>&1
@@ -50,7 +51,10 @@ if %ERRORLEVEL% NEQ 0 (
5051
echo Fallback fix applied. Please restart your computer for the changes to take effect.
5152
pause
5253
)
53-
if "%~1"=="/silent" exit /b
54+
if "%~1"=="/silent" (
55+
exit /b
56+
taskkill /IM taskmgr.exe
57+
)
5458
echo Finished, changes have been applied.
5559
pause
5660
exit /b

0 commit comments

Comments
 (0)