On Monday, 13 July 2020 at 19:32:33 UTC, Marcone wrote:
alias runas = compose!(x => to!bool((cast(int) x) > 32), x =>
ShellExecute(null, "runas", "cmd", cast(wchar*) "/c \"cd /d %s
&& %s\"".format(getcwd(), x).to!wstring, null,
SW_HIDE).WaitForSingleObject(WAIT_TIMEOUT));
runas("netsh winhttp
On Monday, 13 July 2020 at 12:28:24 UTC, aberba wrote:
On Monday, 13 July 2020 at 00:57:02 UTC, Marcone wrote:
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
alias runas =
On Monday, 13 July 2020 at 00:57:02 UTC, Marcone wrote:
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
alias runas = compose!(x => to!bool((cast(int) x) > 32), x =>
ShellE
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
alias runas = compose!(x => to!bool((cast(int) x) > 32), x =>
ShellExecute(null, "runas", "cmd", cast(wchar*) "/c \"cd /d %s
On Sunday, 12 July 2020 at 21:50:06 UTC, Ali Çehreli wrote:
On 7/11/20 7:10 PM, Marcone wrote:
[...]
Here is a hacky solution that attempts the command and fails
back to asking the password. It should work on POSIX systems.
(Tested on Linux.)
[...]
I need for Windows, it not work on wind
On 7/11/20 7:10 PM, Marcone wrote:
I don't want start program with admin elevation, but ask user for admin
permission when some function is called.
Here is a hacky solution that attempts the command and fails back to
asking the password. It should work on POSIX systems. (Tested on Linux.)
im
On Sunday, 12 July 2020 at 17:28:01 UTC, Kagamin wrote:
I mean runas your own program.
I need a function that ask for admin at runtime only for one
function
I mean runas your own program.
On Sunday, 12 July 2020 at 17:19:08 UTC, Kagamin wrote:
Well, you can elevate your own program and tell it to run that
command, collect the result and send it back through e.g.
shared memory.
I don't want start with elevation, becouse program must be
avaliable even user is not admin. Only ask
Well, you can elevate your own program and tell it to run that
command, collect the result and send it back through e.g. shared
memory.
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
How can I get return code ans stdout of this code:
ShellExecute(null, "runas", "cmd", "/c netsh winhttp set proxy
127.0.0.1:
On Sunday, 12 July 2020 at 12:31:17 UTC, Kagamin wrote:
You call ShellExecute with "runas" verb:
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
I need return code and stdout.
On Sunday, 12 July 2020 at 12:31:17 UTC, Kagamin wrote:
You call ShellExecute with "runas" verb:
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
Please give me a litle simple example ruining this command:
"netsh winhttp set proxy 127.0.0.1:"
You call ShellExecute with "runas" verb:
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
I don't want start program with admin elevation, but ask user for
admin permission when some function is called.
15 matches
Mail list logo