Commit df6b195a authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Simplify msi_set_context.

parent c6f281fc
......@@ -693,20 +693,13 @@ static BOOL needs_ui_sequence(MSIPACKAGE *package)
static UINT msi_set_context(MSIPACKAGE *package)
{
WCHAR val[10];
DWORD sz = 10;
DWORD num;
UINT r;
int num;
package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
r = msi_get_property(package->db, szAllUsers, val, &sz);
if (r == ERROR_SUCCESS)
{
num = atolW(val);
num = msi_get_property_int(package->db, szAllUsers, 0);
if (num == 1 || num == 2)
package->Context = MSIINSTALLCONTEXT_MACHINE;
}
return ERROR_SUCCESS;
}
......
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