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
fd0c2dab
Commit
fd0c2dab
authored
Jun 11, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Ignore the value if a registry value name is special.
parent
f0ea6004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
24 deletions
+19
-24
action.c
dlls/msi/action.c
+19
-24
No files found.
dlls/msi/action.c
View file @
fd0c2dab
...
...
@@ -2390,13 +2390,17 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
return
MSI_SetFeatureStates
(
package
);
}
/* OK this value is "interpreted" and then formatted based on the
first few characters */
static
LPSTR
parse_value
(
MSIPACKAGE
*
package
,
LPCWSTR
value
,
DWORD
*
type
,
DWORD
*
size
)
static
LPSTR
parse_value
(
MSIPACKAGE
*
package
,
LPCWSTR
value
,
DWORD
*
type
,
DWORD
*
size
)
{
LPSTR
data
=
NULL
;
if
(
!
value
)
{
data
=
(
LPSTR
)
strdupW
(
szEmpty
);
*
size
=
sizeof
(
szEmpty
);
*
type
=
REG_SZ
;
return
data
;
}
if
(
value
[
0
]
==
'#'
&&
value
[
1
]
!=
'#'
&&
value
[
1
]
!=
'%'
)
{
if
(
value
[
1
]
==
'x'
)
...
...
@@ -2578,19 +2582,19 @@ static WCHAR *get_keypath( MSICOMPONENT *comp, HKEY root, const WCHAR *path )
return
strdupW
(
path
);
}
static
BOOL
is_special_entry
(
const
WCHAR
*
name
,
const
WCHAR
*
value
)
static
BOOL
is_special_entry
(
const
WCHAR
*
name
)
{
return
(
name
&&
(
name
[
0
]
==
'*'
||
name
[
0
]
==
'+'
)
&&
!
name
[
1
]
&&
!
value
);
return
(
name
&&
(
name
[
0
]
==
'*'
||
name
[
0
]
==
'+'
)
&&
!
name
[
1
]);
}
static
UINT
ITERATE_WriteRegistryValues
(
MSIRECORD
*
row
,
LPVOID
param
)
{
MSIPACKAGE
*
package
=
param
;
LPSTR
value
_data
=
NULL
;
LPSTR
value
;
HKEY
root_key
,
hkey
;
DWORD
type
,
size
;
LPWSTR
deformated
,
uikey
,
keypath
;
LPCWSTR
szRoot
,
component
,
name
,
key
,
value
;
LPCWSTR
szRoot
,
component
,
name
,
key
;
MSICOMPONENT
*
comp
;
MSIRECORD
*
uirow
;
INT
root
;
...
...
@@ -2643,25 +2647,16 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
msi_free
(
keypath
);
return
ERROR_SUCCESS
;
}
value
=
MSI_RecordGetString
(
row
,
5
);
if
(
value
)
value_data
=
parse_value
(
package
,
value
,
&
type
,
&
size
);
else
{
value_data
=
(
LPSTR
)
strdupW
(
szEmpty
);
size
=
sizeof
(
szEmpty
);
type
=
REG_SZ
;
}
value
=
parse_value
(
package
,
MSI_RecordGetString
(
row
,
5
),
&
type
,
&
size
);
deformat_string
(
package
,
name
,
&
deformated
);
if
(
!
is_special_entry
(
name
,
value
))
if
(
!
is_special_entry
(
name
))
{
if
(
!
check_first
)
{
TRACE
(
"Setting value %s of %s
\n
"
,
debugstr_w
(
deformated
),
debugstr_w
(
uikey
));
RegSetValueExW
(
hkey
,
deformated
,
0
,
type
,
(
LPBYTE
)
value
_data
,
size
);
RegSetValueExW
(
hkey
,
deformated
,
0
,
type
,
(
LPBYTE
)
value
,
size
);
}
else
{
...
...
@@ -2677,7 +2672,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
TRACE
(
"Checked and setting value %s of %s
\n
"
,
debugstr_w
(
deformated
),
debugstr_w
(
uikey
));
if
(
deformated
||
size
)
RegSetValueExW
(
hkey
,
deformated
,
0
,
type
,
(
LPBYTE
)
value
_data
,
size
);
RegSetValueExW
(
hkey
,
deformated
,
0
,
type
,
(
LPBYTE
)
value
,
size
);
}
}
}
...
...
@@ -2687,11 +2682,11 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
MSI_RecordSetStringW
(
uirow
,
2
,
deformated
);
MSI_RecordSetStringW
(
uirow
,
1
,
uikey
);
if
(
type
==
REG_SZ
||
type
==
REG_EXPAND_SZ
)
MSI_RecordSetStringW
(
uirow
,
3
,(
LPWSTR
)
value_data
);
MSI_RecordSetStringW
(
uirow
,
3
,
(
LPWSTR
)
value
);
msi_ui_actiondata
(
package
,
szWriteRegistryValues
,
uirow
);
msiobj_release
(
&
uirow
->
hdr
);
msi_free
(
value
_data
);
msi_free
(
value
);
msi_free
(
deformated
);
msi_free
(
uikey
);
msi_free
(
keypath
);
...
...
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