@echo off
rem 多开之前先关闭所有微信进程
taskkill /F /IM WeChat.exe /T >nul 2>nul
set programName=wechat.exe
echo ------------多开之前确认已经安装好了微信--------------
echo.
@echo off
for /f "skip=2 tokens=1,2*" %%A in ('reg query "HKEY_CURRENT_USER\Software\Tencent\WeChat" /v InstallPath') do (
set "InstallPath=%%C"
)
if "%InstallPath%"=="" (
goto inputFilePath
) else (
set InstallPath=%InstallPath%\%programName%
goto startProgram
)
:inputFilePath
echo 未检测到微信安装路径。如果更改了微信安装路径请直接输入快捷方式链接或者wechat.exe软件路径
echo 例:C:\Program Files\Tencent\WeChat\WeChat.exe 或 C:\Users\Public\Desktop\微信.lnk
echo.
set /p InstallPath=请输入:
:startProgram
echo 启动微信~~
echo 软件安装路径是 %InstallPath%
rem 修改此处控制微信多开数量
for /L %%i in (1,1,2) do (
rem echo %%i
start "" "%InstallPath%"
)
:program_exit
pause