You can write wmi scripts to query from classes like
Win32_MemoryDevice for memory, Win32_Processor for CPU and
Win32_LogicalDisk where drivetype = 3 for Hard disk. All these classes
are from root\cimv2
There are heaps of articles about it in the scripting guy archives.
Have a look on the Scripting Tools page. They have a WMICode Creator that
will show you exactly how to write WMI scripts. In fact it automatically
generates them.