-
Notifications
You must be signed in to change notification settings - Fork 940
msiexec returns 1639 with "help" popup #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, this is an unfortunate consequence of the fact that rust chose to use posix semantics for command lines, while on windows command lines are a single string. The problem affects any programs which do not use CommandLineToArgvW or equivalent for parsing arguments. Currently the only workaround is to ditch Command altogether and call CreateProcess directly, but I'll open an issue about adding an "unescaped arg" method. |
Another way around this issue might be to call MsiInstallProduct instead of running msiexec, but I guess there's no working msi-sys yet. |
For reference the issue is rust-lang/rust#29494 |
@Diggsey Would a working |
This is no longer hugely relevent, since with @brson's changes, multirust-rs no longer installs from the .msi installers. The installation logic is now intrinsic to multirust-rs, so it can just download the .tar.gz distributions! |
# This is the 1st commit message: Port cli_inst_interactive to CliTestContext # The commit message #2 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #3 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #4 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #5 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #6 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #7 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #8 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #9 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #10 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #11 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #12 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #13 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #14 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #15 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #16 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #17 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #18 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #19 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #20 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #21 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #22 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #23 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #24 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #25 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #26 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #27 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #28 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #29 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #30 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #31 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #32 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #33 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #34 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #35 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #36 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #37 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #38 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #39 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #40 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext
After trying many many many times to get multirust working on Windows without success (with msiexec returning 1639 over and over again with that confusing popup 😭), I finally figured out why multirust was not working for me. std::process::Command will quote arguments as needed, except that the way it quote the arguments doesn't work for msiexec. When this:
TARGETDIR=path with space
is given to std::process::Command, It turns it into:
"TARGETDIR=path with space"
but msiexec needs it as:
TARGETDIR="path with space"
Note the position of the double quotes. One workaround is to use MULTIRUST_HOME= to get multirust to use a path without spaces (and any other character that might get std::process::Command into quoting the TARGETDIR= argument). The other is to create a new user account with a folder that does not have any spaces (or characters that might get std::process::Command to quote TARGETDIR=).
PS: Having figured that out, I decided to use msys2 to try create an isolated environment to temporarily test multirust by setting MULTIRUST_HOME=/c/path/to/multirust/home , but that didn't work either ( since msys2 converts path in what they call "mixed mode", it ends up being c:/path/to/multirust/home instead of c:\path\to\multirust\home ). Of course, msiexec (like many Windows commands) barfed on this 😭. Maybe multirust could change '/' to '' in paths before passing them to msiexec (or maybe warn the user about it).I won't be surprised if there are other combinations that can make msiexec fail, but these are the only ones I've encountered so far. Sorry for the rant 😛.
The text was updated successfully, but these errors were encountered: