Dear User,
Based on the information provided, it seems that the uninstallation process of the Wazuh Agent version 4.7.2 did not completely remove all files and configurations, which could be interfering with the installation of version 4.9.2.
To resolve this issue, please follow the steps below:
Before starting please back up the installation folder to prevent configuration losses
1. --Verify and Remove Residual Files:
- Ensure there are no leftover files in `C:\Program Files (x86)\ossec-agent`. If you see folders like `upgrades` or files such as `ossec.conf.save`, delete them manually.
- Confirm that the "Wazuh Agent" service is not registered in the system by running the following command in an elevated Command Prompt:
cmd
sc delete WazuhAgent
2. --Clean the Windows Registry:
- Open the Windows Registry Editor (`regedit`) and search for entries related to `ossec-agent` or `Wazuh Agent`. Delete these entries.
- If you prefer, you can use a reliable registry cleaner tool to simplify the process.
3. --Reinstall the Agent:
- Run the MSI installer with administrative privileges. To capture installation logs for troubleshooting, use the following command in PowerShell:
PowerShell msiexec.exe /i PathToMSI/wazuh-agent-4.9.2.msi /q WAZUH_MANAGER='SERVER IP' WAZUH_AGENT_NAME='AGENT-NAME' /L*V install.log
- This will generate an `install.log` file in the same directory where you executed the command. Please share this log with us if the issue persists.
4. --Consider Using GPO Deployment:
- If you plan to deploy the agent using a Group Policy Object (GPO), ensure the system is completely clean before applying the policy to avoid conflicts.
5. -- Force the agent service:
Using the CLI execute: NET START WazuhSvc
Then check the log file in 'C:\Program Files (x86)\ossec-agent\ossec.log'
Please try these steps and let us know the results. Feel free to reach out if you have any additional questions.
Best regards,
Pedro Tolosa