cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
firmusoft
Level 5

msiexec /q

Hi Guys

I am having an issue with running the msiexec command line with the /q option..

Here is the scenario... Our product installs were initially InstallScript based.. The PRODUCT GUID itself changed between versions, really not sure why, but whoever worked on it before decided to go that way...

So with the latest version, we redid the installs as BasicMSI, introduced merge modules to be able to share components between multiple projects and so on. With this version, we also needed to be able to upgrade from previous versions..

A custom action was added to look for previous versions of the product on the machine based on known product GUIDs. And if found, shall do a silent uninstall of the old version by invoking the UninstallApplication function and passing in the corresponding PRODUCT KEY and
-clone_wait -s -f1\"\""
in the command line. The ISS files for the various versons have also been included in the install. After the old version is removed, the new files are copied, so that to the end user, it works like an upgrade.

Everything works fine when running the setup.exe, or when running from the msiexec command line.

However when passing in the /q flag to the msiexec command line, the custom action that removes the old version fails.

The log file doesnt give the real error, however it says

CustomAction RemoveOldVersion returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 15:28:02: RemoveOldVersion. Return value 3.
Action ended 15:28:02: INSTALL. Return value 3.


In our installscript, a message box is shown before invoking the UninstallApplication as below.
    	SdShowMsg("Removing Old Version of the product",TRUE);
UninstallApplication(PRODUCTKEY_OLD,szCmdLine,LAAW_OPTION_WAIT_INCL_CHILD);
SdShowMsg("Removing Old Version of the product",FALSE);


Not able to figure out why passing in the /q flag causes the CA to fail. Confused whether its related to the SdShowMsg in anyway?

Any suggestions here?

Cheers..
Labels (1)
0 Kudos
(1) Reply
DLee65
Level 13

I suspect that you answered your own question. You are running a process from within the MSI. You forced your UI to quiet mode, but the InstallScript attempts to show the SdMessage box. As far as you are concerned, you intend for this to be an independent process, but unfortunately it is still a child process of the original MSI. NOTE, this is just theory on my part and if you run something like Process Monitor (ProcMon), then you may be able to determine for certain.

I would attempt the same process using something like /qb to see if that shows the message box and allows you to uninstall prior releases successfully.

Also, I wonder what happens if you attempt a silent uninstall of the app in question and generate a response file? Then perhaps if the install mode is silent then use the corresponding silent uninstall response file for prior installs.
0 Kudos