Message 1 of 3
Uninstall Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi...
I've created a network deploy of AutoCad 2014 for our school. Inside the network install folder is a text file with an unattended un-install script. Here is the script:
::The following command lines allow un-installing products that were installed using this admin image
:: Notes on suggested usage:
:: + Copy the commands to a batch file to execute.
:: + The commands must be run with Administrative Privileges, e.g. right-click when opening Command Prompt and accept UAC
::========================================================================================
::Prepare uninstallation's command-line options
::========================================================================================
::Set the output file for uninstallation's log data
::DEFAULT: a log file with the same filename but with extension .log
:: is created in the Windows temporary folder (environment variable TEMP)
set msi_log_file_path="%TEMP%\%~n0.log"
::Delete the current log file
if exist %msi_log_file_path% del /Q %msi_log_file_path%
::Set the path for the network log file
set network_log_folder="\\<FileServer>\AutoDesk2014Deployments64bit\Log\"
md %network_log_folder%
set network_log_file_path="%network_log_folder%%~n0_Admin.log"
echo ========================== %Date% %Time% =========================== >> %network_log_file_path%
echo Uninstallation Started on Computer Name: %COMPUTERNAME%, Username: %USERNAME%, Domain: %USERDNSDOMAIN% >> %network_log_file_path%
::DEFAULT: silent uninstallation
set non_silent_mode=/norestart /L*+ %msi_log_file_path% REMOVE=ALL REBOOT=ReallySuppress ADSK_SETUP_EXE=1
set silent_mode=/quiet %non_silent_mode%
set uninstallation_mode=%silent_mode%
::========================================================================================
::Helper Functions
::========================================================================================
goto END_FUNCTIONS_SECTION_
:BEGIN_FUNCTIONS_SECTION_
::---------------------------------
::Performs uninstallation and reports failure in the Network Log File
::---------------------------------
:funcUninstall
setlocal
set msi_ERROR_SUCCESS=0
set product_code=%~1
set product_name=%~2
msiexec /uninstall %product_code% %uninstallation_mode%
if %errorlevel%==%msi_ERROR_SUCCESS% goto SUCCESS_
:ERROR_
::------------------------------------------
::print out Machine Name, product code, product name
::to the network log file for the product that failed to uninstall
set uninstallation_result=Failed, Result=%errorlevel%
goto DONE_
:SUCCESS_
set uninstallation_result=Succeeded
goto DONE_
:DONE_
echo %Date% %Time% %USERNAME% %COMPUTERNAME% Uninstall %product_name% (Product Code: %product_code%) %uninstallation_result% >> %network_log_file_path%
endlocal
GOTO:EOF
:END_FUNCTIONS_SECTION_
::========================================================================================
::Uncomment (by removing the ::) the command lines below to uninstall products
::========================================================================================
::::== .NET Framework Runtime 3.5 SP1
::::Manual uninstallation only
::::== .NET Framework Runtime 4.0
::::Manual uninstallation only
::::== .NET Framework Runtime 4.0 KB2468871
::::Manual uninstallation only
::::== Microsoft Visual C++ 2008 SP1 Redistributable (x86)
::::Manual uninstallation only
::::== Microsoft Visual C++ 2008 SP1 Redistributable (x64)
::::Manual uninstallation only
::::== Microsoft Visual C++ 2010 SP1 Redistributable (x86)
::::Manual uninstallation only
::::== Microsoft Visual C++ 2010 SP1 Redistributable (x64)
::::Manual uninstallation only
::::== DirectX Runtime
::::Manual uninstallation only
::::== FARO LS 1.1.501.0 (64bit)
::::Manual uninstallation only
::::== MSXML 6.0 Parser
::::Manual uninstallation only
::::== Microsoft Windows Media Format 9.5 Series Runtime
::::Manual uninstallation only
::::== Microsoft Visual C++ 2008 SP1 Redistributable (x86) 9.0.30729.6161
::::Manual uninstallation only
::::== Microsoft Visual C++ 2008 SP1 Redistributable (x64) 9.0.30729.6161
::::Manual uninstallation only
::::== Autodesk Material Library 2014
call :funcUninstall {644F9B19-A462-499C-BF4D-300ABC2A28B1}, "Autodesk Material Library 2014"
::::== Autodesk Material Library Base Resolution Image Library 2014
call :funcUninstall {51BF3210-B825-4092-8E0D-66D689916E02}, "Autodesk Material Library Base Resolution Image Library 2014"
::::== Autodesk Content Service
call :funcUninstall {62F029AB-85F2-0000-866A-9FC0DD99DDBC}, "Autodesk Content Service"
::::== Autodesk Content Service Language Pack
call :funcUninstall {62F029AB-85F2-0001-866A-9FC0DD99DDBC}, "Autodesk Content Service Language Pack"
::::== AutoCAD 2014 - English
call :funcUninstall {5783F2D7-D001-0000-0102-0060B0CE6BBA}, "AutoCAD 2014 - English"
::::== AutoCAD 2014 Language Pack - English
call :funcUninstall {5783F2D7-D001-0409-1102-0060B0CE6BBA}, "AutoCAD 2014 Language Pack - English"
::::== AutoCAD 2014 - English
call :funcUninstall {5783F2D7-D001-0409-2102-0060B0CE6BBA}, "AutoCAD 2014 - English"
::::== Autodesk 360
call :funcUninstall {52B28CAD-F49D-47BA-9FFE-29C2E85F0D0B}, "Autodesk 360"
::::== SketchUp Import for AutoCAD 2014
call :funcUninstall {644E9589-F73A-49A4-AC61-A953B9DE5669}, "SketchUp Import for AutoCAD 2014"
::::== Autodesk ReCap
call :funcUninstall {31ABA3F2-0000-1033-0102-111D43815377}, "Autodesk ReCap"
::::== Autodesk ReCap Language Pack-English
call :funcUninstall {31ABA3F2-0010-1033-0102-111D43815377}, "Autodesk ReCap Language Pack-English"
::::== Autodesk App Manager
call :funcUninstall {C070121A-C8C5-4D52-9A7D-D240631BD433}, "Autodesk App Manager"
::::== Autodesk Featured Apps
call :funcUninstall {F732FEDA-7713-4428-934B-EF83B8DD65D0}, "Autodesk Featured Apps"The text file makes it sound like I can rename it from being a .TXT file to a .BAT file, execute that, and AutoCad and the associated programs will be uninstalled silently. The only problem is that turning the file into a .BAT file doesn't work. Is this script really a batch file or should it be a VBS or something similar?
Any help is greatly appreciated!