Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
8c3fc3a8
Commit
8c3fc3a8
authored
18 years ago
by
James Hawkins
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msiexec: Also support options using a hyphen.
parent
1adcf008
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/msiexec/msiexec.c
+38
-18
38 additions, 18 deletions
programs/msiexec/msiexec.c
with
38 additions
and
18 deletions
programs/msiexec/msiexec.c
+
38
−
18
View file @
8c3fc3a8
...
...
@@ -229,6 +229,16 @@ static BOOL msi_strequal(LPCWSTR str1, LPCSTR str2)
return
(
ret
!=
CSTR_EQUAL
);
}
/* prefix is hyphen or dash, and str1 is the same as str2, ignoring case */
static
BOOL
msi_option_equal
(
LPCWSTR
str1
,
LPCSTR
str2
)
{
if
(
str1
[
0
]
!=
'/'
&&
str1
[
0
]
!=
'-'
)
return
TRUE
;
/* skip over the hyphen or slash */
return
msi_strequal
(
str1
+
1
,
str2
);
}
/* str2 is at the beginning of str1, ignoring case */
static
BOOL
msi_strprefix
(
LPCWSTR
str1
,
LPCSTR
str2
)
{
...
...
@@ -247,6 +257,16 @@ static BOOL msi_strprefix(LPCWSTR str1, LPCSTR str2)
return
(
ret
!=
CSTR_EQUAL
);
}
/* prefix is hyphen or dash, and str2 is at the beginning of str1, ignoring case */
static
BOOL
msi_option_prefix
(
LPCWSTR
str1
,
LPCSTR
str2
)
{
if
(
str1
[
0
]
!=
'/'
&&
str1
[
0
]
!=
'-'
)
return
TRUE
;
/* skip over the hyphen or slash */
return
msi_strprefix
(
str1
+
1
,
str2
);
}
static
VOID
*
LoadProc
(
LPCWSTR
DllName
,
LPCSTR
ProcName
,
HMODULE
*
DllHandle
)
{
VOID
*
(
*
proc
)(
void
);
...
...
@@ -381,7 +401,7 @@ int main(int argc, char **argv)
* We do that before starting to process the real commandline,
* then overwrite the commandline again.
*/
if
(
!
msi_
str
equal
(
argvW
[
1
],
"
/
@"
))
if
(
!
msi_
option_
equal
(
argvW
[
1
],
"@"
))
{
if
(
!
process_args_from_reg
(
argvW
[
2
],
&
argc
,
&
argvW
))
return
1
;
...
...
@@ -391,15 +411,15 @@ int main(int argc, char **argv)
{
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
regserver"
))
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"regserver"
))
{
FunctionRegServer
=
TRUE
;
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
unregserver"
)
||
!
msi_
str
equal
(
argvW
[
i
],
"
/
unregister"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"unregserver"
)
||
!
msi_
option_
equal
(
argvW
[
i
],
"unregister"
))
{
FunctionUnregServer
=
TRUE
;
}
else
if
(
!
msi_
str
prefix
(
argvW
[
i
],
"
/
i"
))
else
if
(
!
msi_
option_
prefix
(
argvW
[
i
],
"i"
))
{
LPWSTR
argvWi
=
argvW
[
i
];
FunctionInstall
=
TRUE
;
...
...
@@ -415,7 +435,7 @@ int main(int argc, char **argv)
}
PackageName
=
argvWi
;
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
a"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"a"
))
{
FunctionInstall
=
TRUE
;
FunctionInstallAdmin
=
TRUE
;
...
...
@@ -427,7 +447,7 @@ int main(int argc, char **argv)
PackageName
=
argvW
[
i
];
StringListAppend
(
&
property_list
,
ActionAdmin
);
}
else
if
(
!
msi_
str
prefix
(
argvW
[
i
],
"
/
f"
))
else
if
(
!
msi_
option_
prefix
(
argvW
[
i
],
"f"
))
{
int
j
;
int
len
=
lstrlenW
(
argvW
[
i
]);
...
...
@@ -495,7 +515,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
PackageName
=
argvW
[
i
];
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
x"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"x"
))
{
FunctionInstall
=
TRUE
;
i
++
;
...
...
@@ -505,7 +525,7 @@ int main(int argc, char **argv)
PackageName
=
argvW
[
i
];
StringListAppend
(
&
property_list
,
RemoveAll
);
}
else
if
(
!
msi_
str
prefix
(
argvW
[
i
],
"
/
j"
))
else
if
(
!
msi_
option_
prefix
(
argvW
[
i
],
"j"
))
{
int
j
;
int
len
=
lstrlenW
(
argvW
[
i
]);
...
...
@@ -553,7 +573,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
PackageName
=
argvW
[
i
];
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
t"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"t"
))
{
i
++
;
if
(
i
>=
argc
)
...
...
@@ -561,7 +581,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
StringListAppend
(
&
transform_list
,
argvW
[
i
]);
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
g"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"g"
))
{
i
++
;
if
(
i
>=
argc
)
...
...
@@ -569,7 +589,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
Language
=
msi_atou
(
argvW
[
i
]);
}
else
if
(
!
msi_
str
prefix
(
argvW
[
i
],
"
/
l"
))
else
if
(
!
msi_
option_
prefix
(
argvW
[
i
],
"l"
))
{
int
j
;
int
len
=
lstrlenW
(
argvW
[
i
]);
...
...
@@ -660,7 +680,7 @@ int main(int argc, char **argv)
ExitProcess
(
1
);
}
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
p"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"p"
))
{
FunctionPatch
=
TRUE
;
i
++
;
...
...
@@ -669,7 +689,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
PatchFileName
=
argvW
[
i
];
}
else
if
(
!
msi_
str
prefix
(
argvW
[
i
],
"
/
q"
))
else
if
(
!
msi_
option_
prefix
(
argvW
[
i
],
"q"
))
{
if
(
lstrlenW
(
argvW
[
i
])
==
2
||
!
msi_strequal
(
argvW
[
i
]
+
2
,
"n"
))
{
...
...
@@ -710,7 +730,7 @@ int main(int argc, char **argv)
wine_dbgstr_w
(
argvW
[
i
]
+
2
));
}
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
y"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"y"
))
{
FunctionDllRegisterServer
=
TRUE
;
i
++
;
...
...
@@ -719,7 +739,7 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
DllName
=
argvW
[
i
];
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
z"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"z"
))
{
FunctionDllUnregisterServer
=
TRUE
;
i
++
;
...
...
@@ -728,16 +748,16 @@ int main(int argc, char **argv)
WINE_TRACE
(
"argvW[%d] = %s
\n
"
,
i
,
wine_dbgstr_w
(
argvW
[
i
]));
DllName
=
argvW
[
i
];
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
h"
)
||
!
msi_
str
equal
(
argvW
[
i
],
"
/
?"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"h"
)
||
!
msi_
option_
equal
(
argvW
[
i
],
"?"
))
{
ShowUsage
(
0
);
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
m"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"m"
))
{
FunctionUnknown
=
TRUE
;
WINE_FIXME
(
"Unknown parameter /m
\n
"
);
}
else
if
(
!
msi_
str
equal
(
argvW
[
i
],
"
/
D"
))
else
if
(
!
msi_
option_
equal
(
argvW
[
i
],
"D"
))
{
FunctionUnknown
=
TRUE
;
WINE_FIXME
(
"Unknown parameter /D
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment