Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

How to change Windows Service Location

3.50/5 (2 votes)
27 Jun 2011CPOL 23.6K  
Few days back I was working on a windows service and deployed it on my development machine due to some reason I changed the executable file path of the service, but to run the service I need to reinstall the service because the installed service was pointing to old location and there was no GUI option on service from which I can change the location of service.

here is the trick to change the location of service without reinstalling it.
just type regedit on Run, Then go to following path
* HKEY_LOCAL_MACHINE
* SYSTEM
* CurrentControlSet
* Services
* Service_Name --- imagePath, just change the value of Image Path to new location.

Hope this helps

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)