' Read an Expanded String Registry Value


Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon"
strValueName = "UIHost"
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath, _
    strValueName,strValue

Wscript.Echo  "The Windows logon UI host is: " & strValue

search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft