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
e0d8bd3f
Commit
e0d8bd3f
authored
Jun 29, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader/wine.inf: Add runas shell execute verb.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
6888e92e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
shlexec.c
dlls/shell32/tests/shlexec.c
+24
-0
wine.inf.in
loader/wine.inf.in
+1
-0
No files found.
dlls/shell32/tests/shlexec.c
View file @
e0d8bd3f
...
...
@@ -54,6 +54,7 @@ static DLLVERSIONINFO dllver;
static
BOOL
skip_shlexec_tests
=
FALSE
;
static
BOOL
skip_noassoc_tests
=
FALSE
;
static
HANDLE
dde_ready_event
;
static
BOOL
is_elevated
;
/***
...
...
@@ -2257,6 +2258,19 @@ static void test_exes(void)
skip
(
"Could not create associtation.
\n
"
);
}
if
(
is_elevated
)
{
rc
=
shell_execute_ex
(
SEE_MASK_NOZONECHECKS
|
SEE_MASK_CLASSNAME
|
SEE_MASK_FLAG_NO_UI
,
"runas"
,
argv0
,
params
,
NULL
,
".exe"
);
okShell
(
rc
>
32
,
"returned %Iu
\n
"
,
rc
);
okChildInt
(
"argcA"
,
4
);
okChildString
(
"argvA3"
,
"Exec"
);
}
else
{
skip
(
"No admin privileges, skipping runas test.
\n
"
);
}
if
(
!
skip_noassoc_tests
)
{
sprintf
(
filename
,
"%s
\\
test file.noassoc"
,
tmpdir
);
...
...
@@ -2698,6 +2712,9 @@ static void init_test(void)
lnk_desc_t
desc
;
DWORD
rc
;
HRESULT
r
;
TOKEN_ELEVATION
elevation
;
HANDLE
token
;
BOOL
ret
;
hdll
=
GetModuleHandleA
(
"shell32.dll"
);
pDllGetVersion
=
(
void
*
)
GetProcAddress
(
hdll
,
"DllGetVersion"
);
...
...
@@ -2822,6 +2839,13 @@ static void init_test(void)
/* Set an environment variable to see if it is inherited */
SetEnvironmentVariableA
(
"ShlexecVar"
,
"Present"
);
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
);
ok
(
ret
,
"OpenProcessToken failed.
\n
"
);
ret
=
GetTokenInformation
(
token
,
TokenElevation
,
&
elevation
,
sizeof
(
elevation
),
&
rc
);
ok
(
ret
,
"GetTokenInformation failed.
\n
"
);
is_elevated
=
elevation
.
TokenIsElevated
;
CloseHandle
(
token
);
}
static
void
cleanup_test
(
void
)
...
...
loader/wine.inf.in
View file @
e0d8bd3f
...
...
@@ -272,6 +272,7 @@ HKCR,DirectShow,,16
HKCR,exefile,,2,"Application"
HKCR,exefile\DefaultIcon,,2,"%1"
HKCR,exefile\shell\open\command,,2,"""%1"" %*"
HKCR,exefile\shell\runas\command,,2,"""%1"" %*"
HKCR,folder\shell\open\ddeexec,,2,"[ViewFolder("%l", %I, %S)]"
HKCR,folder\shell\open\ddeexec,"NoActivateHandler",2,""
HKCR,folder\shell\open\ddeexec\application,,2,"Folders"
...
...
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