锅炉信息网 > 锅炉知识 > 锅炉资讯

navicat16 试用期到期

发布时间:

navicat无限重置14天方法-windows_mob604756ebed9f的技术博客_51CTO博客体验Navicat Premium 16,无限重置试用14天方法(附源码)代

navicat无限重置14天方法-windows_mob604756ebed9f的技术博客_51CTO博客体验Navicat Premium 16,无限重置试用14天方法(附源码)

代码修改法代码(python)

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

打包为exe,可以发送给没有python环境的人

pyinstaller -F xxx.py

上一篇:nagito

下一篇:navicat 绿化版

精选推荐

  • 如何正确选择白板供应商
    如何正确选择白板供应商

    目前在无锡想采购一块白板不管是实体店铺,还是网络平台都有很多选择,想要到专业的无锡白板公司采购还需要掌握一定的方式技巧。现

  • 柴油发电机组供应商
    柴油发电机组供应商

      t 扬州华东动力机械有限公司,位于江苏省扬州市江都区仙城工业园,是专业从事发电机、柴油及燃气发电机组研发、制造、销售、服务于

  • 高温辐射炉
    高温辐射炉

    5.2.2高温辐射炉5.2.2.1温度控制★(1)样品温度范围:常温~1400℃。★(2)均温区:长度不小于80mm。★(3)中心区:长度不小于10mm。(4)温度梯度(均

  • 高压锅在什么情况下会爆炸?
    高压锅在什么情况下会爆炸?

    近日,多地发生高压锅爆炸事故,给不少家庭带来了伤害和财产损失。那么,什么情况下会导致高压锅爆炸呢?首先,当高压锅内部压力过高时,如果

0