summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbreadcat2020-07-15 15:49:16 +0100
committerbreadcat2020-07-15 15:49:16 +0100
commitcbc435904f100cbfbf0d795d0b475d68db508b3e (patch)
treeced8c842023bc48b9e61f4dd63a31e60a0c7e980
parent4472d706abb26237be00b9a007161a6e37e5eff1 (diff)
downloadwin10-prep-cbc435904f100cbfbf0d795d0b475d68db508b3e.tar.gz
win10-prep-cbc435904f100cbfbf0d795d0b475d68db508b3e.tar.bz2
win10-prep-cbc435904f100cbfbf0d795d0b475d68db508b3e.zip
Loop shortcut deletion
-rw-r--r--win10-prep.bat7
1 files changed, 1 insertions, 6 deletions
diff --git a/win10-prep.bat b/win10-prep.bat
index a7979a3..0f1306c 100644
--- a/win10-prep.bat
+++ b/win10-prep.bat
@@ -421,10 +421,5 @@ rd /s /q ".rsrc" && del ".data" ".rdata" ".reloc" ".text" "CERTIFICATE" "WebpCod
exit /b %errorlevel%
:cleanup
-if exist "%userprofile%\Desktop\*.lnk" del "%userprofile%\Desktop\*.lnk"
-if exist "%allusersprofile%\Desktop\*.lnk" del "%allusersprofile%\Desktop\*.lnk"
-if exist "%userprofile%\Desktop\*.appref-ms" del "%userprofile%\Desktop\*.appref-ms"
-if exist "%allusersprofile%\Desktop\*.appref-ms" del "%allusersprofile%\Desktop\*.appref-ms"
-if exist "%public%\Desktop\*.lnk" del "%public%\Desktop\*.lnk"
-if exist "%public%\Desktop\*.lnk" del "%public%\Desktop\*.lnk"
+for %%x in (%userprofile%\Desktop\*.lnk %allusersprofile%\Desktop\*.lnk %userprofile%\Desktop\*.appref-ms %allusersprofile%\Desktop\*.appref-ms %public%\Desktop\*.lnk) do if exist "%%x" del "%%x"
exit /b %errorlevel%