Error Message With Installer of C# Windows Service
Here is the error message: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869. The argument开发者_如何学Gos are: ErrorDialog,
I found another link related to the problem. The link here
Will cleaning the registry work. I tried the tool mentioned there but it needs registration.
Can this be resolved
This cannot be answered without knowing more about your installer and the context that you are installing it. Generally you aren't following MSI best practices and you are getting into a situation where you don't have the proper privs to do the install.
This really doesn't have anything to do with the fact that you have a service although if you are using an InstallUtil custom action consumed by an Visual Studio Deployment Project installer then your problem is probably that VDRPOJ is so broken it schedules deferred custom actions with impersonation instead of system context.
I have resolved my problem. It was a critical one really.
Here is what happened:
The service I wrote crashes soon after starting. While crashing, it probably holds onto few resources and hence when I try to uninstall it, it wont be removed from the list of services, that is, it is never removed from registry.
Now that it's still entered on the registry, I can neither install or uninstall it. The .exe has been removed in last un-installation, therefore there is nothing to uninstall.
The solution was to manually remove the entry from registry. I have changed my code so that it doesn't crash or at least it's handled as an exception.
精彩评论