0

My main problem is I am facing the problem -> enter image description here

when i am trying to execute my exe file (which i written and compiled in C using GCC). I have found the solution and the solution is to change some of the settings under gpedit.msc

run -> gpedit.msc -> computer configuration -> windows settings -> security settings -> 
local policies -> security options

there are multiple files. I just want to edit files whose name starts with "User Account Control: "

Either i want to enable or disable them. How can i do that programatically using cmd/batch script?

till now i have found secdit but that does not edit the values. link -> scroll down little bit and you will find secedit. I also used resource monitor to observe registry changes when i disable something according to this link -> Use Process Monitor to Find Registry Changes. But nothing shows up. Somewhere in the internet i also found that security policies are not always associated with registry values. But i forgot to save the link. I also found this stackoverflow article Modify Local Security Policy using Powershell . But i can't understand anything as i know nothing about powershell programming and secedit or "how to edit database". Please provide some juicy resources to learn about editing security policies.

For your information i am building my program.exe in my local computer (house pc) and transferring the generated exe in "Amazon EC2 instance". If you say compile the program in "Amazon EC2" RDP i will say that i dont need to do that because my program.exe is running fine in "Amazon EC2" if i disable or enable some of the "User Account Control: " settings

James Z
  • 12,209
  • 10
  • 24
  • 44
Aniket Bose
  • 55
  • 1
  • 8
  • You can probably achieve this using powershell: https://serverfault.com/questions/848388/how-to-edit-local-group-policy-with-a-script – Karolina Ochlik Jun 01 '21 at 08:53
  • of no use because it is not neccessary that every security policy must link with registry value. In my case none of the security policy i want to edit is linked with registry value. – Aniket Bose Jun 01 '21 at 09:10
  • "none of the security policy i want to edit is linked with registry value" i said this because when i tried to examine the registry value change on changing security policy through resource monitor i found nothing – Aniket Bose Jun 01 '21 at 12:57

1 Answers1

0

Here is everything I wanted to know -> Registrykey Values Associated with local policies and thanks to -> Grzegorz Ochlik.

Aniket Bose
  • 55
  • 1
  • 8