This is code from Hussars team Desktop application (it would be published here soon):
#define HKEY_LOCAL_MACHINE 0x80000002
#define gREGKEYSYSINFO "SOFTWARE\Microsoft\Shared Tools\MSINFO"
#define gREGVALSYSINFO "PATH"
#define SW_NORMAL 1
DECLARE LONG ShellExecute IN SHELL32.DLL ;
LONG nWinHandle, STRING cOperation,;
STRING cFileName, STRING cParameters,;
STRING cDirectory, INTEGER nShowWindow
Local lcSysInfoPath
oReg = NewObject("registry", "libs\registry.prg")
lcSysInfoPath = oReg.ReadRegistryString(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO)
If ShellExecute(0, "open", lcSysInfoPath, "", "", SW_NORMAL) <= 32
MessageBox("System Information Is Unavailable At This Time")
endif
>Hi everybody.
>I need a function (using API) that returns a list of current system hardware configuration (something like System Properties tab). I have some stuff to retrieve HD & Monitor info reading the registry, but what I really need is a list of everything in ONE API call (if exists):
>
>- Processor (type & speed)
>- Total Physical Memory
>- HDs Drives
>- CDs Drives
>- Monitor (brand & features)
>- OS (this item can be excluded)
>
>I've tried reading HKEY_LOCAL_MACHINE and HKEY_CURRENT_CONFIG but I can't reach the desired results.
>Thank you.
>Note: I know there's a lot ActiveX Controls to do this, but I don't want to use them.
If it's not broken, fix it until it is.
My Blog