Access to the path 'C:\Program Files (x86)\...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

My application is a test app used internally in our organization. While
testing, I need to make some changes in a couple of XML files in the
'AppUnderTest' folder but I get this security error.

Is there a way to workaround this?

Thanks for the help,
Glenn

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\Program Files
(x86)\AppUnderTest\Configuration\HardwareLibraryD3D.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
 
Glenn--

I would think that you need to right click the target folders, and at the
security tab grant permission to the user level that is going to make
changes to those xml files--i.e. do this to the App Under Test folder.

There are a couple ways but one way:

Right click folder>open Property>Security
Tab>Advanced>Owner>Edit>Administrators>check all boxes to gain full
control>ok>close>reopen>close.

CH
 
I tried this but was unsuccessful. The only way I can workaround this is to
completely disable UAC.

Is there another way to do this programmatically i.e., using a manifest
file, security certificate, etc.?

Thanks for your response.
 
Back
Top