1
我需要从所有分支机器(32bit & 64位)中删除一个程序,并使用所有机器的注册表修复软件重新安装和更新该软件的版本。似乎并不困难,但我试图使用批处理文件(可能是最简单的)来做到这一点,我坚持检查操作系统版本的一部分。软件删除/使用批处理文件的全新安装
我可以得到一些帮助吗?这里是批次; 几个指针;
- 检查错误说法是因为我得到一个Windows安装程序错误
- 的删除目录语句不工作不知道为什么,所以我可能只是倾倒。
代码:
echo off
:CheckOS (this part not done)
IF EXIST "%PROGRAMFILES(X86)%" (GOTO disconnect) ELSE (GOTO Fincentric check)
if exist r:\ goto disconnect
:disconnect
net use r: /d
net use r: \\a0363sfp06\rfsnt
pause
:check
if exist c:\%programfiles%\Fincentric\CAMNet goto remove01 else
if exist c:\%programfiles%\Fincentric\BridgeNET v2.3.0 goto remove02 else
if exist c:\%programfiles%\Fincentric\CAMPlugins goto remove03 else
if exist c:\%programfiles%\Fincentric\Canvas goto remove04 else
if exist c:\%programfiles%\Fincentric\Platform goto remove05 else
if exist c:\%programfiles%\Fincentric\SupportLibraries goto remove06 else
:remove01
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBCAMNet_CGI.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:remove02
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBBridgeNET.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:remove03
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBCAMPlugins.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:remove04
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBCanvas.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:remove05
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBPlatform.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:remove06
start /wait msiexec /quiet /qr /uninstall R:\WBDK\WBSupportLibraries.msi
if %ERRORLEVEL% EQU 1721 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
:Fincentric check
cls
echo Checking if Fincentric folder still exist....
if exist c:\%PROGRAMFILES(X86)%\Fincentric
TIMEOUT /T 3 /NOBREAK
del /S /Q "c:\Program Files"\fincentric goto alldone
pause
:alldone
echo WDBK 5 has been remove...
TIMEOUT /T 1
exit
rem :remove07
rem :remove
rem :remove