Software Deployment Question
[ SCCM ] Software Application fails uninstallation on client
Hello,
We want make Autodesk AutoCAD Map 3D 2012 available on Software Center. I
already made an Application for it with 2 batch files:
- Install.cmd
- Uninstall.cmd
The installation of AutoCAD Map 3D 2012 is working perfectly. Everything is
silently installed.
I have some issues with the Uninstall.cmd. The CMD file contains the following
information:
@echo off
Set DPused=%~DP0%
if not exist C:\LogFiles MD C:\Logfiles
echo Un-installing AUTOCAD_2012Map3D_x64 and the related components
start /wait MsiExec.exe /X{086F9A69-CD39-4893-A9FB-D3A0634CE3F7} /qn
start /wait MsiExec.exe /X{65420DC9-306E-4371-905F-F4DC3B418E52} /qn
start /wait MsiExec.exe /X{8F0837C2-EE09-4903-88F3-1976FE7FFF4E} /qn
start /wait "" "C:\Program Files\Autodesk\AutoCAD Map 3D 2012\Setup\Setup.exe" /Q /P {5783F2D7-A002-0409-0102-0060B0CE6BBA} /R ACADMAP /language en-US
echo Errorlevel: %errorlevel%
On the clients in Software Center I am able to click “Remove”. After that the uninstallation starts. AutoCAD got 3 components + AutoCAD 2012 app. After 1 minute Software Center displays “Uninstallation Failed!”. If I check Programs & Features the 3 components is uninstalled, but AutoCAD 2012 app isn’t. If I wait another 3-5 minutes the app is uninstalled. Everything is done correctly, but the Software Center doesn’t say so!
When I run
the script locally, CMD will open and showing: “Un-installing AUTOCAD_2012Map3D_x64 and the related components”. After
1 minute, the prompt is closed. If I check
Programs & Features, the 3 components are uninstalled. The AutoCAD app isn’t
yet. Waiting another 3-5 minutes, and AutoCAD app is also uninstalled
correctly.
AppForce log:
Context: Machine
Command line: Uninstall.cmd
Allow user interaction: No
UI mode: 0
User token: null
Session Id: 1
Content path: C:\Windows\ccmcache\1w
Working directory: ]LOG]!><time="11:33:54.672-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appcontext.cpp:85">
<![LOG[ Prepared working directory: C:\Windows\ccmcache\1w]LOG]!><time="11:33:54.694-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appcontext.cpp:189">
<![LOG[ Prepared command line: "C:\Windows\ccmcache\1w\Uninstall.cmd"]LOG]!><time="11:33:54.726-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appcontext.cpp:338">
<![LOG[ Executing Command line: "C:\Windows\ccmcache\1w\Uninstall.cmd" with user context]LOG]!><time="11:33:54.726-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:201">
<![LOG[ Working directory C:\Windows\ccmcache\1w]LOG]!><time="11:33:54.727-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:215">
<![LOG[ Post install behavior is BasedOnExitCode]LOG]!><time="11:33:54.766-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appcommon.cpp:1094">
<![LOG[ Waiting for process 144 to finish. Timeout = 120 minutes.]LOG]!><time="11:33:54.769-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:1958">
<![LOG[ Process 144 terminated with exitcode: 0]LOG]!><time="11:34:32.942-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:1967">
<![LOG[ Looking for exit code 0 in exit codes table...]LOG]!><time="11:34:32.943-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:505">
<![LOG[ Matched exit code 0 to a Success entry in exit codes table.]LOG]!><time="11:34:32.943-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appexcnlib.cpp:584">
<![LOG[ Performing detection of app deployment type AutoCAD Map 3D 2012 - Windows Installer (*.msi file)(ScopeId_DA8C07A7-D69A-49EE-AE24-E7DF263A2D24/DeploymentType_e4742c68-9abb-4b69-8987-4ae28ef4936b, revision 22) for system.]LOG]!><time="11:34:32.949-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appprovider.cpp:2148">
<![LOG[+++ Discovered application [AppDT Id: ScopeId_DA8C07A7-D69A-49EE-AE24-E7DF263A2D24/DeploymentType_e4742c68-9abb-4b69-8987-4ae28ef4936b, Revision: 22]]LOG]!><time="11:34:32.960-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="localapphandler.cpp:287">
<![LOG[++++++ App enforcement completed (38 seconds) for App DT "AutoCAD Map 3D 2012 - Windows Installer (*.msi file)" [ScopeId_DA8C07A7-D69A-49EE-AE24-E7DF263A2D24/DeploymentType_e4742c68-9abb-4b69-8987-4ae28ef4936b], Revision: 22, User SID: ] ++++++]LOG]!><time="11:34:32.994-60" date="10-26-2015" component="AppEnforce" context="" type="1" thread="2216" file="appprovider.cpp:2448">
The question is:
Why is
my Software Center saying Uninstall Failed, but if you wait 3-5 minutes, it is
correctly uninstalled? I used “start /wait” ?
Greetings,
Mark Veldman
Answer Chosen by the Author
Long & short? Use MSIEXEC to uninstall the main app.
Save time by emulating the SCCM deployment using PSExec and a VM with a saved snapshot of the installation.
Community Chosen Answer
-
If i open a Command Prompt and do the following command:
start /wait "" "C:\Program Files\Autodesk\AutoCAD Map 3D 2012\Setup\Setup.exe" /Q /P {5783F2D7-A002-0409-0102-0060B0CE6BBA} /R ACADMAP /language en-US
It says:
Un-installing AUTOCAD_2012Map3D_x64 and the related components
After 1 minute the prompt is closed. AutoCAD still exist on the SCCM client but after waiting 4-5 minutes everything pops away..
I didn't check the Event Viewer yet. First i need to fix an issue with our Task Sequence. After that i will re-image our test client and do an installation of AutoCAD. After that i will uninstall with the Software Center client en check out the AppEnforce log.
All Answers
After my mobile Crystal Ball Repair guy has been, maybe I'll be able to tell you. Meanwhile, run that command line again but add verbose logging:
/L*v [path to and name of log file]
After it fails, find the text 'Return value 3' in the log. The half-dozen or so lines above that text will detail what failed.
-
-
The log gives an return value of 3010. Which means the laptop needs a soft reboot.
The msiexec only deletes the AutoCAD 2012, but not the related components. -
Hi,
I tried to uninstall with the MSIEXEC and with the parameter /norestart but when the script starts uninstalling it kills Explorer.exe. I think it tries to reboot.
Please how to fix...
Greetings,
Mark
Script:
@echo off
Set DPused=%~DP0%
if not exist C:\LogFiles MD C:\Logfiles
echo Un-installing AUTOCAD_2012Map3D_x64 and the related components
start /wait MsiExec.exe /X{086F9A69-CD39-4893-A9FB-D3A0634CE3F7} /qn
start /wait MsiExec.exe /X{65420DC9-306E-4371-905F-F4DC3B418E52} /qn
start /wait MsiExec.exe /X{8F0837C2-EE09-4903-88F3-1976FE7FFF4E} /qn
start /wait MsiExec.exe /X{5783F2D7-A002-0409-0102-0060B0CE6BBA} /qn /norestart /L*v C:\Windows\Temp\AutoCAD2012UninstallLog.txt
echo Errorlevel: %errorlevel%
-
In the logs you see that RESTARTMANAGER is trying to restart, but by the /norestart commando it quits this job. But before it is stopped, the Explorer.exe is killed. Why? I don't know.
I already spend so much time to the uninstaller now. I chose to uninstall with the setup.exe with a timer of 720 seconds and its working perfectly...
Case closed :)
@echo off
Set DPused=%~DP0%
echo Un-installing AUTOCAD_2012Map3D_x64 and the related components
start /wait MsiExec.exe /X{086F9A69-CD39-4893-A9FB-D3A0634CE3F7} /qn
start /wait MsiExec.exe /X{65420DC9-306E-4371-905F-F4DC3B418E52} /qn
start /wait MsiExec.exe /X{8F0837C2-EE09-4903-88F3-1976FE7FFF4E} /qn
start /wait "" "C:\Program Files\Autodesk\AutoCAD Map 3D 2012\Setup\Setup.exe" /Q /P {5783F2D7-A002-0409-0102-0060B0CE6BBA} /R ACADMAP /language en-US
choice /t 720 /C X /D X > nul
echo Errorlevel: %errorlevel%
Comments