Sets failure options (VBScript)
This code can be found in
Chapter 2 of Windows Server Cookbook
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' This code modifies the system failure and recovery settings.
' ---------------------------------------------------------------
' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0
' ---------------------------------------------------------------
' ------ SCRIPT CONFIGURATION ------
strComputer = "." ' e.g. rallen-srv01
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colRecoveryConfig = objWMI.InstancesOf("Win32_OSRecoveryConfiguration")
for each objConfig in colRecoveryConfig
Wscript.Echo objConfig.Name
' Uncomment the settings you want to modify:
' objConfig.AutoReboot = True
' objConfig.DebugFilePath = "d:\dumps\memory.dmp"
' objConfig.DebugInfoType = 1 ' Only available on W2K3
' objConfig.KernelDumpOnly = False
' objConfig.MiniDumpDirectory = "d:\minidumps" ' Only available on W2K3
' objConfig.OverwriteExistingDebugFile = True
' objConfig.SendAdminAlert = True
' objConfig.WriteDebugInfo = True
' objConfig.WriteToSystemLog = True
objConfig.Put_
next
WScript.Echo "Successfully modified settings."
|
This code has been viewed 772 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|