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
d2df24b9
Commit
d2df24b9
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 logging in msiexec.
Correct MsiEnableLog{A,W} prototype.
parent
72984f10
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
25 deletions
+100
-25
msi.c
dlls/msi/msi.c
+6
-6
msi.h
include/msi.h
+8
-2
msiexec.c
programs/msiexec/msiexec.c
+86
-1
msiexec.h
programs/msiexec/msiexec.h
+0
-16
No files found.
dlls/msi/msi.c
View file @
d2df24b9
...
...
@@ -747,12 +747,12 @@ UINT WINAPI MsiDatabaseImportW(LPCWSTR szFolderPath, LPCWSTR szFilename)
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnableLogA
(
DWORD
dwLogMode
,
LPCSTR
szLogFile
,
BOOL
fAppend
)
UINT
WINAPI
MsiEnableLogA
(
DWORD
dwLogMode
,
LPCSTR
szLogFile
,
DWORD
attributes
)
{
LPWSTR
szwLogFile
=
NULL
;
UINT
hr
=
ERROR_INSTALL_FAILURE
;
FIXME
(
"%08lx %s %
d
\n
"
,
dwLogMode
,
debugstr_a
(
szLogFile
),
fAppend
);
FIXME
(
"%08lx %s %
08lx
\n
"
,
dwLogMode
,
debugstr_a
(
szLogFile
),
attributes
);
if
(
szLogFile
)
{
...
...
@@ -765,7 +765,7 @@ UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, BOOL fAppend)
return
ERROR_INVALID_PARAMETER
;
}
hr
=
MsiEnableLogW
(
dwLogMode
,
szwLogFile
,
fAppend
);
hr
=
MsiEnableLogW
(
dwLogMode
,
szwLogFile
,
attributes
);
end:
if
(
szwLogFile
)
...
...
@@ -774,12 +774,12 @@ end:
return
hr
;
}
UINT
WINAPI
MsiEnableLogW
(
DWORD
dwLogMode
,
LPCWSTR
szLogFile
,
BOOL
fAppend
)
UINT
WINAPI
MsiEnableLogW
(
DWORD
dwLogMode
,
LPCWSTR
szLogFile
,
DWORD
attributes
)
{
HANDLE
the_file
=
INVALID_HANDLE_VALUE
;
TRACE
(
"%08lx %s %
d
\n
"
,
dwLogMode
,
debugstr_w
(
szLogFile
),
fAppend
);
TRACE
(
"%08lx %s %
08lx
\n
"
,
dwLogMode
,
debugstr_w
(
szLogFile
),
attributes
);
strcpyW
(
gszLogFile
,
szLogFile
);
if
(
!
fAppend
)
if
(
!
(
attributes
&
INSTALLLOGATTRIBUTES_APPEND
)
)
DeleteFileW
(
szLogFile
);
the_file
=
CreateFileW
(
szLogFile
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
include/msi.h
View file @
d2df24b9
...
...
@@ -117,6 +117,12 @@ typedef enum tagINSTALLLOGMODE
INSTALLLOGMODE_SHOWDIALOG
=
(
1
<<
(
INSTALLMESSAGE_SHOWDIALOG
>>
24
))
}
INSTALLLOGMODE
;
typedef
enum
tagINSTALLLOGATTRIBUTES
{
INSTALLLOGATTRIBUTES_APPEND
=
0x00000001
,
INSTALLLOGATTRIBUTES_FLUSHEACHLINE
=
0x00000002
}
INSTALLLOGATTRIBUTES
;
typedef
enum
tagADVERTISEFLAGS
{
ADVERTISEFLAGS_MACHINEASSIGN
=
0
,
...
...
@@ -214,8 +220,8 @@ UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuf
UINT
WINAPI
MsiGetProductInfoW
(
LPCWSTR
szProduct
,
LPCWSTR
szAttribute
,
LPWSTR
szBuffer
,
DWORD
*
pcchValueBuf
);
#define MsiGetProductInfo WINELIB_NAME_AW(MsiGetProductInfo)
UINT
WINAPI
MsiEnableLogA
(
DWORD
dwLogMode
,
LPCSTR
szLogFile
,
BOOL
fAppend
);
UINT
WINAPI
MsiEnableLogW
(
DWORD
dwLogMode
,
LPCWSTR
szLogFile
,
BOOL
fAppend
);
UINT
WINAPI
MsiEnableLogA
(
DWORD
dwLogMode
,
LPCSTR
szLogFile
,
DWORD
attributes
);
UINT
WINAPI
MsiEnableLogW
(
DWORD
dwLogMode
,
LPCWSTR
szLogFile
,
DWORD
attributes
);
#define MsiEnableLog WINELIB_NAME_AW(MsiEnableLog)
INSTALLUI_HANDLERA
WINAPI
MsiSetExternalUIA
(
INSTALLUI_HANDLERA
,
DWORD
,
LPVOID
);
...
...
programs/msiexec/msiexec.c
View file @
d2df24b9
...
...
@@ -140,6 +140,10 @@ int main(int argc, char *argv[])
LPSTR
Transforms
=
HeapAlloc
(
GetProcessHeap
(),
0
,
1
);
LANGID
Language
=
0
;
DWORD
LogMode
=
0
;
LPSTR
LogFileName
=
NULL
;
DWORD
LogAttributes
=
0
;
INSTALLUILEVEL
InstallUILevel
=
0
,
retInstallUILevel
;
LPSTR
DllName
=
NULL
;
...
...
@@ -366,13 +370,94 @@ int main(int argc, char *argv[])
}
else
if
(
!
strncasecmp
(
argv
[
i
],
"/l"
,
2
))
{
int
j
;
int
len
=
strlen
(
argv
[
i
]);
for
(
j
=
2
;
j
<
len
;
j
++
)
{
switch
(
argv
[
i
][
j
])
{
case
'I'
:
case
'i'
:
LogMode
|=
INSTALLLOGMODE_INFO
;
break
;
case
'W'
:
case
'w'
:
LogMode
|=
INSTALLLOGMODE_WARNING
;
break
;
case
'E'
:
case
'e'
:
LogMode
|=
INSTALLLOGMODE_ERROR
;
break
;
case
'A'
:
case
'a'
:
LogMode
|=
INSTALLLOGMODE_ACTIONSTART
;
break
;
case
'R'
:
case
'r'
:
LogMode
|=
INSTALLLOGMODE_ACTIONDATA
;
break
;
case
'U'
:
case
'u'
:
LogMode
|=
INSTALLLOGMODE_USER
;
break
;
case
'C'
:
case
'c'
:
LogMode
|=
INSTALLLOGMODE_COMMONDATA
;
break
;
case
'M'
:
case
'm'
:
LogMode
|=
INSTALLLOGMODE_FATALEXIT
;
break
;
case
'O'
:
case
'o'
:
LogMode
|=
INSTALLLOGMODE_OUTOFDISKSPACE
;
break
;
case
'P'
:
case
'p'
:
LogMode
|=
INSTALLLOGMODE_PROPERTYDUMP
;
break
;
case
'V'
:
case
'v'
:
LogMode
|=
INSTALLLOGMODE_VERBOSE
;
break
;
case
'*'
:
LogMode
=
INSTALLLOGMODE_FATALEXIT
|
INSTALLLOGMODE_ERROR
|
INSTALLLOGMODE_WARNING
|
INSTALLLOGMODE_USER
|
INSTALLLOGMODE_INFO
|
INSTALLLOGMODE_RESOLVESOURCE
|
INSTALLLOGMODE_OUTOFDISKSPACE
|
INSTALLLOGMODE_ACTIONSTART
|
INSTALLLOGMODE_ACTIONDATA
|
INSTALLLOGMODE_COMMONDATA
|
INSTALLLOGMODE_PROPERTYDUMP
|
INSTALLLOGMODE_PROGRESS
|
INSTALLLOGMODE_INITIALIZE
|
INSTALLLOGMODE_TERMINATE
|
INSTALLLOGMODE_SHOWDIALOG
;
break
;
case
'+'
:
LogAttributes
|=
INSTALLLOGATTRIBUTES_APPEND
;
break
;
case
'!'
:
LogAttributes
|=
INSTALLLOGATTRIBUTES_FLUSHEACHLINE
;
break
;
default:
break
;
}
}
i
++
;
if
(
i
>=
argc
)
ShowUsage
(
1
);
WINE_TRACE
(
"argv[%d] = %s
\n
"
,
i
,
argv
[
i
]);
WINE_FIXME
(
"Logging not yet implemented
\n
"
);
LogFileName
=
argv
[
i
];
if
(
MsiEnableLogA
(
LogMode
,
LogFileName
,
LogAttributes
)
!=
ERROR_SUCCESS
)
{
fprintf
(
stderr
,
"Logging in %s (0x%08lx, %lu) failed
\n
"
,
LogFileName
,
LogMode
,
LogAttributes
);
ExitProcess
(
1
);
}
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"/p"
))
{
i
++
;
...
...
programs/msiexec/msiexec.h
View file @
d2df24b9
...
...
@@ -20,19 +20,3 @@
typedef
HRESULT
(
*
DLLREGISTERSERVER
)(
void
);
typedef
HRESULT
(
*
DLLUNREGISTERSERVER
)(
void
);
/* Logging flags */
#define LOG_STATUS_MESSAGES 0x00000001
#define LOG_NONFATAL_WARNINGS 0x00000002
#define LOG_ALL_ERROR_MESSAGES 0x00000004
#define LOG_STARTUP_OF_ACTIONS 0x00000008
#define LOG_ACTION_SPECIFIC_RECORDS 0x00000010
#define LOG_USER_REQUESTS 0x00000020
#define LOG_INITIAL_USER_INTERFACE_PARAMETERS 0x00000040
#define LOG_OUT_OF_MEMORY 0x00000080
#define LOG_TERMINAL_PROPERTIES 0x00000100
#define LOG_VERBOSE_OUTPUT 0x00000200
#define LOG_APPEND_TO_EXISTING_FILE 0x00000400
#define LOG_FLUSH_EACH_LINE 0x00000800
#define LOG_WILDCARD 0x000001ff
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