msiexec: msiexec also supports options using a hyphen [RESEND]
James Hawkins
truiken at gmail.com
Wed Jul 12 06:53:04 CDT 2006
On 7/12/06, Alexandre Julliard <julliard at winehq.org> wrote:
> "James Hawkins" <truiken at gmail.com> writes:
>
> > Hi,
> >
> > Is there anything wrong with this patch?
>
> It can't possibly work. Please test it properly before resending it
> once more.
>
I did test it, and for the option I tested it does work. I should
have done more thorough tests though, because looking more closely at
why it might not be correct, I see that I don't need to advance the
second string because we don't send in the slash or hyphen:
+ /* skip over possible hyphen or slash */
+ return msi_strequal(str1 + 1, str2 + 1); << str2 + 1 should just be str2
...
- if(!msi_strequal(argvW[1], "/@"))
+ if(!msi_option_equal(argvW[1], "@")) << no hyphen or slash
It was working before because we call
MultiByteToWideChar(...,str2,-1,...) which will return length 1
(null-terminator) for all options. We then try to compare str1 and
str2W using the length value returned from MultiByteToWideChar minus 1
(zero) which always returns CSTR_EQUAL. I was testing to see if it
worked with /i and -i, and that did the install correctly because the
install option is the first case that uses msi_option_prefix. Any
other value would cause the install too, which is why the testing was
insufficient.
--
James Hawkins
More information about the wine-devel
mailing list