-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathstart.bat
More file actions
50 lines (43 loc) · 1.23 KB
/
start.bat
File metadata and controls
50 lines (43 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
setlocal enabledelayedexpansion
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%b"
goto :boot
)
echo QQ installation not found
pause
exit
:boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
)
if not exist "%pathWithoutUninstall%dbghelp.dll" (
if not exist %~dp0SignerServer.dll (
echo SignerServer.dll not found
pause
exit
)
goto copydll
) else (
set /p Choice="dbghelp.dll already exists, do you want to replace it?(Y/N):"
if /i "!Choice!"=="Y" goto copydll
if /i "!Choice!"=="y" goto copydll
goto launch
)
:copydll
copy /y "%~dp0SignerServer.dll" "%pathWithoutUninstall%dbghelp.dll"
if errorlevel 1 (
set /p Choice="Copy error, do you want to attempt to running as administrator?(Y/N):"
if /i "!Choice!"=="Y" goto restart
if /i "!Choice!"=="y" goto restart
exit
)
goto launch
:restart
powershell Start-Process -FilePath cmd.exe -ArgumentList """/c pushd %~dp0 && %~s0 %*""" -Verb RunAs
exit
:launch
set "QQPath=!pathWithoutUninstall!QQ.exe"
set ELECTRON_RUN_AS_NODE=1
echo Launching QQ
"!QQPath!" "%~dp0load.js" %*