|
論壇說明 |
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
|
主題工具 | 顯示模式 |
2004-05-19, 09:03 PM | #1 |
榮譽會員
|
一個建立XP恢復點的指令碼
寫這個指令碼只是為了方便作系統制作備份點,可以避開XP的系統恢復點的GUI界面--時間蠻長的。解壓縮後放在任何一個目錄。這是個vbs指令碼,雙按即可執行,按提示框點擊按鈕即可。當然,這只是建立恢復點,想要 恢復到以前的某個時間點,只有通過XP的GUI界面了。
xp_sysrestorepoint.vbs 'Unattended System Restore Point 'sysrestorepoint.vbs Set sr = getobject("winmgmts:\\.\root\default:Systemrestore") msg = "New Restore Point successfully created. It is listed as: " & vbCR & vbCR Set WshShell = CreateObject("WScript.Shell") n = WshShell.Popup ("'Yes': Backup the current system automatically." & vbCRLF & vbCRLF & " 'No': Please assign a name to the restore point.", 7, "Backup the system automatically?", 4 + 32) Select Case n Case 6 sel = "Automatic Restore Point" Case 7 sel = InputBox(vbCRLF & "Assign a name to the restore point:", "Assign a name to the restore point.") Case -1 sel = "" End Select msg = msg & " " & sel & " " & vbCRLF msg = msg & vbCRLF & " " & Date & " " & Time If sel <> "" then If (sr.createrestorepoint(sel, 0, 100)) = 0 Then MsgBox msg Else MsgBox " Restore Point creation Failed! " End If ' Else ' MsgBox " Nothing is done. " End If |
送花文章: 3,
|