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
f6b3dba7
Commit
f6b3dba7
authored
Feb 16, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Add support for creating registry symlinks from a .inf file.
parent
b5d4289d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
install.c
dlls/setupapi/install.c
+17
-4
No files found.
dlls/setupapi/install.c
View file @
f6b3dba7
...
...
@@ -370,6 +370,7 @@ static BOOL do_reg_operation( HKEY hkey, const WCHAR *value, INFCONTEXT *context
{
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
SetupGetStringFieldW
(
context
,
5
,
str
,
size
,
NULL
);
if
(
type
==
REG_LINK
)
size
--
;
/* no terminating null for symlinks */
}
}
...
...
@@ -421,6 +422,7 @@ static BOOL registry_callback( HINF hinf, PCWSTR field, void *arg )
for
(;
ok
;
ok
=
SetupFindNextLine
(
&
context
,
&
context
))
{
DWORD
options
=
0
;
WCHAR
buffer
[
MAX_INF_STRING_LENGTH
];
INT
flags
;
...
...
@@ -446,15 +448,26 @@ static BOOL registry_callback( HINF hinf, PCWSTR field, void *arg )
if
(
!
flags
)
flags
=
FLG_ADDREG_DELREG_BIT
;
else
if
(
!
(
flags
&
FLG_ADDREG_DELREG_BIT
))
continue
;
/* ignore this entry */
}
/* Wine extension: magic support for symlinks */
if
(
flags
>>
16
==
REG_LINK
)
options
=
REG_OPTION_OPEN_LINK
|
REG_OPTION_CREATE_LINK
;
if
(
info
->
delete
||
(
flags
&
FLG_ADDREG_OVERWRITEONLY
))
{
if
(
RegOpenKeyW
(
root_key
,
buffer
,
&
hkey
))
continue
;
/* ignore if it doesn't exist */
if
(
RegOpenKeyExW
(
root_key
,
buffer
,
options
,
MAXIMUM_ALLOWED
,
&
hkey
))
continue
;
/* ignore if it doesn't exist */
}
else
if
(
RegCreateKeyW
(
root_key
,
buffer
,
&
hkey
))
else
{
ERR
(
"could not create key %p %s
\n
"
,
root_key
,
debugstr_w
(
buffer
)
);
continue
;
DWORD
res
=
RegCreateKeyExW
(
root_key
,
buffer
,
0
,
NULL
,
options
,
MAXIMUM_ALLOWED
,
NULL
,
&
hkey
,
NULL
);
if
(
res
==
ERROR_ALREADY_EXISTS
&&
(
options
&
REG_OPTION_CREATE_LINK
))
res
=
RegCreateKeyExW
(
root_key
,
buffer
,
0
,
NULL
,
REG_OPTION_OPEN_LINK
,
MAXIMUM_ALLOWED
,
NULL
,
&
hkey
,
NULL
);
if
(
res
)
{
ERR
(
"could not create key %p %s
\n
"
,
root_key
,
debugstr_w
(
buffer
)
);
continue
;
}
}
TRACE
(
"key %p %s
\n
"
,
root_key
,
debugstr_w
(
buffer
)
);
...
...
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