2016-02-26 53 views
1

我想创建一个WPF应用程序,它显示Windows操作系统上次备份的时间和日期。我尝试使用EventLogger但我找不到详细信息。有没有办法让窗口上次备份的时间和日期?是否有可能获得详细的Windows操作系统在c#中的最后一个备份细节?

+0

你检查注册表项,如果有一个恢复的日期? – Gnqz

+0

@Gnqz不,我尝试过,但没有注册表项。 –

+0

您确定有关于上次备份日期的信息吗?我能想到的最后一件事是用恢复点检查系统文件的创建日期。 – Gnqz

回答

2

您正在寻找Environment Class

提供的信息有关,并且手段操纵,目前 环境和平台。这个类不能被继承。

编辑:

您还可以检查此:Creating System Restore Points using PInvoke

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 
public struct RestorePointInfo 
{ 
    public int dwEventType;  // The type of event 
    public int dwRestorePtType;  // The type of restore point 
    public Int64 llSequenceNumber; // The sequence number of the restore point 
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxDescW + 1)] 
    public string szDescription; // The description to be displayed so 
       //the user can easily identify a restore point 
} 
+1

我看不到有关备份的任何信息... – Alex

+0

没有关于备份的信息 –

相关问题