Category : administrator

I need to change permision of the shared directory which is on my domain, from "Read and execute" to "Full control" from my C# windows application. The application is started from non administrator user. Becasue of this I understand that i can’t change the permision via standart method: DirectoryInfo dInfo = new DirectoryInfo(FileName); DirectorySecurity dSecurity ..

Read more

I’m trying to code a simple app in C for windows and I want it to run with elevated privileges. That’s working fine, but I would like to make it work, with lower privileges, if the UAC prompt is denied by the user. This is my manifest file: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> ..

Read more

I’m running a PS 5.1 script that automatically elevates to run with admin privileges. The first part of the script runs a 3-minute check to make sure the environment is set up properly. The second part of the script asks for user input via read-host. # Elevate script to run as admin param([switch]$Elevated) function Test-Admin ..

Read more