安装器输入1之后提示系统找不到指定文件
Closed this issue · 2 comments
安装器内复制的文件名未更改 已经不使用安装器
可以试一下这个修改后的bat
@echo off&(cd/d "%~dp0")&(cacls "%SystemDrive%\System Volume Information" >nul 2>&1)||(start "" mshta vbscript:CreateObject^("Shell.Application"^).ShellExecute^("%~snx0"," %*","","runas",1^)^(window.close^)&exit /b)
chcp 936
cls
@echo off
if exist %SystemDrive%\Flags.txt (
del /f /q %SystemDrive%\Flags.txt
)
cd /d "%~dp0"
setlocal enabledelayedexpansion
FOR /F "TOKENS=*" %%I IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Tencent\QQ飞车\Sys" /v "PathRoot"') DO ( SET "GamePath=%%I" )
if "%GamePath%" == "" (
echo 未能找到飞车安装目录
goto stop
)
set GamePath=%GamePath:~18%
for /f "tokens=*" %%i in ("%GamePath%") do SET GamePath=%%i
:loop
echo GamePathRoot:%GamePath%
echo ---------------------------------
if exist "%GamePath%\Releasephysx27\QUSEREX.dll" (
echo 已经安装卡飘文件。
) else (
echo 未安装卡飘文件。
)
echo ---------------------------------
:MENU
echo 请选择您要执行的操作:
echo 1. 安装文件
echo 2. 卸载文件
set /p choice=请输入选项(1或2):
if "%choice%"=="1" goto INSTALL
if "%choice%"=="2" goto UNINSTALL
echo 无效选项,请重新输入。
goto MENU
:INSTALL
echo 正在安装文件...
copy QUSEREX.dll "%GamePath%\Releasephysx27\QUSEREX.dll"
echo 文件安装成功!
goto END
:UNINSTALL
echo 正在卸载文件...
del "%GamePath%\Releasephysx27\QUSEREX.dll"
echo 文件卸载成功!
goto END
:END
pause