Setup & Deployment Wizard for Windows Services

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #1

    Setup & Deployment Wizard for Windows Services

    I'm trying to customize the setup and deployment wizard to install a service that has desktop interactivity. I'm aware of the standard code to do this:

    Code:
    Dim oKey As Microsoft.Win32.RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Services\MyService", True)
    If Not oKey.GetValue("Type") = Nothing Then oKey.SetValue("Type", (oKey.GetValue("Type") Or &h100))
    Now, the flag in the registry gets set just fine, but it doesn't appear to be taking properly. I still get the standard message complaining that desktop interactivity is not allowed until I uncheck the option and recheck it. Does it make a difference which of the installer methods I put this code in? If so, does anybody know at which stage of the program flow this needs to be set? Or am I just missing a step to ensure that a service is able to interact with the desktop that this short block of code doesn't take care of?

    I've had a look back through previous questions and the only information I can find is that which I already have.

    Cheers

    Either C# or VB is fine
Working...