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
fadf6100
Commit
fadf6100
authored
Apr 11, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Apr 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Implement UserInstStubWrapper.
parent
aebc88d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
11 deletions
+67
-11
advpack.c
dlls/advpack/advpack.c
+66
-10
install.c
dlls/advpack/install.c
+1
-1
No files found.
dlls/advpack/advpack.c
View file @
fadf6100
...
...
@@ -40,6 +40,17 @@ typedef HRESULT (WINAPI *DLLREGISTER) (void);
#define MAX_FIELD_LENGTH 512
#define PREFIX_LEN 5
HRESULT
launch_exe
(
LPCWSTR
cmd
,
LPCWSTR
dir
,
HANDLE
*
phEXE
);
/* registry path of the Installed Components key for per-user stubs */
static
const
WCHAR
setup_key
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
' '
,
'S'
,
'e'
,
't'
,
'u'
,
'p'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
' '
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
/* parses the destination directory parameters from pszSection
* the parameters are of the form: root,key,value,unknown,fallback
* we first read the reg value root\\key\\value and if that fails,
...
...
@@ -474,14 +485,6 @@ HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW* pPerUser)
{
HKEY
setup
,
guid
;
static
const
WCHAR
setup_key
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
' '
,
'S'
,
'e'
,
't'
,
'u'
,
'p'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
' '
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
static
const
WCHAR
stub_path
[]
=
{
'S'
,
't'
,
'u'
,
'b'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
version
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
locale
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'e'
,
0
};
...
...
@@ -805,13 +808,66 @@ HRESULT WINAPI UserInstStubWrapperA(HWND hWnd, HINSTANCE hInstance,
/***********************************************************************
* UserInstStubWrapperW (ADVPACK.@)
*
* Launches the user stub wrapper specified by the RealStubPath
* registry value under Installed Components\szParms.
*
* PARAMS
* hWnd [I] Handle to the window used for the display.
* hInstance [I] Instance of the process.
* szParms [I] The GUID of the installation.
* show [I] How the window should be shown.
*
* RETURNS
* Success: S_OK.
* Failure: E_FAIL.
*
* TODO
* If the type of the StubRealPath value is REG_EXPAND_SZ, then
* we should call ExpandEnvironmentStrings on the value and
* launch the result.
*/
HRESULT
WINAPI
UserInstStubWrapperW
(
HWND
hWnd
,
HINSTANCE
hInstance
,
LPWSTR
pszParms
,
INT
nShow
)
{
FIXME
(
"(%p, %p, %s, %i): stub
\n
"
,
hWnd
,
hInstance
,
debugstr_w
(
pszParms
),
nShow
);
HKEY
setup
,
guid
;
WCHAR
stub
[
MAX_PATH
];
DWORD
size
=
MAX_PATH
;
HRESULT
hr
=
S_OK
;
BOOL
res
;
return
E_FAIL
;
static
const
WCHAR
real_stub_path
[]
=
{
'R'
,
'e'
,
'a'
,
'l'
,
'S'
,
't'
,
'u'
,
'b'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
TRACE
(
"(%p, %p, %s, %i)
\n
"
,
hWnd
,
hInstance
,
debugstr_w
(
pszParms
),
nShow
);
if
(
!
pszParms
||
!*
pszParms
)
return
E_INVALIDARG
;
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
setup_key
,
0
,
KEY_READ
,
&
setup
))
{
return
E_FAIL
;
}
if
(
RegOpenKeyExW
(
setup
,
pszParms
,
0
,
KEY_READ
,
&
guid
))
{
RegCloseKey
(
setup
);
return
E_FAIL
;
}
res
=
RegQueryValueExW
(
guid
,
real_stub_path
,
NULL
,
NULL
,
(
LPBYTE
)
stub
,
&
size
);
if
(
res
||
!*
stub
)
goto
done
;
/* launch the user stub wrapper */
hr
=
launch_exe
(
stub
,
NULL
,
NULL
);
done:
RegCloseKey
(
setup
);
RegCloseKey
(
guid
);
return
hr
;
}
/***********************************************************************
...
...
dlls/advpack/install.c
View file @
fadf6100
...
...
@@ -367,7 +367,7 @@ done:
return
hr
;
}
static
HRESULT
launch_exe
(
LPCWSTR
cmd
,
LPCWSTR
dir
,
HANDLE
*
phEXE
)
HRESULT
launch_exe
(
LPCWSTR
cmd
,
LPCWSTR
dir
,
HANDLE
*
phEXE
)
{
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
...
...
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