cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
orenjidesu
Level 2

HOW TO escape double quotes /v" MSI_command_line_options"

Hi,

If my public property value contains double quotes ["C:\Program Files\My folder"], how should I handle it when passing to MSI package?
- setup.exe /v"MYFOLDER=\"C:\Program Files\My folder\""
This results value of MYFODLER to be C:\Program Files\My folder
But I need the value to be "C:\Program Files\My folder" (with quotes)
I've also tried the following:
- setup.exe /v"MYFOLDER=\"\"C:\Program Files\My folder\"\""
This results invalid command. I think it makes MYFOLDER to be blank value and the rest C:\Program Files\My folder\"\"" is not valid.

Thanks,
Labels (1)
0 Kudos
(1) Reply
DebbieL
Level 17

Did you try using pairs of quotes? For example:
setup.exe /v"MYFOLDER=\"""C:\Program Files\My folder\""""

From the Windows Installer help:

For sections of text set apart by literal quotation marks, enclose the section with a second pair of quotation marks.
msiexec /i A:\Example.msi PROPERTY="Embedded ""Quotes"" White Space"

The following example shows a complicated command line.
msiexec /i testdb.msi INSTALLLEVEL=3 /l* msi.log COMPANYNAME="Acme ""Widgets"" and ""Gizmos."""
0 Kudos