osrecover.vbs

来自「Apress - Managing Enterprise Systems Wit」· VBS 代码 · 共 21 行

VBS
21
字号
'osrecover.vbs
Dim objServices
Dim objWMIObject, objWMIObjects

'create an instance of a Services object for the local machine
Set objServices = _
    GetObject("winmgmts:{impersonationLevel=impersonate}!root\cimv2")

'create an instance of the Win32_OSRecoveryOption class
Set objWMIObjects = objServices.InstancesOf _
                        ("Win32_OSRecoveryConfiguration")

'loop through each object (there will be only one)
For Each objWMIObject In objWMIObjects
    'set the DebugFilePath property
    objWMIObject.DebugFilePath = "d:\MEMORY.DMP"

    'update the settings
    Call objWMIObject.Put_
Next

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?