title: setting UAC settings of a file in C#
body: <p>i want to give a file(already present on the client computer  .exe) permissions to always execute with administrative permissions.</p>
  
  <p>please note that the file i wants to give permissions is already on target machine. and i want to change permissions of that file through another program written in c# and it has administrative permissions to do everything.</p>
  
  <p>kindly let me know how to do it
  i am using this code</p>
  
  <pre><code>        System.Security.AccessControl.FileSecurity fs = File.GetAccessControl(@"c:\inam.exe");
          FileSystemAccessRule fsar = new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow);
          fs.AddAccessRule(fsar);
          File.SetAccessControl(@"c:\inam.exe", fs);
  </code></pre>
  
  <p>this code will change the permissions correctly but still when i execute inam.exe after executing this code    the UAC not appeared and also the inam.exe cant perform administrative operations.</p>
  
  <p>actually i have already deployed an application on more than 10,000 clients so wants to release a patch to resolve the administrative rights issue.</p>