无限重置Navicat Premium 16的试用天数(方法二) 您所在的位置:网站首页 idea试用到期可以重新安装吗 无限重置Navicat Premium 16的试用天数(方法二)

无限重置Navicat Premium 16的试用天数(方法二)

2024-07-12 20:00| 来源: 网络整理| 查看: 265

 前情

本来平常项目里用用Navicat For Mysql就基本足够用了,但是看到金闪闪的Navicat Premium图标,本人的DNA就动了。。。

看这贵气又不俗气的logo,难道你就不心动?

立刻去下载了Navicat Premium 16,可是只能试用14天。。。嗯,小场面,关于注册激活,网上有很多大佬分享了,无论是破解工具还是替换DLL,多如繁星,这里咱就不一一赘述了。不过其中有个大佬的无限试用的方式,成功引起了我的注意,原文指路:体验Navicat Premium 16,无限重置试用14天方法(附源码)

根据大佬的方法,我在本地试了一下,还挺好用,感兴趣的小伙伴也学起来吧~

 

步骤

一、下载安装Navicat Premium 16

下载和安装的步骤很简单,点击下一步一直到完成安装就行了,附上官网下载链接:https://navicat.com.cn/products

二、清除注册表

这里可以选择手动或脚本自动清除注册表,在上面提到的大佬的原博里都有详述,这里转载一下便于以后查找:

1、手动清除

1)系统搜索"注册表编辑器",找到以下位置HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{F849765A-E477-BEAE-5962-032BC822FDD5}\Info

提醒一下:不同系统红色ID 可能不一样哦~!

直接将 Info 目录删除即可!

 

 

 

 

2)再在HKEY_CURRENT_USER\SOFTWARE\PremiumSoft\NavicatPremium中,删除Registration16XCS和Update文件夹中的文件。

 

 

 

2、脚本清除注册表

按照大佬提供的python脚本执行,并将它添加到了定时任务中。

搬运来的脚本如下:

import winreg import os import time from collections import deque from typing import Any # root HKEY_CURRENT_USER = winreg.HKEY_CURRENT_USER # key path PREMIUM_PATH = r'Software\PremiumSoft' CLSID_PATH = r'Software\Classes\CLSID' def get_sub_keys(root: Any, reg_path: str) -> list: """This function will retrieve a list of sub-keys under the path of `root` + `reg_path`. Args: root(Any): Root registry. reg_path(str): The relative specific path under the root registry. Returns: The list of sub-keys. """ key_result = winreg.OpenKeyEx(root, reg_path) i: int = 0 sub_keys_list: list = list() while True: try: sub_keys = winreg.EnumKey(key_result, i) sub_keys_list.append(sub_keys) i += 1 except Exception as e: break return sub_keys_list def get_all_keys(root: Any, key_path: str) -> list: """Get the list of absolute path of all entries under the specified path through the deque. Args: root(Any): Root registry. key_path(str): The relative specific path under the root registry. Returns: A list of all entries under the keys. """ all_keys_list: list = list() qeque = deque() qeque.append(key_path) while len(qeque) != 0: sub_key_path = qeque.popleft() for item in get_sub_keys(root, sub_key_path): item_path = os.path.join(sub_key_path, item) if len(get_sub_keys(root, item_path)) != 0: qeque.append(item_path) all_keys_list.append(item_path) else: all_keys_list.append(item_path) return all_keys_list def main(): """The entry function to be executed. Returns: None """ clsid_all_keys_list = get_all_keys(HKEY_CURRENT_USER, CLSID_PATH) premium_all_keys_list = get_all_keys(HKEY_CURRENT_USER, PREMIUM_PATH) premium_sub_keys_list = [os.path.join(PREMIUM_PATH, item) for item in get_sub_keys(HKEY_CURRENT_USER, PREMIUM_PATH)] print(f"premium_sub_keys_list: {premium_sub_keys_list}") for clsid_item in clsid_all_keys_list: if "Info" in clsid_item: clsid_item_prefix = os.path.dirname(clsid_item) print(f"# Info item: {clsid_item}") winreg.DeleteKeyEx(HKEY_CURRENT_USER, clsid_item) winreg.DeleteKeyEx(HKEY_CURRENT_USER, clsid_item_prefix) # The outermost folder is not deleted. for premium_item in reversed(premium_all_keys_list): if "Servers" in premium_item: print(f"Tips: Servers => {premium_item} will not be deleted.") pass elif premium_item in premium_sub_keys_list: print(f"Tips: Servers => {premium_item} will not be deleted.") pass else: winreg.DeleteKeyEx(HKEY_CURRENT_USER, premium_item) if __name__ == "__main__": print("Start to delete registry...") main() print("Task done.", "Windows will closed after 5 seconds...", sep="\n") for i in range(5): time.sleep(1) print("*" * (i + 1))

 

定时任务:

1)在此电脑上右击打开“管理”--->任务计划程序--->(右侧)创建基本任务,进入创建基本任务向导,输入任务名称,例如:定时删除注册表

 

 

 

 

点击下一步

2)设置触发器。按自己需要设置周期和开始时间,这里选择的是从2021年1月1日8:00开始,每周六触发定时任务

 

 

 

 

 点击下一步

 

3)操作。

选择启动程序

 

 

 

填写启动程序和脚本路径,程序就是python.exe,参数就是py文件脚本路径

 

 

3)完成。最后确认一下任务明细,点击完成创建定时任务。

 

 这样就能定时清除注册表,无限试用Navicat Premium 16 啦~~

 

注意:

1、定时任务触发还有一些默认设置,譬如计算机不再空闲就停止任务,或是仅在电源充电的情况下触发呀,等等,可以在任务计划程序库里找到创建好的定时任务,按需更改配置;

2、如果不确定脚本是否可行,可以在打开试用Navicat Premium 16后,手动执行一下脚本

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有