PDA

View Full Version : custom action .exe switch syntax


crewsr
08-09-2007, 12:12 PM
I'm trying to get an custom action to run a .exe file and use some switches to install some 3rd party drivers our software uses. From the command line the syntax is like so:
setup.exe /S /v"/qn ADDLOCAL=USB_Driver,Parallel_Driver"
This causes the drivers to be installed silently and to only install the drivers.

I've tried different syntax with the switches, but they never work... at best the executable runs as if no switches were specified...
"/S /v\"/qn ADDLOCAL=USB_Driver,Parallel_Driver\""
/S "/v\"/qn ADDLOCAL=USB_Driver,Parallel_Driver\""
Can anyone shed some light on this?

Brett
08-09-2007, 01:11 PM
Is the installer that you are running a Windows Installer (perhaps the setup.exe is a bootstrapper for a msi file)? If so, that may cause it not to work. You cannot have two Windows Installer installers running at the same time.

Perhaps you should consider running the 3rd party installer from a custom bootstrapper script rather than from the installer itself.

crewsr
08-13-2007, 01:26 PM
OK, turns out there are actually two .exe-wrapped MSI packages that need to be installed after my main product; the sentinel.exe and vcredist_x86.exe. I can launch either of these as expected, but since they are MSI's behind the scenes, they cannot be launched concurrently. If I specify the wait for return parameter on either .exe:
File.Run("path\\filename.exe","switches",1,1)
the files won't execute and Application.GetLastError returns 1013.

Any thoughts?

Lorne
08-13-2007, 01:36 PM
I suspect you need to pass a command line switch to those external setup launchers to make them wait for the MSI installation to complete before returning.

Telling the File.Run action to wait for the launcher to finish isn't enough unless the launcher actually waits for the install it launched.