Wazuh-agent.exe

57 views
Skip to first unread message

Sreenivasa Reddy

unread,
Nov 25, 2019, 1:46:53 PM11/25/19
to ossec-list
Hi,
Just now,
i have compile and build the wazuh agent source code. And generated wazuh-agent. 3.10.2.exe. this exe is working as expected functionality like msi.
But in my requirement i need to run this wazuh agent exe in silent mode.
Can you please help me how to write silent mode command for this agent exe.

Jonathan Martín Varela

unread,
Nov 27, 2019, 4:26:35 AM11/27/19
to ossec-list
Hello Sreenivasa Reddy.

How are you? I've been studying your case, and I think I've found a possible solution.

Try executing the following command on powershell as administrator:

Start-Process -Wait -FilePath 'YOUR_PATH_TO_.EXE' -ArgumentList '/S'

This command runs the installer silently (/S) and waits for the process to finish (-Wait).

You can find more information in this link https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-6.

I hope it works for you!

Best regards.

Jonathan M.V

Sreenivasa Reddy

unread,
Dec 5, 2019, 1:12:54 PM12/5/19
to ossec-list
Yes, its working as expected. But also need how to uninstall in silent mode
wazuh-agent-3.10.exe /S
can u plese help me.

Jonathan Martín Valera

unread,
Dec 11, 2019, 4:33:13 AM12/11/19
to ossec-list
Hello Sreenivasa Reddy.

Sorry for the late response.

The silent uninstall can be done like the silent installation. In the wazuh agent file directory, there is an uninstaller named uninstall.exe. Run that file silently like you did in the installation. For example, I have managed to uninstall with the following command:

Start-Process -Wait -FilePath '<WAZUH_AGENT_PATH>\uninstall.exe' -ArgumentList '/S'

Note: In my configuration, I have windows account control setting (UAC) disabled to avoid the consent prompt. Sometimes it may not be recommended to disable this option. You can see more information here https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works

To disable it, you can press Windows + R and type the command: UserAccountControlSettings .You can disable it as shown in the following image.

uac.png



I would like to know if you found this answer useful.

Greetings.

Jonathan M.V
Reply all
Reply to author
Forward
0 new messages