First use the command cd to the apache bin directory.
1. The command to uninstall the Apache service
httpd -k uninstall -n apache2.4
apache2.4 is the service name, depending on the actual situation
2. The command to install the Apache service
When installing, make sure that cmd is in utf-8 encoding format.
chcp 65001
Then enter:
httpd -k install -n apache2.2
At this point, the apache service should be installed.
At this time, run net start apache2.2 again
It should be fine.
Reward the sharer
With your support, we will be more motivated and do better, thank you.