|
@@ -31,7 +31,7 @@ cd /d "%~dp0"
|
|
|
@echo no any arguments
|
|
|
)
|
|
|
@set installType=@INSTALLSCRIPT_TYPE@
|
|
|
-echo [RVCTermianal] ========== Install Start ==========
|
|
|
+@echo [RVCTermianal] ========== Install Start ==========
|
|
|
@echo 安装脚本模式: %installType%
|
|
|
|
|
|
@set sysProductKey=
|
|
@@ -51,7 +51,7 @@ if "%sysProductKey%" == "" (
|
|
|
@set rvc_src_path_rvc_dir=%ROOT%\rvc
|
|
|
@set rvc_src_path_Run_dir=%ROOT%\Run
|
|
|
@set rvc_src_path_rvc_res_dir=%rvc_src_path_rvc_dir%\Resources
|
|
|
-@set rvc_install_path_root=C:
|
|
|
+@set rvc_install_path_root=%HOMEDRIVE%:
|
|
|
@set sysdisk=1
|
|
|
@set lnkPath=spexplorerauto.lnk
|
|
|
@set AutoStartDir=C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
|
|
@@ -89,11 +89,9 @@ tasklist /nh | find /i "spshell.exe"
|
|
|
@set rvc_install_path_root=D:
|
|
|
@set sysdisk=0
|
|
|
)
|
|
|
-) 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%
|
|
|
+@echo [DEBUG] rvc_install_path_root=%rvc_install_path_root%
|
|
|
+@echo [DEBUG] 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_rvc_res_dir=%rvc_install_path_root%\rvc\Resources
|
|
@@ -101,11 +99,11 @@ tasklist /nh | find /i "spshell.exe"
|
|
|
@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_rvc_res_dir=%rvc_install_path_rvc_res_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%
|
|
|
+@echo [DEBUG] rvc_install_path_rvc_dir=%rvc_install_path_rvc_dir%
|
|
|
+@echo [DEBUG] rvc_install_path_rvc_res_dir=%rvc_install_path_rvc_res_dir%
|
|
|
+@echo [DEBUG] rvc_install_path_Run_dir=%rvc_install_path_Run_dir%
|
|
|
+@echo [DEBUG] rvc_install_path_hardware_dir=%rvc_install_path_hardware_dir%
|
|
|
+@echo [DEBUG] rvc_install_path_versions_dir=%rvc_install_path_versions_dir%
|
|
|
|
|
|
@set RVCTerminalDirName=
|
|
|
@set RVCTerminalDirFullPath=
|
|
@@ -117,7 +115,7 @@ tasklist /nh | find /i "spshell.exe"
|
|
|
)
|
|
|
:GetRVCTerminalDirNameDone
|
|
|
@set RVCCurInstallVersion=%RVCTerminalDirName%
|
|
|
-@echo RVCCurInstallVersion=%RVCCurInstallVersion%
|
|
|
+@echo [DEBUG] RVCCurInstallVersion=%RVCCurInstallVersion%
|
|
|
|
|
|
@if exist %rvc_install_path_hardware_dir%\root.ini (
|
|
|
@echo [WARN] 存在root.ini文件,认为是存量安装,跳过版本清理操作
|
|
@@ -155,67 +153,68 @@ tasklist /nh | find /i "spshell.exe"
|
|
|
@set FileCount=0
|
|
|
@set desk_path=%USERPROFILE%\Desktop
|
|
|
@set desk_path_pub=C:\Users\Public\Desktop
|
|
|
-@echo desk_path=%desk_path%
|
|
|
+@echo [DEBUG] desk_path=%desk_path%
|
|
|
@if %installPure% equ 0 (
|
|
|
- @call :ColorText E0 "[WARN] 开发设备不自动设置壁纸"
|
|
|
+ @call :ColorText E0 "[WARN] 开发设备不清理桌面和设置壁纸,直接跳过"
|
|
|
@goto doNotRunUpdatePerEtc
|
|
|
)
|
|
|
|
|
|
-@echo [WARN] 清理桌面文件内容
|
|
|
+@echo [INFO] 清理桌面文件内容
|
|
|
@for /d %%a in (%desk_path%\*) do (
|
|
|
- @echo %%a
|
|
|
+ @echo [DEBUG] %%a
|
|
|
@rd /S /Q "%%a"
|
|
|
)
|
|
|
@for %%a in (%desk_path%\*) do (
|
|
|
- @echo %%a
|
|
|
+ @echo [DEBUG] %%a
|
|
|
@del "%%a"
|
|
|
)
|
|
|
@for /d %%a in (%desk_path_pub%\*) do (
|
|
|
- @echo %%a
|
|
|
+ @echo [DEBUG] %%a
|
|
|
@rd /S /Q "%%a"
|
|
|
)
|
|
|
@for %%a in (%desk_path_pub%\*) do (
|
|
|
- @echo %%a
|
|
|
+ @echo [DEBUG] %%a
|
|
|
@del "%%a"
|
|
|
)
|
|
|
|
|
|
-echo 清理桌面 此电脑 图标
|
|
|
+@echo [INFO] 清理桌面 此电脑 图标
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 1 /f
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 1 /f
|
|
|
-echo 清理桌面 回收站 图标
|
|
|
+@echo [INFO] 清理桌面 回收站 图标
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {645FF040-5081-101B-9F08-00AA002F954E} /t REG_DWORD /d 1 /f
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /v {645FF040-5081-101B-9F08-00AA002F954E} /t REG_DWORD /d 1 /f
|
|
|
-echo 清理桌面 网络 图标
|
|
|
+@echo [INFO] 清理桌面 网络 图标
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /t REG_DWORD /d 1 /f
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /t REG_DWORD /d 1 /f
|
|
|
-echo 清理桌面 控制面板 图标
|
|
|
+@echo [INFO] 清理桌面 控制面板 图标
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0} /t REG_DWORD /d 1 /f
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /v {5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0} /t REG_DWORD /d 1 /f
|
|
|
-echo 清理桌面 用户的文件 图标
|
|
|
+@echo [INFO] 清理桌面 用户的文件 图标
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /t REG_DWORD /d 1 /f
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /t REG_DWORD /d 1 /f
|
|
|
|
|
|
@echo [INFO] 清理桌面文件内容OK!
|
|
|
|
|
|
@set WallpaperPath=%rvc_install_path_rvc_res_dir%\WallPaper1920.png
|
|
|
-@set WallpaperPath2=%rvc_install_path_rvc_res_dir%\WallPaper1280.png
|
|
|
@if not exist C:\Windows\Web\Wallpaper\WallPaper1920.png (
|
|
|
@if exist "C:\Windows\Web\Wallpaper" (
|
|
|
@copy %WallpaperPath% C:\Windows\Web\Wallpaper
|
|
|
- @copy %WallpaperPath2% C:\Windows\Web\Wallpaper
|
|
|
@set WallpaperPath=C:\Windows\Web\Wallpaper\WallPaper1920.png
|
|
|
)
|
|
|
) else (
|
|
|
@echo [DEBUG] 指定壁纸已存在系统目录
|
|
|
@set WallpaperPath=C:\Windows\Web\Wallpaper\WallPaper1920.png
|
|
|
)
|
|
|
-@echo WallpaperPath=%WallpaperPath%
|
|
|
-@echo 通过注册表设置桌面壁纸
|
|
|
+@echo [DEBUG] WallpaperPath=%WallpaperPath%
|
|
|
+@echo [INFO] 通过注册表设置桌面壁纸
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d %WallpaperPath% /f
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_DWORD /d 2 /f
|
|
|
+@call :ColorText E0 "[WARN] 通过注册表设置桌面壁纸OK!(部分机器需要重启后才生效,请注意观察)"
|
|
|
+@echo 【3/3】设置系统桌面壁纸OK!
|
|
|
+
|
|
|
@rem taskkill /f /im explorer.exe
|
|
|
@rem cmd /c start explorer
|
|
|
-@echo [INFO] 隐藏系统任务栏
|
|
|
+@echo 【3/4】设置隐藏系统任务栏
|
|
|
@rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3" /v Settings /t REG_BINARY /d 01000000000000000000000000000000 /f
|
|
|
@rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 2 /f
|
|
|
@rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideTaskbar /t REG_DWORD /d 1 /f
|
|
@@ -223,7 +222,7 @@ reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_DWORD
|
|
|
@rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideTaskbar /t REG_DWORD /d 0 /f
|
|
|
@rem mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):a.Run""taskbar.exe /hide"",0,False:close")
|
|
|
|
|
|
-@echo [TODO] 隐藏系统任务栏功能还在测试验证中
|
|
|
+@call :ColorText E0 "【4/4】隐藏系统任务栏功能还在测试验证中(部分系统适用)"
|
|
|
@rem powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
|
|
|
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
|
|
|
|
|
@@ -231,9 +230,9 @@ RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
|
|
|
@rem powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
|
|
|
|
|
|
:doNotRunUpdatePerEtc
|
|
|
-@echo 【3/3】设置系统桌面壁纸OK!
|
|
|
|
|
|
-@echo 【3/4】设置可视柜台应用程序开机自启动
|
|
|
+
|
|
|
+@echo 【4/5】设置可视柜台应用程序开机自启动
|
|
|
@if %installType% neq 1 (
|
|
|
@if %installType% neq 4 (
|
|
|
@goto setAutoStartWithStartup
|
|
@@ -241,7 +240,7 @@ RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
|
|
|
)
|
|
|
@rem 生产安装和卸载模式才执行,通过注册表设置开机自启动
|
|
|
:setAutoStartWithRegist
|
|
|
-@echo 读取注册表信息,判断是否已经设置开机自启动,如果未设置或者之前设置为脚本自启动,修改为通过VTM.exe自启动
|
|
|
+@echo [DEBUG] 读取注册表信息,判断是否已经设置开机自启动,如果未设置或者之前设置为脚本自启动,修改为通过VTM.exe自启动
|
|
|
@set regFile=%TEMP%\rvc_spshellautostart.reg
|
|
|
@set regTmpFile=%cd%\rvckey.txt
|
|
|
@set explorerKey=
|
|
@@ -255,30 +254,30 @@ regedit /e %regFile% "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVe
|
|
|
)
|
|
|
@del %regFile%
|
|
|
@del %regTmpFile%
|
|
|
-@echo original explorer key:%explorerKey%
|
|
|
+@echo [DEBUG] original explorer key:%explorerKey%
|
|
|
@for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set explorerKey=%%explorerKey:%%i=%%i%%
|
|
|
-@echo explorer key:%explorerKey%
|
|
|
+@echo [DEBUG] explorer key:%explorerKey%
|
|
|
|
|
|
@if "%explorerKey%" == "explorer.exe" (
|
|
|
- @echo 检测到未设置为开机自启动模式
|
|
|
+ @echo [DEBUG] 检测到未设置为开机自启动模式
|
|
|
@set explorerNormal=1
|
|
|
) else if "%explorerKey%" == "d:\\run\\version\\vtm.exe" (
|
|
|
@call :ColorText 2F "检测到已设置为VTM.exe开机自启动模式"
|
|
|
@set needSetAutoStartFlag=0
|
|
|
) else if "%explorerKey%" == "wscript d:\\run\\version\\spexplorerfast.vbs" (
|
|
|
- @echo 检测到已设置为VBS脚本开机自启动模式
|
|
|
+ @echo [DEBUG] 检测到已设置为VBS脚本开机自启动模式
|
|
|
)
|
|
|
|
|
|
@if %installType% equ 1 (
|
|
|
@if %needSetAutoStartFlag% equ 1 (
|
|
|
- @echo 设置可视柜台应用程序开机自启动(同时屏蔽桌面)
|
|
|
- @echo 临时存储设置开机自启动的注册表脚本
|
|
|
+ @echo [DEBUG] 设置可视柜台应用程序开机自启动(同时屏蔽桌面)
|
|
|
+ @echo [DEBUG] 临时存储设置开机自启动的注册表脚本
|
|
|
@echo Windows Registry Editor Version 5.00 > %regFile%
|
|
|
@echo. >> %regFile%
|
|
|
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] >> %regFile%
|
|
|
@if %sysdisk% equ 1 ( echo "Shell"="c:\\run\\version\\vtm.exe" >> %regFile% ) else ( echo "Shell"="d:\\run\\version\\vtm.exe" >> %regFile% )
|
|
|
@echo "Shell1"="explorer.exe" >> %regFile%
|
|
|
- @echo 更新注册表!
|
|
|
+ @echo [DEBUG] 更新注册表!
|
|
|
regedit /s %regFile%
|
|
|
@del %regFile%
|
|
|
@rem @set poweroffPC=2
|
|
@@ -286,27 +285,27 @@ regedit /e %regFile% "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVe
|
|
|
)
|
|
|
@if %installType% equ 4 (
|
|
|
@if %explorerNormal% neq 1 (
|
|
|
- @echo 取消可视柜台应用程序开机自启动(同时恢复桌面)
|
|
|
- @echo 临时存储取消开机自启动的注册表脚本
|
|
|
+ @echo [DEBUG] 取消可视柜台应用程序开机自启动(同时恢复桌面)
|
|
|
+ @echo [DEBUG] 临时存储取消开机自启动的注册表脚本
|
|
|
@echo Windows Registry Editor Version 5.00 > %regFile%
|
|
|
@echo. >> %regFile%
|
|
|
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] >> %regFile%
|
|
|
@echo "Shell1"="d:\\run\\version\\vtm.exe" >> %regFile%
|
|
|
@echo "Shell"="explorer.exe" >> %regFile%
|
|
|
- @echo 更新注册表!
|
|
|
+ @echo [DEBUG] 更新注册表!
|
|
|
regedit /s %regFile%
|
|
|
@del %regFile%
|
|
|
@rem @set poweroffPC=2
|
|
|
)
|
|
|
- @echo 移除自启动文件
|
|
|
- @echo AutoStartDir=%AutoStartDir%
|
|
|
- @echo AutoStartDir2=%AutoStartDir2%
|
|
|
+ @echo [DEBUG] 移除自启动文件
|
|
|
+ @echo [DEBUG] AutoStartDir=%AutoStartDir%
|
|
|
+ @echo [DEBUG] AutoStartDir2=%AutoStartDir2%
|
|
|
@if exist "%AutoStartDir%\%lnkPath%" (
|
|
|
- @echo 移除自启动文件1
|
|
|
+ @echo [DEBUG] 移除自启动文件1
|
|
|
@del "%AutoStartDir%\%lnkPath%"
|
|
|
)
|
|
|
@if exist "%AutoStartDir2%\%lnkPath%" (
|
|
|
- @echo 移除自启动文件2
|
|
|
+ @echo [DEBUG] 移除自启动文件2
|
|
|
@del "%AutoStartDir2%\%lnkPath%"
|
|
|
)
|
|
|
@goto End
|
|
@@ -318,7 +317,7 @@ regedit /e %regFile% "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVe
|
|
|
|
|
|
@rem 移除旧有的可视柜台自启动快捷键(通过安装程序自动生成的)
|
|
|
@for %%i in ("%AutoStartDir2%\招商银行可视柜台*.lnk") do (
|
|
|
- @echo %%i
|
|
|
+ @echo [DEBUG] %%i
|
|
|
@del "%%i"
|
|
|
)
|
|
|
@set targetPath=%rvc_install_path_versions_dir%\vtm.exe
|
|
@@ -335,7 +334,7 @@ mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b1=a.CreateSho
|
|
|
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""startup"") & ""\%lnkPath%""):b.TargetPath=""%targetPath%"":b.WorkingDirectory=""%rvc_install_path_versions_dir%"":b.Description=""招行可视柜台终端应用"":b.Save:Set b1=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\可视柜台.lnk""):b1.TargetPath=""%targetPath%"":b1.WorkingDirectory=""%rvc_install_path_versions_dir%"":b1.Description=""招行可视柜台终端应用"":b1.Save:close")
|
|
|
|
|
|
:DoneAutostartSet
|
|
|
-@echo 【4/4】设置可视柜台应用程序开机自启动OK!
|
|
|
+@echo 【5/5】设置可视柜台应用程序开机自启动OK!
|
|
|
@goto End
|
|
|
|
|
|
:InstallError
|
|
@@ -361,7 +360,7 @@ mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShor
|
|
|
@echo 最小化到桌面
|
|
|
@rem MinimizeAll ToggleDesktop
|
|
|
mshta VBScript:Execute("Set a=CreateObject(""Shell.Application""):a.MinimizeAll:close")
|
|
|
-
|
|
|
+@rem @start %rvc_install_path_versions_dir%
|
|
|
:Done
|
|
|
@exit %ret%
|
|
|
|