博客

  • python创建一个隐藏的后台进程,用于执行指定更换WIn10桌面背景图片的脚本

    任务管理器是看不到的,使用Process Explorer可以查看到这个进程。

    要使用ShellExecuteEx来启动进程,你需要从shell32库导入这个函数,并定义相应的结构体和参数。以下是如何在你的代码中使用ShellExecuteEx来替代CreateProcess的示例:

    首先,你需要定义SHELLEXECUTEINFO结构体,并设置适当的参数。然后,使用ShellExecuteEx函数来启动进程。

    步骤1: 定义SHELLEXECUTEINFO结构体

    import ctypes
    from ctypes import wintypes
    from ctypes.wintypes import DWORD, HANDLE, BOOL, WORD
    
    # 定义 SECURITY_ATTRIBUTES 结构体
    class SECURITY_ATTRIBUTES(ctypes.Structure):
        _fields_ = [
            ("nLength", wintypes.DWORD),
            ("lpSecurityDescriptor", wintypes.LPVOID),
            ("bInheritHandle", wintypes.BOOL),
        ]
    
    # 定义 SHELLEXECUTEINFO 结构体
    class SHELLEXECUTEINFO(ctypes.Structure):
        _fields_ = [
            ("cbSize", wintypes.UINT),
            ("fMask", wintypes.UINT),
            ("hwnd", wintypes.HWND),
            ("lpVerb", wintypes.LPCWSTR),
            ("lpFile", wintypes.LPCWSTR),
            ("lpParameters", wintypes.LPCWSTR),
            ("lpDirectory", wintypes.LPCWSTR),
            ("nShow", wintypes.INT),
            ("hInstApp", wintypes.HINSTANCE),
            ("lpIDList", wintypes.LPVOID),
            ("lpClass", wintypes.LPCWSTR),
            ("hkeyClass", wintypes.HKEY),
            ("dwHotKey", wintypes.DWORD),
            ("hIcon", wintypes.HANDLE),
            ("hProcess", wintypes.HANDLE),
        ]

    步骤2: 加载shell32库并定义ShellExecuteEx函数

    # 加载 shell32 库
    shell32 = ctypes.WinDLL('shell32', use_last_error=True)
    
    # 定义 ShellExecuteEx 函数
    ShellExecuteEx = shell32.ShellExecuteExW
    ShellExecuteEx.argtypes = [
        ctypes.POINTER(SHELLEXECUTEINFO),
    ]
    ShellExecuteEx.restype = wintypes.BOOL

    步骤3: 准备参数并调用ShellExecuteEx

    # 设置命令和参数
    src = r"C:\Users\rkey\Desktop\测试\更换桌面壁纸\change_wallpaper.py"
    command = f"cmd.exe /c python {src}"
    
    # 初始化 SHELLEXECUTEINFO 结构体
    sei = SHELLEXECUTEINFO()
    sei.cbSize = ctypes.sizeof(SHELLEXECUTEINFO)
    sei.fMask = 0x00000040  # SEE_MASK_NOCLOSEPROCESS
    sei.hwnd = None
    sei.lpVerb = None  # 不使用动词
    sei.lpFile = "cmd.exe"
    sei.lpParameters = f"/c {command}"
    sei.lpDirectory = None
    sei.nShow = 0  # SW_HIDE
    sei.hInstApp = 0
    
    # 调用 ShellExecuteEx
    if ShellExecuteEx(ctypes.byref(sei)):
        print("Process created successfully.")
    else:
        print("Failed to create process. Error code:", ctypes.get_last_error())
    
    # 等待进程结束
    # kernel32.WaitForSingleObject(sei.hProcess, -1)
    # 关闭进程句柄
    # kernel32.CloseHandle(sei.hProcess)

     

    注意事项
    错误处理:添加错误处理代码,以便在命令执行失败时获取更多信息。
    进程句柄:ShellExecuteEx函数执行后,sei.hProcess将包含新创建的进程的句柄。你可以使用这个句柄来等待进程结束或关闭句柄。
    这样,你就可以使用ShellExecuteEx来启动一个后台进程,而不会挂起。

     

    完整代码:

    import ctypes
    from ctypes import wintypes
    from ctypes.wintypes import DWORD, HANDLE, BOOL, WORD
    
    # 定义 SHELLEXECUTEINFO 结构体
    class SHELLEXECUTEINFO(ctypes.Structure):
        _fields_ = [
            ("cbSize", wintypes.UINT),
            ("fMask", wintypes.UINT),
            ("hwnd", wintypes.HWND),
            ("lpVerb", wintypes.LPCWSTR),
            ("lpFile", wintypes.LPCWSTR),
            ("lpParameters", wintypes.LPCWSTR),
            ("lpDirectory", wintypes.LPCWSTR),
            ("nShow", wintypes.INT),
            ("hInstApp", wintypes.HINSTANCE),
            ("lpIDList", wintypes.LPVOID),
            ("lpClass", wintypes.LPCWSTR),
            ("hkeyClass", wintypes.HKEY),
            ("dwHotKey", wintypes.DWORD),
            ("hIcon", wintypes.HANDLE),
            ("hProcess", wintypes.HANDLE),
        ]
    
    # 加载 shell32 库
    shell32 = ctypes.WinDLL('shell32', use_last_error=True)
    
    # 定义 ShellExecuteEx 函数
    ShellExecuteEx = shell32.ShellExecuteExW
    ShellExecuteEx.argtypes = [
        ctypes.POINTER(SHELLEXECUTEINFO),
    ]
    ShellExecuteEx.restype = wintypes.BOOL
    
    # 设置命令和参数
    src = r"C:\Users\rkey\Desktop\测试\更换桌面壁纸\change_wallpaper.py"
    command = f"cmd.exe /c python {src}"
    
    # 初始化 SHELLEXECUTEINFO 结构体
    sei = SHELLEXECUTEINFO()
    sei.cbSize = ctypes.sizeof(SHELLEXECUTEINFO)
    sei.fMask = 0x00000040  # SEE_MASK_NOCLOSEPROCESS
    sei.hwnd = None
    sei.lpVerb = None  # 不使用动词
    sei.lpFile = "cmd.exe"
    sei.lpParameters = f"/c {command}"
    sei.lpDirectory = None
    sei.nShow = 0  # SW_HIDE
    sei.hInstApp = 0
    
    # 调用 ShellExecuteEx
    if ShellExecuteEx(ctypes.byref(sei)):
        print("Process created successfully.")
    else:
        print("Failed to create process. Error code:", ctypes.get_last_error())
    
    # 等待进程结束
    # kernel32.WaitForSingleObject(sei.hProcess, -1)
    # 关闭进程句柄
    # kernel32.CloseHandle(sei.hProcess)

     

  • python打印多个当前安装的模块的版本

    modules = ["pywin32", "pandas", "matplotlib"]  # 替换为你要检查的模块名
    
    for module_name in modules:
        try:
            version = pkg_resources.get_distribution(module_name).version
            print(f"{module_name} version: {version}")
        except pkg_resources.DistributionNotFound:
            print(f"{module_name} is not installed.")

     

  • python指定一个文件夹的图片每10秒替换一次桌面图片

    pywin32库版本308

    import os
    import time
    import win32con
    import win32gui
    
    def set_wallpaper(image_path):
        # 设置桌面壁纸
        win32gui.SystemParametersInfo(win32con.SPI_SETDESKWALLPAPER, image_path, win32con.SPIF_UPDATEINIFILE | win32con.SPIF_SENDCHANGE)
    
    def change_wallpaper_every_10_seconds(folder_path):
        # 获取文件夹中所有图片文件的路径
        image_files = [os.path.join(folder_path, f) for f in os.listdir(folder_path) if f.endswith(('.jpg', '.jpeg', '.png', '.bmp'))]
        if not image_files:
            print("No image files found in the folder.")
            return
    
        # 循环更换壁纸
        while True:
            for image_file in image_files:
                set_wallpaper(image_file)
                print(f"Wallpaper changed to: {image_file}")
                time.sleep(10)  # 等待10秒
    
    # 设置图片文件夹路径
    folder_path = r"C:\Users\rkey\Pictures\Screenshots"  # 替换为你的图片文件夹路径
    change_wallpaper_every_10_seconds(folder_path)

     

  • tkinter学习

    root.attributes('-topmost', True):这行代码将窗口设置为始终置顶。

    root.overrideredirect(True):这行代码隐藏窗口边框。

  • python项目-trackerlist数据库

    因为要网上一个个查询bt种子的tacker列表,所以我自己弄了一个用来存储tracker的工具。

    默认用户名:admin,密码:admin,没有存在数据库中,改成自己需要的即可

    增删查都写好了,不需要改什么。信息不是太多,直接删除不需要的tracker链接,重新添加即可

    用的sqlite数据库,需要移动项目的时候直接把文件夹复制走即可

     

    templates\trackers_index.html

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>trackers</title>
    </head>
    <body>
        {% if session.logged_in %}
        <form action="/logout" method="get">
            <input type="submit" value="登出">
        </form>
        {% else %}
        <form action="/login" method="post">
            <input type="text" name="username" placeholder="用户名">
            <input type="password" name="password" id="password" placeholder="密码">
            <input type="submit" value="登录">
        </form>
        {% endif %}
        <main>
            <!-- flask的flash函数专用固定代码 专门用来显示内容的 -->
            {% for message in get_flashed_messages() %}         
                <div class="alert">{{ message }}</div>     
            {% endfor %}
        </main>
        <p>tracker总数量:{{count}}</p>
        <form action="/trackers_search" method="post">
            <input type="text" name="trackers_name" placeholder="请输入tracker关键字">
            <input type="submit" value="搜索">
        </form>
        {% if session.logged_in %}
        <!-- 登录表单,实际上用户已经登录,所以可以显示欢迎信息或其他内容 -->
        <form action="/trackers_add" method="post">
            <label for="trackers_name">trackers_add:</label>
            <input type="text" name="trackers_name" placeholder="请输入完整的tracker链接">
            <input type="submit" value="提交">
        </form>
        <form action="/trackers_delete" method="post">
            <label for="trackers_name">trackers_delete:</label>
            <input type="text" name="trackers_name" placeholder="请输入完整的tracker链接">
            <input type="submit" value="删除">
        </form>
        {% endif %}
    
        <hr>
        <div class="tracker_box scrollable-div">
            <form action="/get_trackers_as_text" method="get">
                <input type="submit" value="去复制,请使用Ctrl+A和Ctrl+C复制">
            </form>
            {% for i in trackers %}
            <ul style="list-style-type: none">
                <li>{{i.name}}</li>
            </ul>
            {% endfor %}
        </div>
    </body>
    </html>
    <style>
        * {
            margin:0;
            padding:0;
        }
        .scrollable-div {
            height: 800px; /* 或者你需要的高度 */
            overflow-y: auto; /* 内容超出时在 y 轴方向显示滚动条 */
            overflow-x: auto; /* 内容超出时在 x 轴方向显示滚动条 */
        }
    </style>

     

    app.py

    from flask import Flask, request, render_template, redirect, url_for, flash, session
    from flask_sqlalchemy import SQLAlchemy
    import os
    from datetime import datetime
    from flask_cors import CORS
    import secrets
    '''
    待实现:
    flash错误提示显示红色,警告信息显示黄色,成功显示绿色,使用div画出来
    '''
    
    app = Flask(__name__)
    # 为整个应用启用 CORS
    CORS(app)
    # 启用 CORS 并设置特定的域名
    #CORS(app, resources={r"/some_route": {"origins": "http://example.com"}})
    
    # 或者,允许所有域名访问所有路由
    CORS(app, resources={r"*": {"origins": "*"}})
    
    # 获取当前文件的路径
    basedir = os.path.abspath(os.path.dirname(__file__))
    # 设置数据库文件的路径为当前目录下的 data.db
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'data.db')
    #app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////data.db'
    
    app.secret_key = secrets.token_urlsafe()  # 用于保持会话安全,字符串随机即可
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False#模型修改的跟踪
    db = SQLAlchemy(app)
    
    class Trackers(db.Model):
       __tablename__= 'trackers'
       id = db.Column(db.Integer, unique=True, comment='id')
       name = db.Column(db.String(64), primary_key=True, comment='Trackers,主键')
       is_usable = db.Column(db.String(64), unique=False, comment='Tracker是否可用')
       create_date = db.Column(db.DateTime, unique=False, default=datetime.now(), comment='Tracker创建日期')
       update_date = db.Column(db.DateTime, unique=False, comment='Tracker更新日期')
       def __repr__(self):
          return '<Trackers %r>' % self.name
    
    def create_tables():
        with app.app_context():
            db.create_all()
    
    
    @app.route('/')
    @app.route('/trackers_index')
    def trackers_index():
        trackers = Trackers.query.order_by(Trackers.create_date.desc()).all()#倒序输出所有
        count = Trackers.query.count()#tracker总数量
        return render_template('trackers_index.html', trackers=trackers, count=count)
    
    
    @app.route('/get_trackers_as_text')
    def get_trackers_as_text():
        trackers = Trackers.query.all()
        lines = [f"{tracker.name}" for tracker in trackers]
        text = "<br>".join(lines)
        return text
    
    
    @app.route('/trackers_add', methods=['POST'], endpoint='add_announcement')
    def announcement_add():
        trackers_name = request.form['trackers_name']
        # 关键词列表
        keywords = ['announce', 'http', 'udp', 'https', 'wss']
        # 检查字符串是否包含列表中的任意关键词
        if contains_keywords(trackers_name, keywords) or trackers_name.endswith('announce'):
            print("提交信息中包含关键字")
        else:
            flash("你提交的可能不是tracker链接")
            return redirect(url_for('trackers_index'))
        exists = Trackers.query.filter_by(name=trackers_name).first() is not None
        if exists:
            flash('tracker 已经存在.')
        else:
            flash('tracker 不存在,已插入.')
            new_tracker = Trackers(name=trackers_name)
            db.session.add(new_tracker)
            db.session.commit()
        return redirect(url_for('trackers_index'))
    
    def contains_keywords(s, keywords):
        return any(keyword in s for keyword in keywords)
    
    @app.route('/trackers_delete/<int:trackers_name>', methods=['POST'], endpoint='delete_announcement_specific')
    def delete_announcement_specific(trackers_name):
        data = Trackers.query.filter_by(name=trackers_name).first()
        if data:
            db.session.delete(data)
            db.session.commit()
            flash(f'【{data}】已删除')
            return redirect(url_for('trackers_index'))
        else:
            return 'Tracker not found'
    
    @app.route('/trackers_delete', methods=['POST'], endpoint='delete_announcement')
    def delete_announcement():
        trackers_name = request.form.get('trackers_name') or request.view_args.get('trackers_name')
        if not trackers_name:
            return '什么都没输入,你删除啥呢!!!'
        data = Trackers.query.filter_by(name=trackers_name).first()
        if data:
            db.session.delete(data)
            db.session.commit()
            flash(f'{data}已删除')
            return redirect(url_for('trackers_index'))
        else:
            return f'数据库中不存在该数据!!!{trackers_name}'
        
    
    @app.route('/trackers_update/<int:trackers_name>', methods=['POST'], endpoint='update_announcement')
    def announcement_update(trackers_name):
        data = Trackers.query.filter_by(name=trackers_name).first()
        if data:
            data.name = request.form.get('name')
            data.is_usable = request.form.get('description')
            db.session.commit()
            flash('Data has been updated successfully.', 'success')
        else:
            flash('Data not found.', 'error')
        return redirect(url_for('trackers_index'))
    
    
    @app.route('/trackers_search', methods=['GET', 'POST'])
    def announcement_search():
        if request.method == 'POST':
            trackers_name = request.form.get('trackers_name')
            trackers = Trackers.query.filter(Trackers.name.like(f'%{trackers_name}%')).all()
            return render_template('trackers_index.html', trackers=trackers)
        return render_template('trackers_index.html')
    
    
    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            username = request.form['username']
            password = request.form['password']
            if username == 'admin' and password == 'admin':
                session['logged_in'] = True
                session['username'] = username
                flash("登陆成功")
                return redirect(url_for('trackers_index'))
            else:
                return '无效的用户名或密码'
        return redirect(url_for('trackers_index'))
    
    
    @app.route('/logout', methods=['GET', 'POST'])
    def logout():
        session.pop('logged_in', None)
        session.pop('username', None)
        return redirect(url_for('trackers_index'))
    
    
    if __name__ == '__main__':
        # 创建数据库
        create_tables()
        app.run(debug=True, host='0.0.0.0', port=5000)

     

  • 批处理获取所有注册表信息并存入到txt文件中

    @echo off
    setlocal

    :: 设置注册表信息保存的文件路径
    set REG_FILE=%UserProfile%\RegistryBackup.txt

    :: 导出HKEY_CURRENT_USER下的注册表信息
    reg export HKCU “%REG_FILE%” /y >nul

    :: 导出HKEY_LOCAL_MACHINE下的注册表信息
    reg export HKLM “%REG_FILE%” /y >nul

    :: 导出HKEY_USERS下的注册表信息
    for /f “tokens=3*” %%a in (‘reg query “HKU” /s /k ^| findstr /i “0x”‘) do (
    set USER_KEY=%%a
    set USER_NAME=%%b
    reg export “HKU\!USER_KEY!” “%UserProfile%\%USER_NAME%_RegistryBackup.txt” /y >nul
    )

    echo 注册表信息已导出到 %UserProfile%\RegistryBackup.txt
    endlocal
    pause

  • 注册表相关

    Steam

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Steam Client Service

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SteamStreamingMicrophone

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SteamStreamingSpeakers

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Steam Client Service

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SteamStreamingMicrophone

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SteamStreamingSpeakers

    VMware Workstation

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VMware, Inc.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMAuthdService

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMUSBArbService

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMware

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMware NAT Service

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMwareHostd

    Everything

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\voidtools

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Everything

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\Everything

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Everything

    Red Alert 2、红警2

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Westwood

    WinPcap

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinPcap

    Wireshark

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Wireshark

    XMind

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XMind Ltd\XMind

    ZeroTier

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ZeroTier

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ZeroTier, Inc.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZeroTierOneService

    百度云盘-BaiduNetdisk

    HKEY_CURRENT_USER\SOFTWARE\Baidu

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Baidu

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\BaiduNetdiskUtility

    apache-tomcat

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation

    NeatReader

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\bbff271c-caf8-5302-b3c6-6d9ee38f27e3

    Control Center

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HKClipSvc

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Control Center

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\HKClipSvc

    GameLAN-游戏联机助手

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cygwin

    Java

    HKEY_CURRENT_USER\SOFTWARE\JavaSoft

    HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@java.com/DTPlugin,version=11.181.2

    HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@java.com/JavaPlugin,version=11.181.2

    360相关

    HKEY_CURRENT_USER\SOFTWARE\360

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ComputerZ_x64

    360浏览器

    HKEY_CURRENT_USER\SOFTWARE\360Chrome

    Chrome浏览器

    HKEY_CURRENT_USER\SOFTWARE\Google

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\GoogleChromeElevationService

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\gupdate

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\gupdatem

    aardio

    HKEY_CURRENT_USER\SOFTWARE\Aardio

    Draw&Guess-游戏:你画我猜

    HKEY_CURRENT_USER\SOFTWARE\Acureus

    Adobe全家桶都在这里

    HKEY_CURRENT_USER\SOFTWARE\Adobe

    PL/SQL Developer 13-oracle数据库专用连接工具

    HKEY_CURRENT_USER\SOFTWARE\Allround Automations

    AmindPDF

    HKEY_CURRENT_USER\SOFTWARE\AmindPDF

    Android Studio

    HKEY_CURRENT_USER\SOFTWARE\Android Open Source Project

    傲软全家桶

    HKEY_CURRENT_USER\SOFTWARE\Apowersoft

    RGSSLVPN-锐捷网络

    HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\RGSSLVPN

    easyconnect-深信服

    HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Sangfor

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SangforDnsDrv_7,5,0,1

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SangforSP

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SangforTcpDrv_7,5,0,1

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SangforVnic

    Affogato-游戏:加吧劲魔女

    HKEY_CURRENT_USER\SOFTWARE\Befun

    哔哩哔哩直播

    HKEY_CURRENT_USER\SOFTWARE\bililive

    BitComet

    HKEY_CURRENT_USER\SOFTWARE\BitComet

    Warcraft III-游戏:魔兽争霸3

    HKEY_CURRENT_USER\SOFTWARE\Blizzard Entertainment

    bluestacks-蓝叠模拟器

    HKEY_CURRENT_USER\SOFTWARE\BlueStacksInstaller

    Clash Verge-vpn

    HKEY_CURRENT_USER\SOFTWARE\Clash Verge Rev

    coreldraw-画图工具,和p图工具的那个ps是一类产品

    HKEY_CURRENT_USER\SOFTWARE\Corel

    crystalidea公司-开发的工具有UninstaII Tool、AnyTolSO、Macs Fan Control、SpeedyFox

    HKEY_CURRENT_USER\SOFTWARE\CrystalIdea Software

    PotPlayer-视频播放器

    HKEY_CURRENT_USER\SOFTWARE\DAUM

    DBeaver-数据库链接工具

    HKEY_CURRENT_USER\SOFTWARE\DBeaver

    Autonauts vs Pirate Bots-游戏:奥拓星球:强敌

    HKEY_CURRENT_USER\SOFTWARE\Denki Ltd

    UltraISO

    HKEY_CURRENT_USER\SOFTWARE\EasyBoot Systems

    闪豆多平台视频批量下载器

    HKEY_CURRENT_USER\SOFTWARE\EasySetup

    Epic Games

    HKEY_CURRENT_USER\SOFTWARE\Epic Games

    Midi Player

    HKEY_CURRENT_USER\SOFTWARE\falcosoft

    finalshell

    HKEY_CURRENT_USER\SOFTWARE\finalshell

    易语言

    HKEY_CURRENT_USER\SOFTWARE\FlySky

    格式工厂

    HKEY_CURRENT_USER\SOFTWARE\FreeTime

    Geek

    HKEY_CURRENT_USER\SOFTWARE\Geek Uninstaller

     

    Photoshop_HornilStylePix-画图工具,就一个exe,点开就能用的那种

    HKEY_CURRENT_USER\SOFTWARE\Hornil

    火绒安全管家

    HKEY_CURRENT_USER\SOFTWARE\Huorong

    UltraEdit-文本编辑器

    HKEY_CURRENT_USER\SOFTWARE\IDM Computer Solutions

    Image-Line公司,旗下软件FL Studio

    HKEY_CURRENT_USER\SOFTWARE\Image-Line

    JetBrains全家桶-编程工具生产厂家

    HKEY_CURRENT_USER\SOFTWARE\JetBrains

    极速PDF

    HKEY_CURRENT_USER\SOFTWARE\JisuPdf

    Joymax,韩国游戏公司,旗下有一个silkroad游戏,中文是:丝绸之路

    HKEY_CURRENT_USER\SOFTWARE\Joymax

    Portal,游戏传送门

    HKEY_CURRENT_USER\SOFTWARE\Khronos

    wps,国产的office办公套件

    HKEY_CURRENT_USER\SOFTWARE\kingsoft

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\wpscloudsvr

    Oxygen Not Included,游戏:缺氧

    HKEY_CURRENT_USER\SOFTWARE\Klei

    腾讯游戏安全ACE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiCheatExpert Service

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ACE-SSC-DRV64

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\AntiCheatExpert Service

    Edge

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MicrosoftEdgeDevElevationService

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MicrosoftEdgeElevationService

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\MicrosoftEdgeElevationService

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\edgeupdate

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\edgeupdatem

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\edgeupdate

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\edgeupdatem

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MicrosoftEdgeDevElevationService

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MicrosoftEdgeElevationService

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Edge

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate

    MuMu模拟器

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MuMuVMMDrv

    phpStudy

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\phpStudySrv

    QQ相关

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\QQProtectX64

    向日葵远程桌面连接软件

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SunloginService

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OrayVGC

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SunloginService

    vivo

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vivoesService

    迅雷相关

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XLGuard

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XLServicePlatform

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XLWFP

    会声会影

    HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\Services\PSI_SVC_2

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\PSI_SVC_2

    PUBG-电脑版吃鸡

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ucldr_battlegrounds_gl

  • 删除SQL Server

    rem 停止服务
    net stop MSSQLServerADHelper100
    net stop MSSQL$SQLEXPRESS
    net stop SQLBrowser
    net stop MsDtsServer130
    net stop SQLWriter
    net stop SQLAgent$SQLEXPRESS

    rem 删除服务
    sc delete MSSQLServerADHelper100
    sc delete MSSQL$SQLEXPRESS
    sc delete SQLBrowser
    sc delete MsDtsServer130
    sc delete SSISTELEMETRY130
    sc delete SQLWriter
    sc delete SQLAgent$SQLEXPRESS

     

    Win+R打开运行界面,输入regedit,回车进入注册表编辑器

    删除HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application路径下的所有SQL开始的服务名称

    删除HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application注册表的所有SQL开头的所有

    删除HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\R-core整个项

    去环境变量里删除所有含有SQL Server的条目

    直接使用卸载软件强制删除,卸载软件会自动删除相关目录

  • .cab文件如何安装

    dism /online /add-package /packagepath:文件名.cab

    给个例子:

    dism /online /add-package /packagepath:C:\Users\rkey\Downloads\SRS_8.0.3.13000_1033.cab

  • 部署hyper-v-20230708.cmd

    创建一个.cmd文件,以内内容复制进去,双击运行

    pushd "%~dp0"
    
    dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
    
    for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    
    del hyper-v.txt
    
    Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL