
Originally Posted by
wysota
But do you need any quotes here? Try removing your quotes, they are probably not needed at all.
Yes, it needs the quotes around the path, otherwise it will interpret only only up to the first space in the pathname. And the external program won't interpret my argument at all if it has quotes entirely around it. "INSTALLDIR=C:\Program Files\Folder" doesn't work.

Originally Posted by
wysota
Actually I never heard of Qt adding any quotes to parameters. I don't know how this is on Windows, but on Unix systems they are not needed because the argument is simply pushed into the array of arguments passed to execve() later on. Are you certain those quotes are really there? I would be surprised if this behaviour was platform dependent.
well, i guess that's why they had to write a qprocess_win.cpp 

Originally Posted by
wysota
Can you show us the code you have written to spawn the external process?
For the curious, the program is essentially any Windows Installer installer exe, or if you have an msi file, you can run it through with msiexec.exe passing in the property described above, which should be on any Windows computer.
.arg(mSetDest.installFolder())
args << arg;
mpInstallProcess->start(cmd, args);
QString arg = QString("INSTALLDIR=%1%2%3").arg(QLatin1Char('"'))
.arg(mSetDest.installFolder())
.arg(QLatin1Char('"'));
QStringList args;
args << arg;
mpInstallProcess->start(cmd, args);
To copy to clipboard, switch view to plain text mode
Bookmarks