PDA

View Full Version : Install service EXE



freddalgleish
12-03-2005, 11:06 PM
Sorry for the cross-post. I wasn't familiar with the various groups.

Hi, I'm trying to port a VS MSI to IS 11 Express. VS easily handles a service EXE by selecting the Custom Actions Editor, right-clicking the Install folder and selecting "Add Custom Action", then adding the service EXE. At runtime, the MSI recognizes the EXE as a service and properly installs it.

Uninstalling is equally simple.

However, I cannot for the life of me figure out how to install a service EXE in IS 11 Express.

IS 11 has a Custom Actions section, with a list of custom actions during Installation and Uninstallation. If I select the very last one - "After Setup Complete..." and add a New EXE (being the service EXE), IS tries to run that EXE on installation, instead of installing it as a service. Of course, that fails since the EXE has to be registered as a service.

There is no Help on the subject, and I cannot locate any information on these forums.

Can someone help me with this, please?

TIA
Fred

MichaelU
12-05-2005, 11:35 AM
I think that Express may not expose the ability to natively handle installing services, as you've noted. In this case you may be able to do the service equivalent of self-registering a DLL/EXE. Traditionally this is done by running the exe with /service as an argument, and undone (i.e. for uninstall) with /unregserver. As this must be implemented by the exe, there are no guarantees any given exe has done so.

freddalgleish
12-05-2005, 01:39 PM
?

I've not heard of /service as an argument to a service install. Can you expand on this, please, and point me to some tech reference material.

TIA
Fred

MichaelU
12-05-2005, 02:36 PM
If you do a search for the terms regserver service unregserver you'll find that they're common command line parameters to EXE files that provide services. If this is true for the EXE whose service you are trying to install, perhaps you can launch it as a custom action with the command-line parameter /service to have it self-install the service. The problem is that the actual handling of those parameters is specific to code in the EXE, so the fact that it provides a service doesn't necessarily mean it will accept those parameters. There should be plenty of information in the help or at support.installshield.com with regards to setting up custom actions to run EXE files.