Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8c3fc3a8
Commit
8c3fc3a8
authored
Jul 13, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Jul 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msiexec: Also support options using a hyphen.
parent
1adcf008
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
18 deletions
+38
-18
msiexec.c
programs/msiexec/msiexec.c
+38
-18
No files found.
programs/msiexec/msiexec.c
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_
strequal
(
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_
strequal
(
argvW
[
i
],
"/
regserver"
))
if
(
!
msi_
option_equal
(
argvW
[
i
],
"
regserver"
))
{
FunctionRegServer
=
TRUE
;
}
else
if
(
!
msi_
strequal
(
argvW
[
i
],
"/unregserver"
)
||
!
msi_strequal
(
argvW
[
i
],
"/
unregister"
))
else
if
(
!
msi_
option_equal
(
argvW
[
i
],
"unregserver"
)
||
!
msi_option_equal
(
argvW
[
i
],
"
unregister"
))
{
FunctionUnregServer
=
TRUE
;
}
else
if
(
!
msi_
strprefix
(
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_
strequal
(
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_
strprefix
(
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_
strequal
(
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_
strprefix
(
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_
strequal
(
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_
strequal
(
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_
strprefix
(
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_
strequal
(
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_
strprefix
(
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_
strequal
(
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_
strequal
(
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_
strequal
(
argvW
[
i
],
"/h"
)
||
!
msi_strequal
(
argvW
[
i
],
"/
?"
))
else
if
(
!
msi_
option_equal
(
argvW
[
i
],
"h"
)
||
!
msi_option_equal
(
argvW
[
i
],
"
?"
))
{
ShowUsage
(
0
);
}
else
if
(
!
msi_
strequal
(
argvW
[
i
],
"/
m"
))
else
if
(
!
msi_
option_equal
(
argvW
[
i
],
"
m"
))
{
FunctionUnknown
=
TRUE
;
WINE_FIXME
(
"Unknown parameter /m
\n
"
);
}
else
if
(
!
msi_
strequal
(
argvW
[
i
],
"/
D"
))
else
if
(
!
msi_
option_equal
(
argvW
[
i
],
"
D"
))
{
FunctionUnknown
=
TRUE
;
WINE_FIXME
(
"Unknown parameter /D
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment