http://bugs.winehq.org/show_bug.cgi?id=12222
Summary: msiexec unhappy if invoked without argv[0] Product: Wine Version: CVS/GIT Platform: Other URL: http://jaman.com OS/Version: other Status: NEW Keywords: download, Installer, NoAppDBEntry, patch Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
The Jaman Player has To reproduce, first work around bug 12221 by executing http://appldnld.apple.com.edgesuite.net/content.info.apple.com/QuickTime/061...
Then run the installer: wine jaman-installer.exe This fails with a usage message from msiexec. It seems that msiexec is expecting GetCommandlineW to return a commandline starting with the executable name, but instead it gets one that starts with a space and then /i etc.
The /i is skipped (since msiexec is expecting argv[0] in that slot).
That sounds like the problem described here: http://blogs.msdn.com/oldnewthing/archive/2006/05/15/597984.aspx
The process is created with
0009:Call KERNEL32.CreateProcessA(00140bb8 "C:\windows\system32\msiexec.exe",00143600 " /i "C:\windows\profiles\dkegel\Application Data\jaman.com\Jaman Player\install\jaman-installer-beta1.2.msi" AI_SETUPEXEPATH="Z:\usr\local\google\bigdata\dkegel\installers\jaman-installer.exe" SETUPEXEDIR="Z:\usr\local\google\bigdata\dkegel\installers\"",00000000,00000000,00000000,00000020,00000000,00000000,0033fbe4,0033fc28) ret=00405825
I'll attach a kludgy workaround that makes the installer happy; it detects the situation by checking for commandlines that start with a space and then a slash. Total kludge-o-rama, we need to write a test for msiexec and see what it really does.
http://bugs.winehq.org/show_bug.cgi?id=12222
--- Comment #1 from Dan Kegel dank@kegel.com 2008-03-25 19:23:58 --- Created an attachment (id=11652) --> (http://bugs.winehq.org/attachment.cgi?id=11652) Patch with crude workaround
http://bugs.winehq.org/show_bug.cgi?id=12222
--- Comment #2 from James Hawkins truiken@gmail.com 2008-03-25 19:29:25 --- I want to say this is a duplicate of bug 9628, but I really need to investigate it more. Several patches have been submitted for bug 9628, but none have satisfied Alexandre. I need to write tests for GetCommandLine. Note that this worked before my patch to use CommandLineToArgvW was reverted. I need to find the message that stated why the commit was reverted (a lot more works with the commit than without).
http://bugs.winehq.org/show_bug.cgi?id=12222
--- Comment #3 from Dan Kegel dank@kegel.com 2008-03-25 19:36:55 --- Thanks. Yes, it looks like a dup. Sorry I couldn't find the right bug report...
http://bugs.winehq.org/show_bug.cgi?id=12222
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2008-03-28 12:51:07 --- If it's a dup, it should be marked as such, yes? Reopen if that's not what's intended.
*** This bug has been marked as a duplicate of bug 9628 ***
http://bugs.winehq.org/show_bug.cgi?id=12222
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE |
--- Comment #5 from James Hawkins truiken@gmail.com 2008-03-28 13:31:56 --- No, I still need to investigate it. It could be two different problems.
http://bugs.winehq.org/show_bug.cgi?id=12222
Darragh Bailey felix@compsoc.nuigalway.ie changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |felix@compsoc.nuigalway.ie
--- Comment #6 from Darragh Bailey felix@compsoc.nuigalway.ie 2008-04-09 16:55:51 ---
My testing of bug 9628 suggests that its exactly the same. In both cases lpApplicationName is set to the path to msiexec, and lpCommandline includes an extra space at the start which is then followed by "/i".
From my testing of CommandLineToArgvW on windows, it appears that it treats
this as a special case. One or more spaces at the start of lpCommandline (CreateProcess), produces an argv[0] of "". This is also independent of the following argument.
From my reading of the msdn, the correct behaviour for developers using
CreateProcess and not setting lpApplicationName to NULL, is to duplicate the exe name at the start of lpCommandline.
CommandLineToArgvW behaves in exactly the same fashion in wine, mimicking this odd behaviour.
The problem occurs because in wine msiexec has its own implementation "process_args" which does not observe this quirky behaviour.
Using CommandLineToArgvW in msiexec will fix this, but breaks the xlviewer installer since it does not reconstruct the argv correctly for msiexec to be able to use the arguments. See bug 9628 for the broken argv input.
So unless CommandLineToArgvW has a bug in the case of the xlviewer installer, msiexec will need to either modify process_args to take a space as the first character on the command line as a special case, same as CommandLineToArgvW, or use CommandLineToArgvW and modify the returned argv to correctly put together any broken path arguments.
http://bugs.winehq.org/show_bug.cgi?id=12222
--- Comment #7 from Dan Kegel dank@kegel.com 2008-04-09 17:00:19 --- +1 on treating initial blank as special case
http://bugs.winehq.org/show_bug.cgi?id=12222
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12233
http://bugs.winehq.org/show_bug.cgi?id=12222
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |DUPLICATE
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2008-12-23 05:48:30 --- It's really a dup.
*** This bug has been marked as a duplicate of bug 9628 ***
http://bugs.winehq.org/show_bug.cgi?id=12222
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Version|CVS/GIT |unspecified
--- Comment #9 from Dmitry Timoshkov dmitry@codeweavers.com 2008-12-23 06:04:19 --- Closing duplicate.
http://bugs.winehq.org/show_bug.cgi?id=12222
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|NoAppDBEntry |
--- Comment #10 from Austin English austinenglish@gmail.com 2010-04-02 10:51:46 --- Removing NoAppDBEntry keyword.