Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Create Software Uninstall Command for Any Software - Altiris CMS 7

Created: 08 Jul 2010 • Updated: 22 Jul 2010 | 7 comments
Language Translations
dlopes's picture
+8 8 Votes
Login to vote

This might seem a bit newbie for some of you guys, but for most CMS Admins Uninstall is a must, and not all softwares have MSI Installers so...

I discovered this method to uninstall almost any Software, that are listed under Windows "Add/Remove Programs", using the program {MSIGUID}, next I´m gonna explain the details on how to discover the software {MSIGUI} and then create an Uninstall command for the Software Package.

{MSIGUID} is an unique identifier for each software installed, and its unique in all clients

Now lets begin:

Step One: Install the desired software into a test client machine, in this particular case we will use Adobe Reader 9.1, after the software is installed, open regedit and navigate to the following Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, then you will have to locate your software, based on the right column, the field DisplayName shows the label as seen in "Add/Remove Programs", in our case the folder is selected below, note the DisplayName "Acrobat Reader 9.1".

uninstall_string.png

Notice the UninstallString field, there you can extract the correct product {MSIGUID} which we will use in the Software Uninstall Command, double click it to edit, like the window below, and copy the string.

Step Two: Create the Uninstall command in the Software Package previously created in the Notification Server, open the Console, then go to Manage > Software.

ns_step1.png

Now expand Software Catalog, and select Deliverable Software then select your Software Package, in our case Adobe Reader 9 (EN) then click the pencil icon to edit the package.

ns_step2.png

Now we´re going to edit the Package and add the Uninstall command using the {MSIGUID} we discovered before, select the Tab Package then click the button Add command to add a specific command into this Software Package.

ns_step3.png

Now for the Uninstall command we need to configure the Command Type to be Uninstall and the desired command line, in which we will insert our previous gathered {MSIGUID}, since we need the Uninstall command to be silent to the end user, we will need to add specific switches to the msiexec.exe to not display any user interface and also not to reboot the system, for that we will use the following switches:

MsiExec.exe /qn /x {AC76BA86-7AD7-1033-7B44-A91000000001} REBOOT=REALLYSUPRESS

Switches used:

/qn - Specify that no UI will be displayed in the client.
/x {MSIGUID} - Command switch /x to uninstall specific software defined by the {MSIGUID}.
REBOOT=REALLYSUPRESS - Force the client system not to reboot after uninstall.

Notice the Success code used is necessary otherwise the Software Task will shown as failure, since there's no success code informed, in this case the code is 3010, which I found after testing the package with the uninstall command and noticed that the software was indeed removed from the client, but still reported failure since Altiris assumes the success code is 0, and that change with different softwares.

ns_step4.png

Now let´s save our package and it´s ready for deliver :)

ns_step5.png

 Added a .XML file to create the report that show the UninstallString for the software after a full inventory of the computer(s).

Big thanks goes to Spanky_McSpank for the SQL query!! :)

Comments 7 CommentsJump to latest comment

andykn101's picture

In NS 6.0 if you specified a Success code (like 3010) you had to then specify '0' as well otherwise it would assume that 3010 was the only success code. Is this the case in NS7?

Authorised Symantec Consultant (ASC) with Endpoint Management Limited, an Authorised Symantec Delivery Provider based in the UK.

Connect Etiquette: Please "Mark as Solution" posts that fix your problem.

0
Login to vote
dlopes's picture

Hey andykn101,

In that article i was using NS 7.1 SP2 MR1, and that code is actually the success code for that uninstall, since it requires a reboot that it´s not performed, therefore it´s not a return=0 (success), but the uninstall works perfectly.

Att,
Daniel

Daniel Lopes de Oliveira
Technical Team Leader - Endpoint Management & Mobility

0
Login to vote
ecray's picture

Great Article.  The Uninstall String reg entry is also caputured by the Altiris Inventory Solution, so if you are running Client Management Suite, this information is  easily accessible.

0
Login to vote
Spanky_McSpank's picture

Here is the source sql to create a report in NS that will show you all the install strings for discovered software.

select DISTINCT
DisplayName,
DisplayVersion as 'Verion',
UninstallPath as 'Uninstall String'
from dbo.inv_addremoveprogram
where uninstallpath like 'msiexec%' order by displayname

+1
Login to vote
dlopes's picture

Thats a great report, tested it out today and worked like a charm, thanks!

Im gonna add the XML code for the report to add it to Altiris, with credits to you of course.

Daniel Lopes de Oliveira
Technical Team Leader - Endpoint Management & Mobility

0
Login to vote
Ambesh_444's picture

Hi,

Gr8 article Dlopes.

good luck for next..

Thank& Regards,

Ambesh

"Your satisfaction is very important to us. If you find above information helpful or it has resolved your issue. Please don't forget to mark the thread as solved."

0
Login to vote