Skip to content

Commit 5cebe06

Browse files
authored
Add files via upload
1 parent e669c6b commit 5cebe06

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

UnistallContext.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@echo off
2+
title UnistallContext
3+
4+
REM Проверка на запуск от имени администратора
5+
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
6+
if '%errorlevel%' NEQ '0' (
7+
title UnistallContext - Error
8+
echo Run this file as an administrator!
9+
pause>nul
10+
exit /b
11+
)
12+
13+
set "ExportTo=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ExportTo"
14+
set "SFA=HKEY_CLASSES_ROOT\SystemFileAssociations\.vtf\shell\ExportTo"
15+
16+
REM Точно стереть ассоциации?
17+
title UnistallContext - Waiting for input...
18+
echo [Y/N] - Uninstall context?
19+
choice /c yn /n
20+
if %errorlevel% == 1 (
21+
REM Удаляем
22+
title UnistallContext - Installing...
23+
REG DELETE "%ExportTo%JPG" /f
24+
REG DELETE "%ExportTo%BMP" /f
25+
REG DELETE "%ExportTo%PNG" /f
26+
REG DELETE "%ExportTo%TGA" /f
27+
REG DELETE "%SFA%" /f
28+
29+
REM Всё готово!
30+
title UnistallContext - Uninstalling complete!
31+
echo To delete the program files, simply delete the "%~dp0" folder
32+
echo For the changes to take effect, you may need to restart your computer!
33+
pause>nul
34+
) else (
35+
exit /b
36+
)

0 commit comments

Comments
 (0)