Software Deployment Question

Problem launching a EXE with multiple arguments from a MSI CA

11/26/2013 2006 views

Hi all-

I have an app I'm trying to package and everything works great so far except the very last step.  This app has a service that needs to be installed, and the only way provided by the developer is to call the EXE with an argument.  The following arguments are supported:

-RegisterService, -UnregisterService, -StartService, -StopService, -quiet (here's where the problem is).

So, to register and start the service, two commands would be required:

ica.exe -RegisterService followed by ica.exe -StartService.

The -quiet (or -silent) argument can be added to suppress the confirmation message that pops up when the service is registered (or unregistered).  So far so good, except that I can't make it work.  I've tried every CA type in my msi for running a exe, tried evoking a batch file with those commands, tried a vbscript, every combination of syntax I know, and if I include BOTH the -RegisterService AND -quiet I get an error message every time that says "Windows cannot find the file '-RegisterService -quiet' ".

If I use just the single -RegisterService argument, it works just fine, and if I run the command manually with both arguments it works, too.  It's clear that when triggered from within the msi it's not able to process two arguments.  I've found very little information about this online, but I have seen examples of CAs that call exe's with multiple arguments.

Am I missing something obvious here?

I'm not using any packaging suite to work on this, just editing the tables with InstEd It!  If I can't make this work, I'm back to pushing a scripted install via SCCM, which I'd rather not have to do.


Answer Summary:
3 Comments   [ + ] Show comments


  • Have you tried wrapping the entire command in quotation marks?
  • Yes, in every way imaginable...
  • Have you tried using the ServiceInstall and ServiceControl tables instead?

All Answers


I think you need to use the ServiceInstall table. Here is a good how to:


Answered 11/27/2013 by: tecrumors
6th Degree Black Belt

  • Unfortunately I tried that, too. But I'll take another look at it using your link as a reference in case I missed something.

Thanks to tecrumors and VBScab who suggested I look again at the ServiceInstall/ServiceControl tables!  I tried those early on but couldn't get them to work.  Basically I didn't get an error but the service just wouldn't install.  Looking again I found the answer.  I used Appdeploy Repackager to capture the files for the install.  It creates a separate component for each file, but doesn't set the KeyPath field.

Turns out in the ServiceInstall table, the foreign key to the component only works if the KeyPath field is set in the Component table.  As soon as I set that field, the service installs and works as expected.

I'm still confused about my original issue (multiple arguments when launching EXE), but obviously this is a more elegant and better solution, so for now I'll be moving on to the other 3 dozen projects I have :-)

Answered 11/27/2013 by: MrH
Orange Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ