使用可能なすべてのシステムの復元ポイントのリストをファイルに出力します

click fraud protection

この単純なVBScriptは、コンピューターで使用可能なすべてのシステムの復元ポイントを、説明、作成とともに一覧表示します。 時間、およびシーケンス番号。

スクリプトを実行するには、次の行をメモ帳ドキュメントにコピーして、ファイルとして保存します。 拡張子が.VBS(二重引用符を使用)で、ファイルをダブルクリックします。

'システムの復元のリストを印刷します。 テキストファイルを指す
'2005ラメシュスリニバサン- https://www.winhelponline.com/xp
'最終更新日:2005年8月20日
'日付/時刻を正しくフォーマットします
'

オプション明示
Dim fso、b、objWMI、clsPoint、strComputer、shell
Dim fLine、dtmInstallDate、objOS、fName
fLine = "このコンピューターで見つかったシステムの復元ポイントのリスト"
シェル= CreateObject( "Wscriptを設定します。 シェル")
fso = Wscriptを設定します。 CreateObject( "スクリプト。 FilesystemObject ")
fName =シェル。 SpecialFolders( "デスクトップ")
fName = fName& "\ ListSR.txt"
b = fsoに設定します。 CreateTextFile(fName、true)
b。 Writeline fLine
b.writeline文字列(52、 "-")
b.writeblanklines 1

strComputer = "。"

dtmInstallDate = CreateObject(_を設定します
「WbemScripting。 SWbemDateTime ")

objWMI = GetObject(_を設定します
"winmgmts:\\"&strComputer& "\ root \ cimv2")

objOS = objWMI.ExecQuery(_
"Win32_OperatingSystemから*を選択")

objWMI = getobject(_
"winmgmts:\\"&strComputer& "\ root \ default")。InstancesOf( "systemrestore")
objWMIの各clsPointについて
b.writeline "Creation Time ="&getmytime(clsPoint.creationtime)


b.writeline "Description ="&clsPoint.description
b.writeline "Sequence Number ="&clsPoint.sequencenumber
b.writeblanklines 1

関数getmytime(wmitime)
dtmInstallDate。 値= wmitime
getmytime = dtmInstallDate。 GetVarDate
終了機能

b。閉じる
シェル。 "notepad.exe"&fName、1、Trueを実行します
fso = Nothingを設定します
set shell = Nothing