Merge remote-tracking branch 'origin/main'

# Conflicts:
#	script/napcat.bat
This commit is contained in:
linyuchen
2024-04-15 22:31:18 +08:00
14 changed files with 278 additions and 109 deletions

View File

@@ -2,21 +2,17 @@
setlocal enabledelayedexpansion
chcp 65001
:loop_read
for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%a"
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 :napcat_boot
)
goto :loop_read
:napcat_boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
set "fileName=%%~na"
set "extension=%%~xa"
)
set "QQPath=!pathWithoutUninstall!QQ.exe"
set ELECTRON_RUN_AS_NODE=1
echo !QQPath!
!QQPath! ./napcat.cjs
"!QQPath!" ./napcat.cjs %*

View File

@@ -1,22 +1,17 @@
@echo off
setlocal enabledelayedexpansion
:loop_read
for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%a"
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 :napcat_boot
)
goto :loop_read
:napcat_boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
set "fileName=%%~na"
set "extension=%%~xa"
)
set "QQPath=!pathWithoutUninstall!QQ.exe"
set ELECTRON_RUN_AS_NODE=1
echo "!QQPath!"
"!QQPath!" %~dp0/napcat.cjs %*
echo !QQPath!
"!QQPath!" ./napcat.cjs %*