summaryrefslogtreecommitdiffstats
path: root/win10-prep.bat
diff options
context:
space:
mode:
authorbreadcat2020-07-05 19:04:09 +0100
committerbreadcat2020-07-05 19:04:09 +0100
commit3c3a99c98f7750aa0a9a7e8546a8b782f83cada4 (patch)
tree9dc7a972bede2233a335e8f2e4729a71c689db01 /win10-prep.bat
parent01a0c7f6a6c35e8a6598e47e6228390d638ae883 (diff)
downloadwin10-prep-3c3a99c98f7750aa0a9a7e8546a8b782f83cada4.tar.gz
win10-prep-3c3a99c98f7750aa0a9a7e8546a8b782f83cada4.tar.bz2
win10-prep-3c3a99c98f7750aa0a9a7e8546a8b782f83cada4.zip
Suppress error on not-finding process
Diffstat (limited to 'win10-prep.bat')
-rw-r--r--win10-prep.bat3
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