WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

System Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Check RAM

 Keywords: RAM physical memory total MB bytes WinResources 

Question:

I need to check that the total RAM exceeds 256MB. How can I do this with winbatch?

Answer:

Use WinResouces(11).

Here is some sample code:

ram256= 256*1024*1024 ;calcuate number in bytes
mem = WinResources(11);get total physical memory
if mem > ram256
   Message("RAM Checker", "RAM is greater than 256MB")
else
   Message("RAM Checker", "RAM is less than 256MB")
endif
exit

Article ID:   W15160
File Created: 2002:09:05:13:50:10
Last Updated: 2002:09:05:13:50:10