Sh500 Posted August 27, 2014 Posted August 27, 2014 Hi all, New to this forum and indeed SCCM. I have managed to setup a one site SCCM deployment. 'Application' deployments seem to be working fine and as expected. All clients will Windows 7 64 bit. I am still testing things at the moment. My latest application to be installed is PDF Creator. I have installed this via a 'manual scripted' method as an 'Application'. This seems to install fine on the test clients. As far as I am aware there is no official MSI for this program, so I thought I'd try to uninstall the software, via the following .cmd script: "C:\Program Files (x86)\PDFCreator\unins000.exe" /verysilent /SUPPRESSMSGBOXES /NORESTART This works fine when run manually but I cannot seem to get it working via SCCM. I have searched the net and there has been discussion about batch scripts and system rights, etc. Perhaps it's something to do with 'what folder the script needs to execute? Can someone please let me know, the full and proper procedure using SCCM 2012 to uninstall this program. Many thanks.
free780 Posted August 27, 2014 Posted August 27, 2014 In the path to the uninstall exe (within the deployment type) make sure you enter its as it would be on a 32 bit is. Then tick the box that says this is a 32 bit program on a 64 bit is. Sorry I can't remember the exact wording.
mac_shinobi Posted August 28, 2014 Posted August 28, 2014 (edited) @Arthur / @wagnerk / @SYNACK Found some articles via google but then found the uninstall string for PDF Creator which shows the same as what Sh500 is already using and when I tried to use msiexec /uninstall or similar I kept getting error messages Just wondering if you could shed some light on how to remove PDF Creator Edited August 28, 2014 by mac_shinobi 1
Sh500 Posted August 28, 2014 Author Posted August 28, 2014 In the path to the uninstall exe (within the deployment type) make sure you enter its as it would be on a 32 bit is. Then tick the box that says this is a 32 bit program on a 64 bit is. Sorry I can't remember the exact wording. Yep, I have that boxed checked already.
free780 Posted August 28, 2014 Posted August 28, 2014 Is the path to c:\program files or ℅programfiles℅
Sh500 Posted August 28, 2014 Author Posted August 28, 2014 I've tried both of them, as well as C:\Program Files (x86)
Sh500 Posted August 28, 2014 Author Posted August 28, 2014 I am guessing I am missing out something fundamental in deploying a batch script via SCCM in general. Like I say, the 'uninstall.cmd' script that I have works fine when executed manually on the client PC.
mac_shinobi Posted August 28, 2014 Posted August 28, 2014 Is there some way to ensure that it runs with elevated access rights and would it make any difference if it is a .bat instead of a .cmd ?
Arthur Posted August 28, 2014 Posted August 28, 2014 Is there some way to ensure that it runs with elevated access rights SCCM should run the batch file under the SYSTEM account. would it make any difference if it is a .bat instead of a .cmd? Extremely unlikely. I thought I'd try to uninstall the software, via the following .cmd script: "C:\Program Files (x86)\PDFCreator\unins000.exe" /verysilent /SUPPRESSMSGBOXES /NORESTART If your batch file consists of just that command, you would be better off avoiding using batch files altogether and put the entire command in the "Uninstall program" box (similar to what is shown below). 1
Sh500 Posted August 28, 2014 Author Posted August 28, 2014 @Arthur, Entering the command directly does 'seem' to remove the software- but the client has a 'Removal Failed' as the status: As far as I can see from the client, it has removed all directories - and in this case the PDF Creator instance in 'Devices and Printers' too.
free780 Posted August 28, 2014 Posted August 28, 2014 Its probably the error code at the end of the uninstall. You can make sccm ignore behaviour based on exit code in the deployment type.
Arthur Posted August 29, 2014 Posted August 29, 2014 Entering the command directly does 'seem' to remove the software - but the client has a 'Removal Failed' as the status: Error 0x87D00325 seems to be caused by the PDF Creator uninstaller (unins000.exe) launching another executable (%TEMP%\_iu14D2N.tmp) and then quiting. The second process is then used to remove everything in the %ProgramFiles(x86)%\PDFCreator folder (including unins000.exe). Because Windows doesn't allow programs to delete their own EXEs, the uninstaller creates and spawns a copy of itself in the TEMP directory. This "clone" performs the actual uninstallation, and at the end, terminates the original uninstaller EXE (at which point you get an exit code back), deletes it, then displays the "uninstall complete" message box (if it hasn't been suppressed with /SILENT or /VERYSILENT). SCCM thinks the uninstaller has completely finished when in fact it hasn't. The easiest solution is probably what @free780 suggested.
free780 Posted August 29, 2014 Posted August 29, 2014 Either that or it needs /sp- /SUPPRESSMSGBOXES as well. Also it may be the detection rule you have in place for the application. I usually go for the display version registry entry with. HKEY_LOCAL_MACHINE\software\microsoft\windows\pieceofsoftware This entry should be deleted when the application is.
Sh500 Posted August 29, 2014 Author Posted August 29, 2014 (edited) Its probably the error code at the end of the uninstall. You can make sccm ignore behaviour based on exit code in the deployment type. @free780 Can you explain how to do this please? I can see the default codes but not sure if they need to be modified or new ones added. I have just tried adding the extra 'suppress code' and changing the detection rule to a reg value. These still resulted in a 'software failure' message. On general note: Why is it that my .cmd script did not work and entering the code directly does? Is it something to with the script trying to run from a UNC path? I ask because, I tested a simple batch file that maps a network drive and that script also did not actually execute. It would just be good to know for future reference. Edited August 29, 2014 by Sh500
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now