Programmatic uninstall of wazuh application

1,265 views
Skip to first unread message

Edward Stanford

unread,
Jan 12, 2018, 5:48:03 PM1/12/18
to Wazuh mailing list
We are happily installing wazuh on our Windows 8 embedded endpoints using https://github.com/wazuh/wazuh-ansible.

It is convenient, in our dev lab, to have an automated way to return to an "original" state.  We used to use the uninstaller in C:\Program Files\Ossec, but when we upgraded to 2.1.1, that changed.

We can easily remove wazuh from a given system using the Windows Control Panel.  What we want is a way to script that.

The wazuh-agent-installer.msi installer's help window refers to a "/uninstall" argument, but when we run

    wazuh-agent-installer.msi /uninstall

we get a "This patch package could not be opened" error.

Is there a recommended way to remove wazuh 2.1.1 on Windows?

Edward

Victor Fernandez

unread,
Jan 13, 2018, 6:03:09 AM1/13/18
to Edward Stanford, Wazuh mailing list
Hi Edward,

If you want to uninstall the MSI package, please try to use the wmic tool.

This is an example for Wazuh v2.1.1:

C:\Windows\system32>wmic product get name
Name
(...)
Wazuh Agent 2.1.1
(...)

C:\Windows\system32>wmic product where name="Wazuh Agent 2.1.1" call uninstall
Executing (\\WIN-NECNMD9IUBM\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{E9FE2433-BE5B-4294-B69C-407F3F377B70}",Name="Wazuh Agent 2.1.1",Version="2.1.1")->Uninstall()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};

This should remove the Wazuh Agent completely.

Hope it help.

Best regards,


Victor M Fernandez-Castro 
IT Engineer — Wazuh, Inc.

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/182b6f97-e8bb-4f1d-94ba-eed4bb2f0ac8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages