-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDelete Nextcloud overlay icons (Windows).bat
40 lines (36 loc) · 1.84 KB
/
Delete Nextcloud overlay icons (Windows).bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
REM Delete all NC Keys, also old ones (OC Keys and Nextcloud Keys (Function checked for conflicting overlay identifiers: https://en.wikipedia.org/wiki/List_of_shell_icon_overlay_identifiers)
for /f "delims=" %%k in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers /f "" /k') do (
REM the Key OKShared is included with the Key OK
for %%v in ( NextcloudError NextcloudOK NextcloudSync NextcloudWarning OCError OCOK OCSync OCWarning ) do (
REM if a NC Key is found, it will be deleted
echo %%~nk|find "%%v" >nul
if errorlevel 1 (
REM Error or OK or OKShared or Sync or Warning not found
) else (
if exist "%%k" do (
reg delete "%%k" /f
)
)
)
)
:refresh
REM Restart Explorer
taskkill /f /im explorer.exe
start explorer.exe
cls
echo.
echo *****************************************************************************************************
echo * *
echo * *
echo * FINISHED *
echo * Nextcloud icons have been deleted *
echo * *
echo * Please report issues *
echo * https://github.com/Sim0nW0lf/Nextcloud-Shell-Overlays/ *
echo *****************************************************************************************************
echo.
:end
pause
exit