Lazarus

Programming => Operating Systems => Topic started by: Wargan on May 02, 2017, 06:47:27 am

Title: [SOLVED] How to find out the hardware parameters of a PC?
Post by: Wargan on May 02, 2017, 06:47:27 am
Hello!

What code should I use to find out the following PC settings?

p.s. I'm programming under Windows.
Title: Re: How to find out the hardware parameters of a PC?
Post by: balazsszekely on May 02, 2017, 07:39:42 am
Through WMI? Like this: http://stackoverflow.com/questions/6383598/delphi-how-to-get-total-disk-space-of-windows-drive .
Title: Re: How to find out the hardware parameters of a PC?
Post by: Thaddy on May 02, 2017, 11:32:41 am
Hm. Directly through the registry, maybe? HKEY_LOCAL_MACHINE\HARDWARE\  and then DESCRIPTION\ and sub keys etc. Easy.
Title: Re: How to find out the hardware parameters of a PC?
Post by: ahiggins on May 02, 2017, 11:56:15 am
You could try WMI Delphi Code Creator, I've used it in the past to get system serial numbers/asset details.

https://theroadtodelphi.com/wmi-delphi-code-creator/ (https://theroadtodelphi.com/wmi-delphi-code-creator/)
Title: Re: How to find out the hardware parameters of a PC?
Post by: Thaddy on May 02, 2017, 12:00:49 pm
You could try WMI Delphi Code Creator, I've used it in the past to get system serial numbers/asset details.

https://theroadtodelphi.com/wmi-delphi-code-creator/ (https://theroadtodelphi.com/wmi-delphi-code-creator/)
WMI will work, as i wrote before, but direct registry access is much quicker and generates less code.
Title: Re: How to find out the hardware parameters of a PC?
Post by: Wargan on May 02, 2017, 12:05:39 pm
https://theroadtodelphi.com/wmi-delphi-code-creator/ (https://theroadtodelphi.com/wmi-delphi-code-creator/)

Site doesn't work  >:(
Title: Re: How to find out the hardware parameters of a PC?
Post by: ahiggins on May 02, 2017, 12:10:37 pm
sorry, did not check the download link, you may have to Google WMI Delphi Code Creator download or try CNET etc
Title: Re: How to find out the hardware parameters of a PC?
Post by: Thaddy on May 02, 2017, 12:13:52 pm
The site DOES work. Use ABP to skip all the sh*t in between.
Title: Re: How to find out the hardware parameters of a PC?
Post by: taazz on May 02, 2017, 01:06:41 pm
projects repo is at https://github.com/RRUZ/wmi-delphi-code-creator
it has download links for the binaries as well.
Title: Re: How to find out the hardware parameters of a PC?
Post by: Wargan on May 02, 2017, 01:19:47 pm
Many thanks to all!

I downloaded the WMI Delphi Code Generator from here (http://www.softpedia.com/get/Programming/Coding-languages-Compilers/WMI-Delphi-Code-Creator.shtml).

After installation in the settings you can specify generation of code for FreePascal.
TinyPortal © 2005-2018