0

I try to access the root volume of a drive to get a list of files like this:

Directory.GetFiles(SourceFolder, FileFilter, searchOption)

and got this error :

Additional information: Access to the path 'H:\System Volume Information' is denied.

but sub folder is okay. I try to add:

<requestedExecutionLevel level="requireAdministrator" uiAccess="true" />

to the app.manifest, and run as admin, and it still won't work. What can I try next?

Thank you

STLDev
  • 5,950
  • 25
  • 36
JimmyN
  • 579
  • 4
  • 16

1 Answers1

0

Please note while this will give you access to the folder it will likely damage your system in the process.

System Volume Information is a special folder that Windows prevents administrators from directly accessing. In order to access this folder you will first have to open an elevated cmd prompt and run:

takeown /f "H:\System Volume Information" /R /A

This will transfer the ownership of this folder to you. But be careful with modifing these files as you may damage your system!

Do you require access to this folder? Could you be more specific with what exactly you are trying to accomplish?

Darren
  • 340
  • 2
  • 15