Hi
Codeing Gurus
Is there any sort of code that can temporarily gain admin rights in a exe
Printable View
Hi
Codeing Gurus
Is there any sort of code that can temporarily gain admin rights in a exe
i hope so
Presumably if there's a way to do it, a prompt of some kind would be required to get an admin username/password.
the answer is no.
an exe cannot elevate itself to admin priviliges
it can only launch a new exe and request admin priviliges (which will cause the UAC prompt).
OR
it can launch a COM component and create this component with elevated priviliges (which will also cause the UAC prompt). The code in the COM component can then use admin stuff, the code in the application using the COM component still can't do admin stuff itself. it can only do so through the interfaces available in the com component.