Registering / Unregistering a Managed Service

Registering a Service

As you might have already found out, the class ServiceApplication offers the methods RegisterService and UnRegisterService.

Registering a Service is an optional feature, which has been included.
Executing this method will write service specific information to the registry.
"Executable"="\\Program Files\\ManagedServiceSample1\\ManagedServiceSample1.exe"

If not existing, an new Registry will be created under HKEY_LOCAL_MACHINE\Software\ManagedServices\. This is the basic key for all registered managed services.
This registry key creates a new service specific subkey. The name of the key is equal to your Services Guid.
ServiceState reflects your actual Services state. If it is changed to any other state and the Service has been registered before, the value will be changed as well in your registry. This helps external applications to monitor your service.
Executable contains the location of your services within the filesystem.
StartType shows, if the Service is to be started automatically (1) or manually (0). This information is used by the Managed Services launcher, which is part of the 1.0 Alpha 2 release.
If the property StartType of your Service is changed, and the Service has been registered previously, the value gets changed within the registry automatically.
The value ServiceName reflects the according named property within your Service.

Unregistering a Service

If a Service has been previously registered, the registered information gets deleted from the Registry.

Last edited Jun 5, 2008 at 9:19 AM by PeterNowak, version 5


Hemaivvala Jun 30, 2009 at 8:18 AM 
Hi ......
I have created a service and installed on Mobile successfully but i didn't get any entry at HKEY_LOCAL_MACHINE\Software\ManagedServices\.
Please tell me the solution.There is no way to debug also.I am helpless.Please help me