Get / Set File History Settings (Windows 8) Using C #

I am creating an application that is supposed to run on Windows 8 (Desktop)

I need:

  • Allow users to run File History using my application. I need to find a command line that opens File History.

  • I need to be able to display the current File History settings.

I found that the data is saved in the section "C: \ Users \ UserName \ AppData \ Local \ Microsoft \ Windows \ FileHistory \ Configuration.

Information is stored in an XML file. I prefer not to parse the XML file, especially if there is no specification of the exact format. So I wanted to know if there was another place from where I could get information about setting "File History".

Another thing is that for some reason I have 2 files: config1 and config2. What is the difference between files? Which file contains more accurate information?

+2
source share
1 answer

I found how to open File History using C #.

ProcessStartInfo startInfo = 
       new ProcessStartInfo("Control.exe",@"/name Microsoft.FileHistory");
startInfo.UseShellExecute = true;
Process.Start(startInfo);

and if you want to go to the "Restore personal files" navigation item, you should run:

"C: \ Windows \ System32 \ FileHistory.exe"

+3
source

All Articles