#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compile_both=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $objwmiservice, $wnc, $mem1, $mem3 Local $object, $objoperatingsystem $objwmiservice = ObjGet("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2") $wnc = $objwmiservice.execquery("select * from win32_physicalmemory") For $object In $wnc $mem = String(Int($object.capacity / 1048576)) If $mem1 = "" Then $mem1 = $mem & "MB" $mem2 = "" Else $mem1 &= "/" & $mem & "MB" $mem2 = "(" & $mem1 & ")" EndIf $mem3 += $mem Next $nc = $mem3 & $mem2 & "MB" MsgBox(32, "", $nc)
AU3 识别物理内存
发表评论