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
1dc308ec
Commit
1dc308ec
authored
Jul 23, 2004
by
Vincent Béron
Committed by
Alexandre Julliard
Jul 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement the advertise part of msiexec.
parent
0bb7b50f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
17 deletions
+85
-17
msi.h
include/msi.h
+6
-0
msiexec.c
programs/msiexec/msiexec.c
+79
-12
msiexec.h
programs/msiexec/msiexec.h
+0
-5
No files found.
include/msi.h
View file @
1dc308ec
...
...
@@ -113,6 +113,12 @@ typedef enum tagINSTALLLOGMODE
INSTALLLOGMODE_SHOWDIALOG
=
(
1
<<
(
INSTALLMESSAGE_SHOWDIALOG
>>
24
))
}
INSTALLLOGMODE
;
typedef
enum
tagADVERTISEFLAGS
{
ADVERTISEFLAGS_MACHINEASSIGN
=
0
,
ADVERTISEFLAGS_USERASSIGN
=
1
}
ADVERTISEFLAGS
;
#define MAX_FEATURE_CHARS 38
typedef
INT
(
CALLBACK
*
INSTALLUI_HANDLERA
)(
LPVOID
pvContext
,
UINT
iMessageType
,
...
...
programs/msiexec/msiexec.c
View file @
1dc308ec
...
...
@@ -124,6 +124,7 @@ int main(int argc, char *argv[])
int
i
;
BOOL
FunctionInstall
=
FALSE
;
BOOL
FunctionRepair
=
FALSE
;
BOOL
FunctionAdvertise
=
FALSE
;
BOOL
FunctionDllRegisterServer
=
FALSE
;
BOOL
FunctionDllUnregisterServer
=
FALSE
;
...
...
@@ -135,9 +136,14 @@ int main(int argc, char *argv[])
DWORD
RepairMode
=
0
;
DWORD
AdvertiseMode
=
0
;
LPSTR
Transforms
=
HeapAlloc
(
GetProcessHeap
(),
0
,
1
);
LANGID
Language
=
0
;
LPSTR
DllName
=
NULL
;
Properties
[
0
]
=
0
;
Transforms
[
0
]
=
0
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
...
...
@@ -262,40 +268,82 @@ int main(int argc, char *argv[])
}
else
if
(
!
strncasecmp
(
argv
[
i
],
"/j"
,
2
))
{
int
j
;
int
len
=
strlen
(
argv
[
i
]);
FunctionAdvertise
=
TRUE
;
for
(
j
=
2
;
j
<
len
;
j
++
)
{
switch
(
argv
[
i
][
j
])
{
case
'U'
:
case
'u'
:
AdvertiseMode
=
ADVERTISEFLAGS_USERASSIGN
;
break
;
case
'M'
:
case
'm'
:
AdvertiseMode
=
ADVERTISEFLAGS_MACHINEASSIGN
;
break
;
default:
fprintf
(
stderr
,
"Unknown option
\"
%c
\"
in Advertise mode
\n
"
,
argv
[
i
][
j
]);
break
;
}
}
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
PackageName
=
argv
[
i
];
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"u"
))
{
FunctionAdvertise
=
TRUE
;
AdvertiseMode
=
ADVERTISEFLAGS_USERASSIGN
;
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
WINE_FIXME
(
"Advertising not yet implemented
\n
"
);
ExitProcess
(
1
);
PackageName
=
argv
[
i
];
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"
u"
)
||
!
strcasecmp
(
argv
[
i
],
"
m"
))
else
if
(
!
strcasecmp
(
argv
[
i
],
"m"
))
{
FunctionAdvertise
=
TRUE
;
AdvertiseMode
=
ADVERTISEFLAGS_MACHINEASSIGN
;
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
WINE_FIXME
(
"Advertising not yet implemented
\n
"
);
ExitProcess
(
1
);
PackageName
=
argv
[
i
];
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"/t"
))
{
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
WINE_FIXME
(
"Transforms not yet implemented
\n
"
);
ExitProcess
(
1
);
TempStr
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
Transforms
,
HeapSize
(
GetProcessHeap
(),
0
,
Transforms
)
+
strlen
(
argv
[
i
])
+
1
);
if
(
!
TempStr
)
{
WINE_ERR
(
"Out of memory!
\n
"
);
ExitProcess
(
1
);
}
Transforms
=
TempStr
;
strcat
(
Transforms
,
argv
[
i
]);
strcat
(
Transforms
,
";"
);
}
else
if
(
!
strncasecmp
(
argv
[
i
],
"TRANSFORMS
"
,
10
))
else
if
(
!
strncasecmp
(
argv
[
i
],
"TRANSFORMS
="
,
11
))
{
WINE_FIXME
(
"Transforms not yet implemented
\n
"
);
ExitProcess
(
1
);
TempStr
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
Transforms
,
HeapSize
(
GetProcessHeap
(),
0
,
Transforms
)
+
strlen
(
argv
[
i
])
+
1
-
11
);
if
(
!
TempStr
)
{
WINE_ERR
(
"Out of memory!
\n
"
);
ExitProcess
(
1
);
}
Transforms
=
TempStr
;
strcat
(
Transforms
,
argv
[
i
]
+
11
);
strcat
(
Transforms
,
";"
);
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"/g"
))
{
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
WINE_FIXME
(
"Language ID not yet implemented
\n
"
);
ExitProcess
(
1
);
Language
=
strtol
(
argv
[
i
],
NULL
,
0
);
}
else
if
(
!
strncasecmp
(
argv
[
i
],
"/l"
,
2
))
{
...
...
@@ -354,6 +402,17 @@ int main(int argc, char *argv[])
}
Properties
=
TempStr
;
}
if
(
Transforms
[
strlen
(
Transforms
)
-
1
]
==
';'
)
{
Transforms
[
strlen
(
Transforms
)
-
1
]
=
0
;
TempStr
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
Transforms
,
HeapSize
(
GetProcessHeap
(),
0
,
Transforms
)
-
1
);
if
(
!
TempStr
)
{
fprintf
(
stderr
,
"Out of memory!
\n
"
);
ExitProcess
(
1
);
}
Transforms
=
TempStr
;
}
if
(
FunctionInstall
)
{
...
...
@@ -387,6 +446,14 @@ int main(int argc, char *argv[])
}
}
}
else
if
(
FunctionAdvertise
)
{
if
(
MsiAdvertiseProductA
(
PackageName
,
(
LPSTR
)
AdvertiseMode
,
Transforms
,
Language
)
!=
ERROR_SUCCESS
)
{
fprintf
(
stderr
,
"Advertising of %s (%lu, %s, 0x%04x) failed.
\n
"
,
PackageName
,
AdvertiseMode
,
Transforms
,
Language
);
ExitProcess
(
1
);
}
}
else
if
(
FunctionDllRegisterServer
)
{
DllRegisterServer
(
DllName
);
...
...
programs/msiexec/msiexec.h
View file @
1dc308ec
...
...
@@ -21,11 +21,6 @@
typedef
HRESULT
(
*
DLLREGISTERSERVER
)(
void
);
typedef
HRESULT
(
*
DLLUNREGISTERSERVER
)(
void
);
/* Advertising flags */
#define ADVERTISE_CURRENT_USER 0x00000001
#define ADVERTISE_ALL_USERS 0x00000002
/* Logging flags */
#define LOG_STATUS_MESSAGES 0x00000001
...
...
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