Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
82517d6d
Commit
82517d6d
authored
Apr 05, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the install context based on the ALLUSERS property.
parent
30c1b888
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
17 deletions
+51
-17
action.c
dlls/msi/action.c
+20
-11
files.c
dlls/msi/files.c
+4
-4
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+26
-2
No files found.
dlls/msi/action.c
View file @
82517d6d
...
...
@@ -3345,13 +3345,22 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
/* ok there is a lot more done here but i need to figure out what */
rc
=
MSIREG_OpenProductsKey
(
package
->
ProductCode
,
&
hkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
{
rc
=
MSIREG_OpenLocalClassesProductKey
(
package
->
ProductCode
,
&
hukey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
}
else
{
rc
=
MSIREG_OpenProductsKey
(
package
->
ProductCode
,
&
hkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MSIREG_OpenUserProductsKey
(
package
->
ProductCode
,
&
hukey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MSIREG_OpenUserProductsKey
(
package
->
ProductCode
,
&
hukey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
}
rc
=
RegCreateKeyW
(
hukey
,
szSourceList
,
&
source
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
@@ -3400,19 +3409,19 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
buffer
=
strrchrW
(
package
->
PackagePath
,
'\\'
)
+
1
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
buffer
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
...
...
@@ -4221,13 +4230,13 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package)
DWORD
size
=
0
;
rc
=
MsiSourceListGetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
NULL
,
&
size
);
if
(
rc
==
ERROR_MORE_DATA
)
{
prompt
=
msi_alloc
(
size
*
sizeof
(
WCHAR
));
MsiSourceListGetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
prompt
,
&
size
);
}
else
...
...
dlls/msi/files.c
View file @
82517d6d
...
...
@@ -581,11 +581,11 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
}
if
(
mi
->
type
==
DRIVE_CDROM
||
mi
->
type
==
DRIVE_REMOVABLE
)
msi_package_add_media_disk
(
package
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
msi_package_add_media_disk
(
package
,
package
->
Context
,
MSICODE_PRODUCT
,
mi
->
disk_id
,
mi
->
volume_label
,
mi
->
disk_prompt
);
msi_package_add_info
(
package
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
msi_package_add_info
(
package
,
package
->
Context
,
options
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
source
);
msi_free
(
source_dir
);
...
...
@@ -603,7 +603,7 @@ static UINT find_published_source(MSIPACKAGE *package, struct media_info *mi)
UINT
r
;
r
=
MsiSourceListGetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
source
,
&
size
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
...
...
@@ -612,7 +612,7 @@ static UINT find_published_source(MSIPACKAGE *package, struct media_info *mi)
volumesz
=
MAX_PATH
;
promptsz
=
MAX_PATH
;
while
(
MsiSourceListEnumMediaDisksW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
package
->
Context
,
MSICODE_PRODUCT
,
index
++
,
&
id
,
volume
,
&
volumesz
,
prompt
,
&
promptsz
)
==
ERROR_SUCCESS
)
{
...
...
dlls/msi/msipriv.h
View file @
82517d6d
...
...
@@ -307,6 +307,7 @@ typedef struct tagMSIPACKAGE
float
center_y
;
UINT
WordCount
;
UINT
Context
;
struct
list
subscriptions
;
...
...
dlls/msi/package.c
View file @
82517d6d
...
...
@@ -416,7 +416,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
static
const
WCHAR
szColorBits
[]
=
{
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
'B'
,
'i'
,
't'
,
's'
,
0
};
static
const
WCHAR
szIntFormat
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
szIntel
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
szAllUsers
[]
=
{
'A'
,
'L'
,
'L'
,
'U'
,
'S'
,
'E'
,
'R'
,
'S'
,
0
};
static
const
WCHAR
szUserInfo
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
...
...
@@ -542,7 +541,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
/* in a wine environment the user is always admin and privileged */
MSI_SetPropertyW
(
package
,
szAdminUser
,
szOne
);
MSI_SetPropertyW
(
package
,
szPriv
,
szOne
);
MSI_SetPropertyW
(
package
,
szAllUsers
,
szOne
);
/* set the os things */
OSVersion
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEXW
);
...
...
@@ -762,6 +760,30 @@ 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
};
...
...
@@ -801,6 +823,8 @@ 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