获取/设置"文件历史记录" (Windows 8中)使用C#设置 [英] Get/Set "File History" (Windows 8) settings using C#

查看:297
本文介绍了获取/设置"文件历史记录" (Windows 8中)使用C#设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个应用程序,想在Windows上运行8(桌面)

I'm creating an app that suppose to run on windows 8 (Desktop)

我需要:

  1. 允许用户推出的文件历史记录使用我的应用程序。我需要找到打开文件历史记录的命令行。

  1. 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".

我发现,数据保存℃在:\ Users \用户名\ AppData \本地\微软\的Windows \ FileHistory \配置

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

该信息被保存在一个XML文件中。我preFER不来解析XML文件,特别是如果没有规范的确切格式。所以,我想知道是否有另外一个地方,我可以从文件历史记录的设置信息。

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.

另一件事是,由于某种原因,我有2个文件:CONFIG1和CONFIG2。文件之间的区别是什么?该文件包含了更准确的信息?

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?

推荐答案

我发现如何打开使用C#文件历史记录。

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

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

这篇关于获取/设置"文件历史记录" (Windows 8中)使用C#设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆