forked from makara-dev369/Navicat-Premium16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset-navicat-16.3.x.bat
51 lines (45 loc) · 1.48 KB
/
reset-navicat-16.3.x.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
41
42
43
44
45
46
47
48
49
50
51
@echo off
setlocal
echo Reset Navicat remaining 14 days trial
echo.
set update=HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update
echo 1) Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update
echo delete: %update%
reg delete %update% /va /f
echo.
echo 2) Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration[version and language]
for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium" /s | findstr /L Registration"') do (
echo delete: %%i
reg delete %%i /va /f
)
echo.
echo 3) Delete folder including Info under HKEY_CURRENT_USER\Software\Classes\CLSID
for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\Classes\CLSID" /s | findstr /E Info"') do (
set "all_info=%%i"
)
if defined all_Info (
echo info: %all_info%
setlocal EnableDelayedExpansion
set "p_info=%all_info:~0,-5%"
echo delete: !p_info!
reg delete !p_info! /f
) else (
echo "no item found"
)
echo.
echo 4) Delete folder including ShellFolder under HKEY_CURRENT_USER\Software\Classes\CLSID
for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\Classes\CLSID" /s | findstr /E ShellFolder"') do (
set "all_ShellFolder=%%i"
)
if not "%all_ShellFolder%"=="" (
echo ShellFolder: %all_ShellFolder%
set p_ShellFolder=%all_ShellFolder:~0,-12%
) else ( echo "no item found" )
if not "%p_ShellFolder%"=="" (
echo delete: %p_ShellFolder%
reg delete %p_ShellFolder% /f
)
echo.
echo Finish, Enjoy it !
endlocal
pause