Passing argument with spaces to msi using ComponentArgs

Nov 16, 2010 at 6:55 PM

The doc lists an example doing this as follows.

setup.exe /ComponentArgs "MySetup":"INSTALLLOCATION=C:\Program Files\MySetup"

The quotes around INSTALLLOCATION=C:\Program Files\MySetup are removed by dotnetinstaller as shown in the log below.

-- Additional component 'analyst' arguments:  TARGETDIR=c:\temp mad\orion

2010-11-16 12:50:16 Executing: msiexec /i "C:\Users\abruss\AppData\Local\Temp\{DDEE2C07-D8D2-40C8-93E9-CB56B25B9EF8}\Analyst_10_0_5507_2.msi"  TARGETDIR=c:\temp mad\orion

2010-11-16 12:50:19 *** Component 'analyst' (Analyst_10_0_5507_2): ERROR - Error executing 'analyst' (Analyst_10_0_5507_2): 0x667

msiexec throws an error because it encounters an unexpected space between temp and mad. The question is how can I pass an argument to msiexec with spaces in it through

dotnetinstaller?

Thanks,

Adam

Nov 16, 2010 at 10:24 PM

By some obscure combination of voodoo and DOS command-line parsing double-quoting works. I had tested this earlier:

setup.exe /ComponentArgs "My Setup Component":"INSTALLLOCATION=""C:\Program Files\MySetup"""