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
494e2054
Commit
494e2054
authored
Nov 03, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msiexec: Preserve the first argument in process_args_from_reg.
parent
335a6ca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
msiexec.c
programs/msiexec/msiexec.c
+13
-6
No files found.
programs/msiexec/msiexec.c
View file @
494e2054
...
...
@@ -471,12 +471,12 @@ static void process_args( WCHAR *cmdline, int *pargc, WCHAR ***pargv )
*
pargv
=
argv
;
}
static
BOOL
process_args_from_reg
(
LPWSTR
ident
,
int
*
pargc
,
WCHAR
***
pargv
)
static
BOOL
process_args_from_reg
(
const
WCHAR
*
ident
,
int
*
pargc
,
WCHAR
***
pargv
)
{
LONG
r
;
HKEY
hkey
=
0
,
hkeyArgs
=
0
;
HKEY
hkey
;
DWORD
sz
=
0
,
type
=
0
;
LPWSTR
buf
=
NULL
;
WCHAR
*
buf
;
BOOL
ret
=
FALSE
;
r
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
InstallRunOnce
,
&
hkey
);
...
...
@@ -485,8 +485,15 @@ static BOOL process_args_from_reg( LPWSTR ident, int *pargc, WCHAR ***pargv )
r
=
RegQueryValueExW
(
hkey
,
ident
,
0
,
&
type
,
0
,
&
sz
);
if
(
r
==
ERROR_SUCCESS
&&
type
==
REG_SZ
)
{
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
);
r
=
RegQueryValueExW
(
hkey
,
ident
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
sz
);
int
len
=
lstrlenW
(
*
pargv
[
0
]
);
if
(
!
(
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
+
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
memcpy
(
buf
,
*
pargv
[
0
],
len
*
sizeof
(
WCHAR
)
);
buf
[
len
++
]
=
' '
;
r
=
RegQueryValueExW
(
hkey
,
ident
,
0
,
&
type
,
(
LPBYTE
)(
buf
+
len
),
&
sz
);
if
(
r
==
ERROR_SUCCESS
)
{
process_args
(
buf
,
pargc
,
pargv
);
...
...
@@ -494,7 +501,7 @@ static BOOL process_args_from_reg( LPWSTR ident, int *pargc, WCHAR ***pargv )
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
RegCloseKey
(
hkey
Args
);
RegCloseKey
(
hkey
);
return
ret
;
}
...
...
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