That's a correct 'symptom solution', but is really unnecessary. If you un-install the previous standalone Apache and MySQL installations correctly, the un-install process will remove both the Windows Service Manager instances and those registry entries associated with the installations.
At that point you can simply check the 'svc' checkboxes in the XAMMP Control Panel, and the new (and correct) Service Instances will be created.
The only scenario where you would really need to change the path to executable, and do anything with the registry would be either:
A. The Standalone Apache and MySQL installations were manually deleted, leaving the registry entries and Service instances in place - so you must brute force clear them out.
B. You need to temporarily disable them to run XAMPP - and you wish to 'not break' the original installations.
REMEMBER - XAMPP is registry-agnostic. Other than thr XAMPP 'installer' itself, XAMPP makes no Windows registry entries. Everything is run through Command Line Interface calls embedded either in Batch Files (or scripts as penguin-heads would prefer) or calls made by the XAMPP Control Panel.
Good luck to all