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
5f11262d
Commit
5f11262d
authored
Jun 18, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jun 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Determine the installation context after reading properties from the command line.
parent
4aa3a997
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
action.c
dlls/msi/action.c
+25
-0
package.c
dlls/msi/package.c
+0
-26
No files found.
dlls/msi/action.c
View file @
5f11262d
...
...
@@ -648,6 +648,30 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
return
ERROR_SUCCESS
;
}
static
UINT
msi_set_context
(
MSIPACKAGE
*
package
)
{
WCHAR
val
[
10
];
DWORD
sz
=
10
;
DWORD
num
;
UINT
r
;
static
const
WCHAR
szOne
[]
=
{
'1'
,
0
};
static
const
WCHAR
szAllUsers
[]
=
{
'A'
,
'L'
,
'L'
,
'U'
,
'S'
,
'E'
,
'R'
,
'S'
,
0
};
package
->
Context
=
MSIINSTALLCONTEXT_USERUNMANAGED
;
r
=
MSI_GetPropertyW
(
package
,
szAllUsers
,
val
,
&
sz
);
if
(
r
==
ERROR_SUCCESS
)
{
num
=
atolW
(
val
);
if
(
num
==
1
||
num
==
2
)
package
->
Context
=
MSIINSTALLCONTEXT_MACHINE
;
}
MSI_SetPropertyW
(
package
,
szAllUsers
,
szOne
);
return
ERROR_SUCCESS
;
}
/****************************************************
* TOP level entry points
*****************************************************/
...
...
@@ -710,6 +734,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
/* properties may have been added by a transform */
msi_clone_properties
(
package
);
msi_set_context
(
package
);
if
(
(
msi_get_property_int
(
package
,
szUILevel
,
0
)
&
INSTALLUILEVEL_MASK
)
>=
INSTALLUILEVEL_REDUCED
)
{
...
...
dlls/msi/package.c
View file @
5f11262d
...
...
@@ -760,30 +760,6 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package)
return
r
;
}
static
UINT
msi_set_context
(
MSIPACKAGE
*
package
)
{
WCHAR
val
[
10
];
DWORD
sz
=
10
;
DWORD
num
;
UINT
r
;
static
const
WCHAR
szOne
[]
=
{
'1'
,
0
};
static
const
WCHAR
szAllUsers
[]
=
{
'A'
,
'L'
,
'L'
,
'U'
,
'S'
,
'E'
,
'R'
,
'S'
,
0
};
package
->
Context
=
MSIINSTALLCONTEXT_USERUNMANAGED
;
r
=
MSI_GetPropertyW
(
package
,
szAllUsers
,
val
,
&
sz
);
if
(
r
==
ERROR_SUCCESS
)
{
num
=
atolW
(
val
);
if
(
num
==
1
||
num
==
2
)
package
->
Context
=
MSIINSTALLCONTEXT_MACHINE
;
}
MSI_SetPropertyW
(
package
,
szAllUsers
,
szOne
);
return
ERROR_SUCCESS
;
}
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
db
,
LPCWSTR
base_url
)
{
static
const
WCHAR
szLevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
...
...
@@ -823,8 +799,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
if
(
package
->
WordCount
&
MSIWORDCOUNT_ADMINISTRATIVE
)
msi_load_admin_properties
(
package
);
msi_set_context
(
package
);
}
return
package
;
...
...
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