You need to manually remove the agent service from the Windows Services.
1. Open a command prompt (Run as administrator)
2. Type the following command: sc delete "CA Workload Automation Agent (WA_AGENT)"
3. Reboot the server to complete the removal of the agent service
4. Run the agent installation again