vbs删除注册表项的代码

时间:2012-03-17 15:10:02  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读: "SOFTWARE999" strDWORDValueName = "DWORD Value Name" strExpandedStringValueName = "Expanded String Value Name" strMultiStringValueName = "Multi String Value Name" strStringValueName = "String Value Name" strValueName = "strValueName" oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strDWORDValueName oReg.DeleteValue HKEY_LOCAL_MACH...
  正文:WScript.Echo "Enabling Kerberos Logging..."
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!" &_
strComputer & "rootdefault:StdRegProv")
strKeyPath = "SOFTWARE999"
strDwordValueName = "DWORD Value Name"
strExpandedStringValueName = "Expanded String Value Name"
strMultiStringValueName = "Multi String Value Name"
strStringValueName = "String Value Name"
strValueName = "strValueName"
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strDWORDValueName
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strExpandedStringValueName
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strMultiStringValueName
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,StringValueName
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName
WScript.Echo "-=[Complete!]=-"

vbs删除注册表项的代码》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Programming/VbScript/19760.html


关于《vbs删除注册表项的代码》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td