|
@@ -0,0 +1,99 @@
|
|
|
+@setlocal enabledelayedexpansion
|
|
|
+@echo off
|
|
|
+
|
|
|
+@rem 要求以管理员方式启动
|
|
|
+bcdedit >nul
|
|
|
+if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
|
|
|
+:UACPrompt
|
|
|
+%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
|
|
|
+exit /B
|
|
|
+:UACAdmin
|
|
|
+cd /d "%~dp0"
|
|
|
+
|
|
|
+@set /a argumentNum=0
|
|
|
+@for %%a in (%*) do set /a argumentNum+=1
|
|
|
+@if %argumentNum% gtr 0 (
|
|
|
+ @echo argument count: %argumentNum%
|
|
|
+) else (
|
|
|
+ @echo no any arguments!
|
|
|
+)
|
|
|
+
|
|
|
+echo "[RVCTermianal] === Install Start === "
|
|
|
+
|
|
|
+tasklist /nh | find /i "spshell.exe"
|
|
|
+@if errorlevel 1 (
|
|
|
+ @echo [INFO] 可视柜台进程不存在,跳过
|
|
|
+) else (
|
|
|
+ @echo [INFO] 检测到可视柜台进程存在!5s 后将清理可视柜台相关进程
|
|
|
+ @for /l %%a in (1, 1, 5) do (
|
|
|
+ timeout 1 > nul
|
|
|
+ @echo %%a秒…… 如果不想清理可视柜台应用进程,请及时关闭此窗口!
|
|
|
+ )
|
|
|
+ @echo [INFO] 开始清理可视柜台相关进程……
|
|
|
+ TASKKILL /F /IM spshell.exe
|
|
|
+ TASKKILL /F /IM guardian.exe
|
|
|
+ TASKKILL /F /IM cefclient.exe
|
|
|
+
|
|
|
+ @for /f "tokens=1,2 delims= " %%a in ('tasklist /m ^| findstr "sphost.exe"') do (
|
|
|
+ @echo name=%%a, PID = %%b, and will kill it.
|
|
|
+ TASKKILL /F /PID %%a
|
|
|
+ )
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+@set ROOT=%cd%
|
|
|
+@set rvc_src_path_rvc_dir=%ROOT%\\rvc
|
|
|
+@set rvc_src_path_Run_dir=%ROOT%\\Run
|
|
|
+@set rvc_install_path_root=C:
|
|
|
+
|
|
|
+@if exist "D:\\" (
|
|
|
+ @echo "D:\\ exists!"
|
|
|
+ @if exist "D:\\Run\\version\\vtm.exe" (
|
|
|
+ @set rvc_install_path_root=D:
|
|
|
+ ) else (
|
|
|
+ @set rvc_install_path_root=D:
|
|
|
+ )
|
|
|
+) else (
|
|
|
+ @set rvc_install_path_root=C:
|
|
|
+)
|
|
|
+
|
|
|
+@echo rvc_install_path_root=%rvc_install_path_root%
|
|
|
+@echo rvc_src_path_Run_dir=%rvc_src_path_Run_dir%
|
|
|
+
|
|
|
+@set rvc_install_path_rvc_dir=%rvc_install_path_root%\\rvc
|
|
|
+@set rvc_install_path_Run_dir=%rvc_install_path_root%\\Run
|
|
|
+@set rvc_install_path_hardware_dir=%rvc_install_path_Run_dir%\\hardwarecfg
|
|
|
+@set rvc_install_path_versions_dir=%rvc_install_path_Run_dir%\\version
|
|
|
+
|
|
|
+@echo rvc_install_path_rvc_dir=%rvc_install_path_rvc_dir%
|
|
|
+@echo rvc_install_path_Run_dir=%rvc_install_path_Run_dir%
|
|
|
+@echo rvc_install_path_hardware_dir=%rvc_install_path_hardware_dir%
|
|
|
+@echo rvc_install_path_versions_dir=%rvc_install_path_versions_dir%
|
|
|
+
|
|
|
+@if not exist "%rvc_install_path_rvc_dir%" md "%rvc_install_path_rvc_dir%"
|
|
|
+@if not exist "%rvc_install_path_Run_dir%" md "%rvc_install_path_Run_dir%"
|
|
|
+@if not exist "%rvc_install_path_hardware_dir%" md "%rvc_install_path_hardware_dir%"
|
|
|
+@if not exist "%rvc_install_path_versions_dir%" md "%rvc_install_path_versions_dir%"
|
|
|
+
|
|
|
+@echo 【0/1】拷贝RVC目录...
|
|
|
+@xcopy %rvc_src_path_rvc_dir% %rvc_install_path_rvc_dir%\\ /E/Y/Q
|
|
|
+@echo 【1/1】拷贝RVC目录OK!
|
|
|
+
|
|
|
+
|
|
|
+@echo 【1/2】拷贝终端版本...
|
|
|
+@xcopy %rvc_src_path_Run_dir%\\hardwarecfg\\ %rvc_install_path_hardware_dir%\\ /E/Y/Q
|
|
|
+@xcopy %rvc_src_path_Run_dir%\\version\\ %rvc_install_path_versions_dir%\\ /E/Y/Q
|
|
|
+@echo 【2/2】拷贝终端版本OK!
|
|
|
+
|
|
|
+
|
|
|
+@echo 【2/3】 打开版本所在文件夹
|
|
|
+@start %rvc_install_path_versions_dir%
|
|
|
+
|
|
|
+@echo [INFO] 3s 后自动退出该执行脚本
|
|
|
+@for /l %%a in (1, 1, 3) do (
|
|
|
+ timeout 1 > nul
|
|
|
+ @echo %%a秒…… !
|
|
|
+ )
|
|
|
+@echo [INFO] 退出脚本,安装结束!
|
|
|
+@exit 0
|