Windows – How to run msiexec from cygwin to unpack a msi

command linecygwin;windows 7windows-installer

I need to unpack (not execute, unpack) a msi in a cygwin makefile.

If I invoke from the windows command prompt the following

msiexec /a package.msi /qn TARGETDIR=C:\foo

The package is correctly deployed in C:\foo. However, if I try to perform the exact same operation from the cygwin prompt

msiexec /a package.msi /qn TARGETDIR=C:\\foobaz

All I get is the msiexec window stating the usage.
I can solve this problem in two ways, either running successfully msiexec as above, or by starting a windows command from the makefile, and have it invoke that operation.

Any ideas?

Best Answer

Found it. I need to invoke

run msiexec /a package.msi /qn TARGETDIR=C:\\foobaz

in cygwin. I have no idea why, but it works.

Related Question