분류 > VBS
Function GetOSBit()
const HKEY_LOCAL_MACHINE = &H80000002
Dim objReg, strKeyPath, strValueName, strValue
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
strValueName = "Identifier"
Call objReg.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue)
If (instr(strValue,"x86")) Then
GetOSBit = "32"
ElseIf (instr(strValue,"64")) Then
GetOSBit = "64"
Else
GetOSBit = "NotSure"
End If
End Function
댓글 없음:
댓글 쓰기