问题
I'm creating an app that suppose to run on windows 8 (Desktop)
I need to:
Enable users to launch "File History" using my app. I need to find the command line that opens "File History".
I need to be able to display the current settings of "File History".
I found that the data is saved under "C:\Users\UserName\AppData\Local\Microsoft\Windows\FileHistory\Configuration.
The info is saved in an xml file. I prefer not to parse XML file especially if there is no specification of the exact format. So I wanted to know if there is another place where I can get the "File History" setting information from.
another thing is that for some reason I have there 2 files: config1 and config2. What is the difference between the files? which file contains the more accurate info?
回答1:
I found how to open the "File History" using C#.
ProcessStartInfo startInfo =
new ProcessStartInfo("Control.exe",@"/name Microsoft.FileHistory");
startInfo.UseShellExecute = true;
Process.Start(startInfo);
and if you want to get to the "Restore personal files" navigation item, you should launch:
"C:\Windows\System32\FileHistory.exe"
来源:https://stackoverflow.com/questions/10160999/get-set-file-history-windows-8-settings-using-c-sharp