@echo off chcp 65001 >nul :: 强制切换为UTF-8编码[2](@ref)
@echo off title 微信多开助手(注册表路径自适应版)
:: 自动获取微信安装路径(优先注册表查询) set "wechatPath=" for /f "tokens=2*" %%a in ('reg query "HKCU\Software\Tencent\WeChat" /v InstallPath 2^>nul') do set "wechatPath=%%b\WeChat.exe"
:: 路径有效性验证 if not exist "%wechatPath%" ( echo 自动获取路径失败,尝试默认路径... set "wechatPath=C:\Program Files (x86)\Tencent\WeChat\WeChat.exe" if not exist "%wechatPath%" ( echo 微信未安装在默认路径,请手动输入路径 set /p "wechatPath=请输入WeChat.exe完整路径:" if not exist "%wechatPath%"goto :error ) )