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