From e9ae907ee7347fd81a4d62c27a255876e12c2382 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 12 Nov 2008 10:16:24 -0600 Subject: [PATCH] msiexec: build with -mwindows --- programs/msiexec/Makefile.in | 2 +- programs/msiexec/msiexec.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/programs/msiexec/Makefile.in b/programs/msiexec/Makefile.in index ef0af91..f9cb570 100644 --- a/programs/msiexec/Makefile.in +++ b/programs/msiexec/Makefile.in @@ -4,7 +4,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = msiexec.exe -APPMODE = -mconsole +APPMODE = -mwindows IMPORTS = msi ole32 advapi32 user32 kernel32 C_SRCS = \ diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c index 7b00eb7..9221fa2 100644 --- a/programs/msiexec/msiexec.c +++ b/programs/msiexec/msiexec.c @@ -493,7 +493,7 @@ static BOOL process_args_from_reg( LPWSTR ident, int *pargc, WCHAR ***pargv ) return ret; } -int main(int argc, char **argv) +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int i; BOOL FunctionInstall = FALSE; @@ -529,9 +529,10 @@ int main(int argc, char **argv) LPWSTR DllName = NULL; DWORD ReturnCode; + int argc; LPWSTR *argvW = NULL; - /* overwrite the command line */ + /* parse the command line */ process_args( GetCommandLineW(), &argc, &argvW ); /* -- 1.5.6.3