📄 readhardwarekeywmi.vbs
字号:
Const WMICONST = "winmgmts:{impersonationLevel=impersonate}!root\default:"
Const HKEY_CURRENT_USER = &H80000001
Dim objRegistry, nRet, strValue
'create an instance of the StdRegProv registry provider
Set objRegistry = GetObject(WMICONST & "StdRegProv")
'read the value Identifier under key HARDWARE\DESCRIPTION\System
'since the local machine root key is the default, the first parameter is omitted
nRet = objRegistry.GetStringValue(, "HARDWARE\DESCRIPTION\System", _
"Identifier", strValue)
If nRet = 0 Then
Wscript.Echo "The system type is " & strValue
Else
Wscript.Echo "Error reading the HARDWARE\DESCRIPTION\System key"
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -