How can I make executeShell ask for Admin Elevation?

Marcone marcone at
Mon Jul 13 00:57:02 UTC 2020

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 && 
%s\"".format(getcwd(), x).to!wstring, null, 

runas("netsh winhttp set proxy")

More information about the Digitalmars-d-learn mailing list