Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: support launching executables with runas permissions #4295

Open
vtjnash opened this issue Jan 31, 2024 · 2 comments · May be fixed by #4296
Open

windows: support launching executables with runas permissions #4295

vtjnash opened this issue Jan 31, 2024 · 2 comments · May be fixed by #4296

Comments

@vtjnash
Copy link
Member

vtjnash commented Jan 31, 2024

Calling UAC applications requires a complicated, undocumented RPC call, or using the runas verb to ShellExecuteEx to do that for the program. Perhaps this should be a flag to uv_spawn, so that users can run processes such as regedit.exe and setup.exe (after clicking on the UAC prompt) with libuv, without requiring workarounds such as cmd /c regedit, which will run the ShellExecute function verb "open"? See https://learn.microsoft.com/en-us/windows/win32/shell/launch

@vtjnash vtjnash changed the title support launching executables with runas permissions windows: support launching executables with runas permissions Jan 31, 2024
@CGQAQ
Copy link

CGQAQ commented Feb 1, 2024

I'll take this one, BTW, ShellExecuteEx doesn't support some of the args of CreateProcessW, should we just ignore related flags silently? and also ShellExecuteEx only gives back process handle, I think it's not trivial to get the primary thread handle from the process handle

@vtjnash
Copy link
Member Author

vtjnash commented Feb 1, 2024

Figuring out what flags are mapped or which are disallowed would be necessary, yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants