Unable to get service to install automatically with custom actions

B

Bill Faulk

I have not been able to determine why my installer package will not execute
the custom actions that create the windows service when my service is
installed. I even stuck a service notification message in the
ProjectInstaller code and see nothing to indicate it is being executed.

For my development environment I am using Visual Studio 2003 with the .Net
Framework 1.1. I on Windows XP Professional. I currently have all Windows
patches installed except for the .Net 2.0 framework.

If I compile the service and manually run InstallUtil then the service is
created and can be run successfully. That's how I tested the service. This
does NOT seem to utilize the ProjectInstaller class within the executable;
it works with or without this code.

If I run the msi from the compiled installation project then the program
itself is installed but, as far as I can tell, there is no attempt to
register the service.

There is only one service in the project. I created the ProjectInstaller.cs
for my service and it has everything I would expect to be there including
adding the ServiceProcessInstaller and ServiceInstaller to the Installers
object.

Each of the 4 tasks in the Custom Actions points to the primary output of
the service. Each has the InstallerClass property set to True.

I noticed that each of the custom actions actually uses the obj directory
for the source instead of the bin directory but I don't know if this is
normal.

The service executable has the startup object set to the entry point.

There is a file called servicename.InstallState in the install directory
after the install that I don't recall seeing in past projects. It has SOAP
code in it.

Is there anything else I can check or anything that could cause this
behavior?

Thanks for any assistance,
Bill Faulk
 
B

Bill Faulk

Additional info:

The install does the same thing if run on a different system.
 
B

Bill Faulk

Nevermind, I deleted the ProjectInstaller.cs and the custom actions, rebuilt
the solution, recreated the ProjectInstaller and custom actions, and then
rebuilt again. The install worked just fine after that. I don't know why it
didn't work the first time I did it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top