Last post Jun 20, 2015 06:32 AM by gerrylowry
Jun 19, 2015 01:25 PM|PProgrammer|LINK
The following working code needs to be executed as administrator on powershell script level:
var shell = PowerShell.Create();
var results = shell.Invoke();
What code do I need to add?
Jun 20, 2015 06:32 AM|gerrylowry|LINK
AFAIK, this can not be done without super deep kernel knowledge.
Privileges must be granted externally by a human or by Group Policy which is still at some point established by a human ... that human may be someone in kernel development, for example the teams at Microsoft the created the Windows operating systems (sic).
if any programmer could at will programmatically dynamically switch code into privileged state, Windows security would for all intents and purposes be down the toilet.
FWIW ~~ i could be wrong.
possibly if you're running external code on your own machine that code might be installable, similar to a signed driver, with the privileges that you require.
again, AFAIK, the code would need to have been authorized prior to its execution, i.e., not dynamically.