From dcfcfcfc764a70337915ea299743c84b4b2c3f1e Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 12 Mar 2023 11:36:45 +0100 Subject: [PATCH] moved tasks scheduler deletions to admin section --- tools/logon.cmd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/logon.cmd b/tools/logon.cmd index 37062d5..03ad5c6 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -388,6 +388,14 @@ if %ERRORLEVEL% == 0 ( icacls "%STARTMENU_PUBLIC%\Administrative Tools\*" /grant Users:R 1>nul icacls "%STARTMENU_PUBLIC%\Accessories\*" /grant Users:R 1>nul + rem - sigh - this zombie (chrome) keeps coming back ... + echo Disabling chrome update tasks ... + powershell -Command "Get-ScheduledTask | where TaskName -like 'Google*' | Disable-ScheduledTask" + + rem same with OneDrive. This little sucker keeps coming back ... + echo removing OneDrive update task ... + powershell -Command "Get-ScheduledTask | Where-Object {$_.Taskname -match 'OneDrive Standalone Update'} | Unregister-ScheduledTask -Confirm:$false" + ) else ( rem =========== @@ -460,14 +468,6 @@ taskkill /f /im chrome.exe /FI "USERNAME eq %USERNAME%" 2>nul rd /S /Q %USERPROFILE%"\AppData\Local\Google\Chrome\User Data\Default\Cache" 2>nul del /F /Q %USERPROFILE%"\AppData\Local\Google\Chrome\User Data\Default\History*" 2>nul -rem - sigh - this zombie (chrome) keeps coming back ... -echo Disabling chrome update tasks ... -powershell -Command "Get-ScheduledTask | where TaskName -like 'Google*' | Disable-ScheduledTask" - -rem same with OneDrive. This little sucker keeps coming back ... -echo removing OneDrive update task ... -powershell -Command "Get-ScheduledTask | Where-Object {$_.Taskname -match 'OneDrive Standalone Update'} | Unregister-ScheduledTask -Confirm:$false" - echo. echo Other tasks and fixes for the user echo ########################################