Another (and better) method for scripting the removal of AutoCAD LT 2011. Works fine with deployment products like SMS, SCCM, etc.
@echo off
rem ****************************************************************
rem Filename..: remove.bat
rem Author....: skatterbrainz.blogspot.com
rem Date......: 10/13/2010
rem Purpose...: uninstall/cleanup AutoCAD LT 2011
rem ****************************************************************
CLS
SETLOCAL
SET APPNAME=acadlt_2011
SET LOG=%TMP%\%APPNAME%_uninstall.log
echo %DATE% %TIME% uninstalling %APPNAME%... >%LOG%
echo %DATE% %TIME% computer = %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% source = %~dps0 >>%LOG%
echo %DATE% %TIME% temp = %TMP% >>%LOG%
rem -----------------------------------------------
echo %DATE% %TIME% checking if application was previously installed... >>%LOG%
if exist "c:\Program Files\Autodesk\AutoCAD LT 2011\acadlt.exe" (
echo %DATE% %TIME% application has been installed >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing Autodesk Material Library 2011... >>%LOG%
msiexec /x {9DEABCB6-B759-4D52-92F8-51B34A2B4D40} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing AutoCAD LT 2011... >>%LOG%
msiexec /x {5783F2D7-9009-0409-0002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing AutoCAD LT 2011 Language Pack >>%LOG%
msiexec /x {5783F2D7-9009-0409-1002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% checking if ADR 2011 is installed... >>%LOG%
if exist "c:\Program Files\Autodesk\Autodesk Design Review\DesignReview.exe" (
echo %DATE% %TIME% installation was found, removing now... >>%LOG%
msiexec /x {8D20B4D7-3422-4099-9332-39F27E617A6F} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
) else (
echo %DATE% %TIME% Design Review 2011 was not found. >>%LOG%
)
) else (
echo %DATE% %TIME% AutoCAD LT 2011 was not found on this computer. >>%LOG%
exit /b 0
)
rem --------------------------------------------------
echo %DATE% %TIME% uninstall completed >>%LOG%
ENDLOCAL
exit /b %errorlevel%
No comments:
Post a Comment