Commit 72984f10 authored by Vincent Béron's avatar Vincent Béron Committed by Alexandre Julliard

Implement the UI level change part of msiexec.

parent d0820fd6
......@@ -48,7 +48,11 @@ typedef enum tagINSTALLUILEVEL
INSTALLUILEVEL_NONE = 2,
INSTALLUILEVEL_BASIC = 3,
INSTALLUILEVEL_REDUCED = 4,
INSTALLUILEVEL_FULL = 5
INSTALLUILEVEL_FULL = 5,
INSTALLUILEVEL_HIDECANCEL = 0x20,
INSTALLUILEVEL_PROGRESSONLY = 0x40,
INSTALLUILEVEL_ENDDIALOG = 0x80,
INSTALLUILEVEL_SOURCERESONLY = 0x100
} INSTALLUILEVEL;
typedef enum tagINSTALLLEVEL
......@@ -231,6 +235,7 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature);
*/
UINT WINAPI MsiCloseHandle(MSIHANDLE);
UINT WINAPI MsiCloseAllHandles();
INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL, HWND*);
#ifdef __cplusplus
}
......
......@@ -140,6 +140,8 @@ int main(int argc, char *argv[])
LPSTR Transforms = HeapAlloc(GetProcessHeap(), 0, 1);
LANGID Language = 0;
INSTALLUILEVEL InstallUILevel = 0, retInstallUILevel;
LPSTR DllName = NULL;
Properties[0] = 0;
......@@ -382,13 +384,45 @@ int main(int argc, char *argv[])
}
else if(!strncasecmp(argv[i], "/q", 2))
{
i++;
if(i >= argc)
ShowUsage(1);
WINE_TRACE("argv[%d] = %s\n", i, argv[i]);
WINE_FIXME("User interface not yet implemented\n");
if(strlen(argv[i]) == 2 || !strcasecmp(argv[i]+2, "n"))
{
InstallUILevel = INSTALLUILEVEL_NONE;
}
else if(!strcasecmp(argv[i]+2, "b"))
{
InstallUILevel = INSTALLUILEVEL_BASIC;
}
else if(!strcasecmp(argv[i]+2, "r"))
{
InstallUILevel = INSTALLUILEVEL_REDUCED;
}
else if(!strcasecmp(argv[i]+2, "f"))
{
InstallUILevel = INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG;
}
else if(!strcasecmp(argv[i]+2, "n+"))
{
InstallUILevel = INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG;
}
else if(!strcasecmp(argv[i]+2, "b+"))
{
InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
}
else if(!strcasecmp(argv[i]+2, "b-"))
{
InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY;
}
else
{
fprintf(stderr, "Unknown option \"%s\" for UI level\n", argv[i]+2);
}
retInstallUILevel = MsiSetInternalUI(InstallUILevel, NULL);
if(retInstallUILevel == INSTALLUILEVEL_NOCHANGE)
{
fprintf(stderr, "Setting the UI level to 0x%x failed.\n", InstallUILevel);
ExitProcess(1);
}
}
else if(!strcasecmp(argv[i], "/y"))
{
FunctionDllRegisterServer = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment