2016-02-26 55 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

沒有關於備份的信息 –

相關問題