diff options
-rw-r--r-- | win10-prep.bat | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win10-prep.bat b/win10-prep.bat index 22dd235..4f78cd6 100644 --- a/win10-prep.bat +++ b/win10-prep.bat @@ -229,7 +229,8 @@ exit /b %errorlevel% :remove_software rem remove onedrive, remove explorer tree item -taskkill /f /im onedrive.exe +tasklist /FI "IMAGENAME eq onedrive.exe" 2>NUL | find /I /N "onedrive.exe">NUL +if "%ERRORLEVEL%"=="0" echo taskkill /f /im onedrive.exe if exist "%windir%\system32\onedrivesetup.exe" "%windir%\system32\onedrivesetup.exe" /uninstall if exist "%windir%\syswow64\onedrivesetup.exe" "%windir%\syswow64\onedrivesetup.exe" /uninstall reg delete "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f |