|
安装那里可以改成自动安装,比如:
- :installlocation
- set INSTALLLOCATION=
- set RegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7A37EA43-BF6F-4DB7-83DB-97AA19BF9408}_is1
- for /f "tokens=2,*" %%I in ('reg query %RegKey% /v InstallLocation') do set INSTALLLOCATION=%%J
- if defined INSTALLLOCATION if exist "%INSTALLLOCATION%drv\rxfcv.inf" goto displayversion
- set tmp_primo=%temp%\PrimoCache_install.tmp
- if exist %tmp_primo% goto installation_failed
- "PrimoCache.Srv.Mui.Setup.4.2.0.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
- echo installed..>%tmp_primo%
- goto installlocation
- if exist %tmp_primo% goto displayversion
- :install_primo
- echo installed..>%temp%\PrimoCache_install.tmp
- choice /d y /t:3 /n >nul
- :installation_failed
- del %tmp_primo%>nul 2>nul
- echo \033[91m未发现Primo Cache的安装文件夹。| cmdcolor
- echo.
- pause
- exit /b 2
- :displayversion
- del %tmp_primo%>nul 2>nul
- set DISPLAYVERSION=
复制代码 |
|