Skip to content
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

"lessmsi x from to" in powershell does weird things #55

Closed
czechdude opened this issue Jan 13, 2016 · 3 comments
Closed

"lessmsi x from to" in powershell does weird things #55

czechdude opened this issue Jan 13, 2016 · 3 comments
Labels
Milestone

Comments

@czechdude
Copy link

I try to extract msi to a folder with

PS>lessmsi x "D:\path to .msi" "D:\destination\pa th"

and it extracts the msi file to D:\ and tries to lookup some file called "D:\destination\pa th" in the msi archive:

Extracting 'D:....msi' to 'D:'.
File D:\destination\pa th" was not found in the msi.

I installed the lessmsi latest from chocolatey.org into my powershell.

@czechdude
Copy link
Author

so the problem seems to be the space in the output dir...

@activescott activescott added the bug label Feb 3, 2016
@activescott activescott added this to the vNext milestone Feb 3, 2016
@Bioruebe
Copy link
Contributor

Bioruebe commented Aug 6, 2016

so the problem seems to be the space in the output dir...

To clarify the issue:
First of all, you forgot the trailing backslash. The documentation says : The path to extract the files to MUST have trailing backslash or it will be treated as one of the file_names.

But even with the backslash it wouldn't work :D
The real problem is the \" parsing method of .NET. See this StackOverflow question and the remarks section of GetCommandLineArgs() for more information.

Basically, when parsing the command line
lessmsi x "D:\a.msi" "D:\destination\",
the args array contains D:\destination" for the destination path.

As a workaround you can use
lessmsi x "D:\a.msi" "D:\destination"\,
which is wrong syntax, but it works.

Bioruebe added a commit to Bioruebe/lessmsi that referenced this issue Aug 6, 2016
An example workaround/fix for the \" issue.
I also changed it to only set the extract dir once to conform to the
documentation.
Oh, and it includes an error message, when the msi file doesn't exist,
because I was wondering about the exeption, while I just made a typo...
activescott added a commit that referenced this issue Dec 5, 2016
@activescott
Copy link
Owner

this was fixed in 1.5.1. See https://github.com/activescott/lessmsi/releases/tag/v1.5.1

@activescott activescott modified the milestones: v1.5.1, vNext Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants