Rumyhub

The place where stuff Happens

Creating a simple windows service in C#. Part 3

SimpleService.rar (26.75 kb)

This is the final part is on how to install our service to the system if you are using Windows XP you can do this by Opening CMD prompt finding the directory (debug folder in your project) using CD (change directory) and then type installutil SimpleService.exe.

To uninstall the service go to the directory by using the command prompt and then type installutil -u SimpleService.exe.

This method will not work with Windows 7 and some may not be able to install it if you did not install Visual Studio 2010.

If you have visual studio 2010, the IDE should have install the tools one of which is Visual Studio 2010 Command Prompt.

This found In Visual Studio 2010 > Visual Studio Tools >  Visual Studio Command Prompt (2010) don't forget to run as Administrator or you may not have enough privileges to install the service.

Like the command prompt go to the project directory (debug folder in you project) and the type installutil SimpleService.exe

If successful you should have a screen like so...


Can found in services manager... by accessing administrative tools in your control panel or simple writing services in start menu...

To uninstall the service go to the directory by using the  Visual Studio Command Prompt (2010)  and then type installutil -u SimpleService.exe. Don't forget always as an administrator.

 

blog comments powered by Disqus