vishyc88 Posted January 6, 2014 Share Posted January 6, 2014 Hi Friends, Is there a way to check RAM/physical memory size from within WINPE? The builtin windows diagnosys tools like systeminfo and wmic are missing. I tried running cpu-z standalone from a network share but fails, saying "Subsystem needed to support the image type is not present.". What i need is a simple standalone command line utility to check RAM size. Kindly help.Thanks! Link to comment Share on other sites More sharing options...
Tripredacus Posted January 6, 2014 Share Posted January 6, 2014 The message you get from CPU-Z is because the architecture for the EXE does not match that of the PE you have built.Here is one example of how to get it from AutoIT:$mem = MemGetStats()$pmem = ( Round ($mem[1] / 1024000, 3) & " GB" )MsgBox (4096, "Memory Total", $pmem ) Link to comment Share on other sites More sharing options...
jaclaz Posted January 6, 2014 Share Posted January 6, 2014 The message you get from CPU-Z is because the architecture for the EXE does not match that of the PE you have built.Which can be translated, more or less, into "you built a 64 bit PE without the 32 bit subsystem", right? If this is the case, won't CPU-Z 64 bit version work?jaclaz Link to comment Share on other sites More sharing options...
Tripredacus Posted January 6, 2014 Share Posted January 6, 2014 Yes you should just be able to match the "bitness" of the PE you are using. Presuming that is a portable application, it should be fine unless it needs a .Net Framework or DirectX file. Link to comment Share on other sites More sharing options...
vishyc88 Posted January 7, 2014 Author Share Posted January 7, 2014 The message you get from CPU-Z is because the architecture for the EXE does not match that of the PE you have built.Here is one example of how to get it from AutoIT:That was lovely Tripredacus. AutoIT solved the problem and your script worked like charm. I'll also attach a script for comprehensive information about your machine.$objWMIService = objget("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")$colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")$colMemory = $objWMIService.ExecQuery("Select * from Win32_ComputerSystem")$colCPU = $objWMIService.ExecQuery("Select * from CIM_Processor")$colVideoinfo = $objWMIService.ExecQuery("Select * from Win32_VideoController")$colSound = $objWMIService.ExecQuery("Select * from Win32_SoundDevice")$colMouse = $objWMIService.ExecQuery("Select * from Win32_PointingDevice")$colMonitor = $objWMIService.ExecQuery("Select * from Win32_DesktopMonitor")$colNIC = $objWMIservice.ExecQuery("Select * from Win32_NetworkAdapter WHERE Netconnectionstatus = 2")Dim $pcinfoFor $object in $colCPU $PcInfo = $pcinfo & StringStripWS($object.Name,1) & @CRLFNextFor $objOperatingSystem in $colSettings $PcInfo = $PcInfo & $objOperatingSystem.Caption & " Build " & $objOperatingSystem.BuildNumber & " Servicepack " & $objOperatingSystem.ServicePackMajorVersion & "." & $objOperatingSystem.ServicePackMinorVersion & @CRLF $PcInfo = $PcInfo & "Available Physical Memory: " & String(Int(Number($objOperatingSystem.FreePhysicalMemory) / 1024)) & " Mb" & @CRLFNextFor $object in $colMemory $PcInfo = $PcInfo & "Total Physical Memory: " & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024))) & " Mb" & @CRLFNext$objFSO = objCreate("Scripting.FileSystemObject")$colDrives = $objFSO.Drives$Opticaldrives = "Opticaldrives : "For $object in $colDrives If ($object.DriveType == 2) then $PcInfo = $PcInfo & "Total space on : " & $object.DriveLetter & ":\ (" & $object.VolumeName & ") = " & String(Round((Number($object.TotalSize) / (1024 * 1024 * 1024)),2)) & " Gb" & @CRLF $PcInfo = $PcInfo & "Free space on : " & $object.DriveLetter & ":\ (" & $object.VolumeName & ") = " & String(Round((Number($object.FreeSpace) / (1024 * 1024 * 1024)),2)) & " Gb" & @CRLF Else $Opticaldrives = $Opticaldrives & $object.DriveLetter & ":\ " EndIfNext$PcInfo = $PcInfo & $Opticaldrives & @CRLFFor $object in $colVideoinfo $PcInfo = $PcInfo & "Video card: " & $object.Description & @CRLFNextFor $object in $colSound $PcInfo = $PcInfo & "Sound device: " & $object.Description & @CRLFNextFor $object in $colMouse $PcInfo = $PcInfo & "Mouse : " & $object.Description & @CRLFNextFor $object in $colMonitor $PcInfo = $PcInfo & "Monitor : " & $object.Description & @CRLFNextFor $object in $colNIC $Pcinfo = $pcinfo & $object.name & @CRLFNextClipPut( $pcinfo )MsgBox(48,"PCinfo",$PcInfo)MsgBox( 48, "PCinfo", "Information was copied to clipboard", 5)Regards,Vishnu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now