MS provides some functions for programmatically searching for this information (including Windows.h):
BOOL WINAPI GetPhysicallyInstalledSystemMemory( _Out_ PULONGLONG TotalMemoryInKilobytes );
Retrieves RAM information, see documentation .
BOOL WINAPI GetDiskFreeSpaceEx( _In_opt_ LPCTSTR lpDirectoryName, _Out_opt_ PULARGE_INTEGER lpFreeBytesAvailable, _Out_opt_ PULARGE_INTEGER lpTotalNumberOfBytes, _Out_opt_ PULARGE_INTEGER lpTotalNumberOfFreeBytes );
Retrieves information about the amount of free space on the disk volume, see the documentation .
SYSTEM_INFO siSysInfo;
Contains information about the current computer system. This includes the architecture and type of processor, the number of processors in the system, page size and other such information, see this MS website .
source share