[wix-devs] Strange requirement

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Mar 17 09:31:33 PDT 2016

I have a new challenge to replace a legacy install shield non-msi installer with a MSI.  I've accomplished most feats except for uninstalling the old install.  I thought it would be as easy as a RegSearch for the UninstallString in which I can invoke its uninstaller deferred right after InstallExecute.  The problem I ran into is that any of the *Exec (CAQuietExec) CA's exposed by WIXCA have the artificial requirement that they must start with a quote.

QtExec.ca @ Line 73:
    if (L'"' != **ppwzCommand)
        WcaLog(LOGMSG_STANDARD, "Command string must begin with quoted application name.");
        ExitOnFailure(hr = E_INVALIDARG, "invalid command line property value");

I understand why this was added (to prevent commands with spaces in them from failing to run), but I challenge if it's really useful. Since in the end we just pass the unparsed command to QuietExecEx, which then passes it to CreateProcessW, can we not just rely on the HRESULT of it? In my use case, the path being returned from the RegistrySearch starts with C:\windows\uninst.exe which due to it's lack of spaces does not require quotes to execute.


More information about the wix-devs mailing list