srihariram Posted January 28, 2008 Posted January 28, 2008 Hi,Is there any way to make WinPE to detect more than 4GB. Is there any switch similar to /PAE for Win PE.Please let me know if any..Thanks & Regards ...
gadget Posted January 28, 2008 Posted January 28, 2008 I have not found a way yet without using the 64bit version. What I do is to use wmi to read the dims and total the memory up that way.
srihariram Posted January 30, 2008 Author Posted January 30, 2008 Hi,I used MEMORYSTATUSEX (MFC Class) and Win32_ComputerSystem (WMI Class) to find Physical RAM from WinPE. Both are reporting around 3.2GB. Actually 4GB physical RAM is present.Can you tell me which WMI class did you use??Thanks & Regards,Ram
gadget Posted January 30, 2008 Posted January 30, 2008 this is my code snippet for detecting installed memory. It reports each module but you can just add up the total. This may also pick up any flash rom as well. Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PhysicalMemory", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems txtfile.writeline "Name : " & objItem.DeviceLocator txtfile.writeline "Bank : " & objItem.BankLabel totmemory = ((objItem.capacity) / 1024) / 1024 txtfile.writeline "Capacity : " & totmemory & " Mb" txtfile.writeline "MemoryType : " & objItem.MemoryType txtfile.writeline "" Next
cluberti Posted January 30, 2008 Posted January 30, 2008 I used MEMORYSTATUSEX (MFC Class) and Win32_ComputerSystem (WMI Class) to find Physical RAM from WinPE. Both are reporting around 3.2GB. Actually 4GB physical RAM is present.Well, the MEMORYSTATUSEX is volatile, although in a PE environment it should stay quite stable - however, it's not going to "see" anything reserved by the BIOS for devices, shadowed memory, etc - 3.2GB on a 4GB system sounds fairly accurate (most of my machines report 3.5GB when I use GlobalMemoryStatusEx to query memory). Also, you can use Win32::SystemInfo::MemoryStatus to query RAM, but that ultimately calls GlobalMemoryStatusEx, which uses a MEMORYSTATUSEX structure to grep the ullTotalPhys - so, you're better off using an x64 PE, or living with the x86 limitations, as there's no way short of a direct call to the BIOS in assembly to get this kind of info in a more accurate manner.
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