293 字
1 分钟
Navicat 试用重置脚本
既要有 Windows ,又要有 macOS ,我全都要!
警告所有脚本均来源互联网,仅供学习交流使用,请勿用于商业用途和非法用途。
兼容性支持当前文章发布日期
2025-12-25最新17.3.7版本,其他版本请自行测试。
TIP有能力的小伙伴请支持正版
Windows
echo Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Updatereg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update /fecho 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 ( reg delete %%i /va /f)
echo Delete Info and ShellFolder under HKEY_CURRENT_USER\Software\Classes\CLSIDfor /f "tokens=*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Classes\CLSID"') do ( for /f "tokens=*" %%l in ('reg query "%%a" /f "Info" /s /e ^| findstr /i "Info"') do ( echo Delete: %%a reg delete %%a /f ) for /f "tokens=*" %%l in ('reg query "%%a" /f "ShellFolder" /s /e ^| findstr /i "ShellFolder"') do ( echo Delete: %%a reg delete %%a /f ))macOS
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
echo "Detected Navicat Premium version $version"
case $version in "17") file=~/Library/Preferences/com.navicat.NavicatPremium.plist ;; "16") file=~/Library/Preferences/com.navicat.NavicatPremium.plist ;; "15") file=~/Library/Preferences/com.prect.NavicatPremium15.plist ;; *) echo "Version '$version' not handled" exit 1 ;;esac
echo -n "Reseting trial time..."
regex="([0-9A-Z]{32}) = "[[ $(defaults read $file) =~ $regex ]]
hash=${BASH_REMATCH[1]}
if [ ! -z $hash ]; then defaults delete $file $hashfi
regex="\.([0-9A-Z]{32})"[[ $(ls -a ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ | grep '^\.') =~ $regex ]]
hash2=${BASH_REMATCH[1]}
if [ ! -z $hash2 ]; then rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2fi
echo " Done"Navicat 试用重置脚本
https://bytemoe.com/posts/navicat-trial-reset-scripts/
