I have written windows service in vb.net that will read the registry entires from Current User. Code was working fine on windows application but same code is not working while trying to start the service. Its giving the following error
Could not start the FileConverter(name of my service) service on Local computer.
The service did not return an error. This could be an internal windows error or an internal service error. If the problem persists, contact your system administrator.
Here is my code:
<Assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, All:="HKEY_CURRENT_USER")>
Protected Sub InitializeService()
Dim rk As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\VB and VBA Program Settings\File Convertor\Inbox", False)
Dim cnt As Int32
cnt = rk.GetValue("Source") ' Source is the value under Inbox key
Thanks in advance