cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chrislynn5
Level 6

install service how to?

I'm moving from WISE to Installshield 2010 and need to install a windows service. The target will be Windows server 2003.
The issue is the current .exe file (service) uses instsrv.exe and srvany.exe to install it. How can I accomplish this in Installshield 2010? The easiest way?

Do I need to run command line, if so how?
I've played around with the components and advanced settings areas but I can add a service but can't specify the file to make the service? I see a parameters field in the Enable Service Install, Start parameters?

Thanx.
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

The component's key file is taken to be the service executable.

Please see, for example, the help topic "Installing, Controlling, and Configuring Windows Services".
0 Kudos
chrislynn5
Level 6

The link/topic was basic and I attempted to perform this but as I stated in the post I need to do this via instsrv and srvany.exe (the exe is a FoxPro file which needs this). I've tried creating a custom action but can't seem to kick off the parameters. Sicne this is controlled by the cmd.exe file I launch that from system32 and the parameters bomb. Maybe the syntax is incorrect. I've tried with quotes and without. I can start command prompt, from custom action, and type in the values and they work. The service is installed.
Here is an example of what I've tried: Custom action>working folder>system32
"cmd.exe [INSTALLDIR]instsrv.exe MyService [INSTALLDIR]srvany.exe". This is what I do in WISE then change a parameter in the reg to set exe to run.
I get a dialog, after install of other items since this is set last, stating it can't perform this?? But again if Ijust run cmd.exe for system32, and get the command prompt, I can type in manually and install service.
I've tried setting this to [INSTALLDIR] and run cmd.exe from there (putting it in my deployment files), but that doesn't work and is probably a security issue.
0 Kudos
chrislynn5
Level 6

I was able to use the component key after all. I set-up the srvany.exe file as the service and craeted a reg key to set the .exe file that I want the service to be.
0 Kudos
chrislynn5
Level 6

Does anybody know how to set the service User Name and Passward dynamically, i.e. I'm using a custom dialog for user entry????
The password is a masked field in the Service Install options area.
I guess I'd like to use Property's to set those. Thanx
0 Kudos