FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   SysInfo DLL Plugin (https://fileforums.com/showthread.php?t=103432)

BLACKFIRE69 11-04-2020 04:26

SysInfo DLL Plugin
 
3 Attachment(s)
System Information Inno Library

  • Cpu
    - Name
    - Cores
    - Threads
    - Speed
    - Usage


  • Gpu
    - Name
    - Memory
    - DirectX Version


  • Os
    - Name
    - Architecture
    - ID
    - Build Number
    - OS Major
    - OS Minor
    - ServicePack Major
    - ServicePack Minor


  • Ram
    - Available
    - Total
    - Usage


  • Screen
    - Resolution
    - Refresh Rate


  • Space
    - Total
    - Free


  • Username
    - Account Name


  • Sound
    - Sound Card Name





For Inno Setup 6.0 or newer:
Example for Inno Setup 6.0 or newer




------------------------------------------------------------------------------

Cesar82 11-04-2020 15:53

Very good...
- If possible you should use an older version of the compiler (If created in Delphi use DELPHI 2010).
A smaller file will be generated (2.84 MB is very large and is already compressed in UPX). The ISSysInfo by Peterf1999 library is only 254Kb (compressed UPX).
- If possible put an example compatible with Inno Setup (Standard) in your example script. Not everyone uses the EE version of Inno Setup (The EE version is obsolete).

Thanks for library.

BLACKFIRE69 12-04-2020 01:08

Quote:

Originally Posted by Cesar82 (Post 485237)
Very good...
- If possible you should use an older version of the compiler (If created in Delphi use DELPHI 2010).
A smaller file will be generated (2.84 MB is very large and is already compressed in UPX). The ISSysInfo by Peterf1999 library is only 254Kb (compressed UPX).
- If possible put an example compatible with Inno Setup (Standard) in your example script. Not everyone uses the EE version of Inno Setup (The EE version is obsolete).

Thanks for library.

i will try with "DELPHI 2010".

thanks...

bunti_o4u 12-04-2020 08:11

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 485250)
To reduce the file size, as Cesar82 said, recompiled the source code using "Delphi 2010".

Final Size : SysInfo.dll - 302 kb

Observed three issues. you may choose to fix
01. it is showing GPU name and memory as weird numbers. GPU description is Zotac rtx 2070 super 8GB.
02. 9700k has 8 cores and 8 threads but it is showing as 4 cores and 8 threads.
03. It is showing RAM as 8GB though my pc has 16GB of RAM

KaktoR 12-04-2020 12:16

2 Attachment(s)
Same here (GPU + RAM is wrong)

If you need something special let us know.

BLACKFIRE69 12-04-2020 12:30

Quote:

Originally Posted by KaktoR (Post 485260)
Same here (GPU + RAM is wrong)

If you need something special let us know.

ya i got it. that would be correct. thnx..

Cesar82 12-04-2020 16:56

https://i.imgur.com/h5yiwFk.jpg

To correct the CPU name, you can try replacing PAnsiChar with WideString in your SysInfo source code.
Original:
function GetGPUName : PAnsiChar;
Replace by:
function GetGPUName : WideString;

I don't know if it will fix it, but as PAnsiChar doesn't support wide characters this error happens.

Or you can convert your code to ANSI using:
Result: = PAnsiChar (AnsiString (Utf8ToUnicodeString (strSource)));

Thanks for the smaller size update.

bunti_o4u 12-04-2020 19:50

Quote:

Originally Posted by BLACKFIRE69 (Post 485261)
ya i got it. that would be correct. thnx..

Noted one more thing. it is showing available RAM and Total RAM as 2047MB and 8192MB respectively in all three screenshots i.e. KaktoR, Cesar82 and mine.

Cesar82 25-04-2020 09:16

@BLACKFIRE69

Error in VRAM (GTX 970 = 4 GB VRAM):

Result:
GPU Memory = -1 MB

The detected RAM was 31.96 GB and windows detects 32.00 GB (Maybe windows rounds the value)

Gupta 26-04-2020 03:30

you should check wmi
https://docs.microsoft.com/en-us/win...isdk/about-wmi
https://github.com/jagannatharjun/in...bject.cpp#L193
https://github.com/jagannatharjun/in...rinfo.cpp#L378

Jiva newstone 28-04-2020 09:33

@BLACKFIRE69
any Difference in Xtimer like its a settimer or any kind of multi threaded time..
and also weird - sign in gpu ram

BLACKFIRE69 28-04-2020 16:50

Quote:

Originally Posted by Jiva newstone (Post 485508)
@BLACKFIRE69
any Difference in Xtimer like its a settimer or any kind of multi threaded time..
and also weird - sign in gpu ram

Xtimer is just a timer.

yup VRam ... 🤕

Jiva newstone 28-04-2020 20:12

Quote:

Originally Posted by BLACKFIRE69 (Post 485515)
Xtimer is just a timer.

yup VRam ... 🤕

i used your dll in my installer, stills its an error, so iam using stringchange to remove- or replace - with 0
plz fix it soon :)

BLACKFIRE69 29-04-2020 10:37

Quote:

Originally Posted by Jiva newstone (Post 485518)
i used your dll in my installer, stills its an error, so iam using stringchange to remove- or replace - with 0
plz fix it soon :)

ok 👍

bunti_o4u 18-05-2020 10:06

Quote:

Originally Posted by BLACKFIRE69 (Post 485888)
SysInfo DLL - Test 2



guys, test this plz, the new test DLL;

SysInfo_Test_2.rar

thanks to Cesar82, Jiva newstone, Razor12911, ... who helping me out here.

GPU RAM Size - showing 4GB instead of 8GB.

Cesar82 18-05-2020 15:34

Quote:

Originally Posted by bunti_o4u (Post 485891)
GPU RAM Size - showing 4GB instead of 8GB.

What is your video card installed?

Razor12911 18-05-2020 18:27

Quote:

Originally Posted by Cesar82 (Post 485897)
What is your video card installed?

Quote:

Originally Posted by bunti_o4u (Post 485251)
GPU description is Zotac rtx 2070 super 8GB.


Quote:

Originally Posted by BLACKFIRE69 (Post 485888)
SysInfo DLL - Test 2



guys, test this plz, the new test DLL;

SysInfo_Test_2.rar

thanks to Cesar82, Jiva newstone, Razor12911, ... who helping me out here.

same, shows 4GB instead of 6GB. GTX 1060

Cesar82 18-05-2020 18:38

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 485888)
SysInfo DLL - Test 2



guys, test this plz, the new test DLL;

SysInfo_Test_2.rar

thanks to Cesar82, Jiva newstone, Razor12911, ... who helping me out here.

Here it worked OK using Inno Setup 6.04.
The script file for testing with Inno Setup 6 is attached.
https://i.imgur.com/Y5y2adK.png

Razor12911 18-05-2020 18:43

1 Attachment(s)
Maybe you'll figure out what the issue is :)

Cesar82 18-05-2020 22:16

Quote:

Originally Posted by Razor12911 (Post 485900)
Maybe you'll figure out what the issue is :)

It is not a unique GUI, Here is:
Code:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\
{0F559AFC-6CB8-11EA-908D-446D5762B1A6}\0000

Please check if this key exists in your system.
This key I found here, and in my system it is the same.
Code:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000

Cesar82 18-05-2020 23:50

1 Attachment(s)
Test vRAM from registry...
If you have 2 or more video cards, the highest vRAM value will be displayed (if it is working correctly).

BLACKFIRE69 19-05-2020 04:48

Quote:

Originally Posted by Cesar82 (Post 485905)
Test vRAM from registry...
If you have 2 or more video cards, the highest vRAM value will be displayed (if it is working correctly).

in my case,

is always zero.

https://i.imgur.com/CWVGYaR.png

Cesar82 19-05-2020 05:23

Quote:

Originally Posted by BLACKFIRE69 (Post 485911)
in my case,

is always zero.

Run regedit and check if the registry key exists on your system:
Code:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000
and
VALUE = HardwareInformation.qwMemorySize
and
VALUE = HardwareInformation.MemorySize


Gupta 19-05-2020 05:29

bro just use wmi, you'll require class - win32_VideoController property - AdapterRAM

or if you want to play lazy, you can just parse the output of this
Code:

wmic path win32_VideoController get AdapterRAM

BLACKFIRE69 19-05-2020 05:37

Quote:

Originally Posted by Cesar82 (Post 485912)
Run regedit and check if the registry key exists on your system:
Code:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000
and
VALUE = HardwareInformation.qwMemorySize
and
VALUE = HardwareInformation.MemorySize


only HardwareInformation.MemorySize.

https://i.imgur.com/0j99te6.png

Cesar82 19-05-2020 06:49

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 485914)
only HardwareInformation.MemorySize.

try now.

BLACKFIRE69 19-05-2020 07:58

Quote:

Originally Posted by Cesar82 (Post 485916)
try now.

works... :D

Cesar82 19-05-2020 15:47

Quote:

Originally Posted by Gupta (Post 485913)
bro just use wmi, you'll require class - win32_VideoController property - AdapterRAM

or if you want to play lazy, you can just parse the output of this
Code:

wmic path win32_VideoController get AdapterRAM

Does not work for video cards over 4 GB look at win32_VideoController
uint32 AdapterRAM;
uint32 = unsigned integer 32 bits = 2^32 = 4294967296 bytes = 4 GB

Razor12911 20-05-2020 00:39

1 Attachment(s)
Another method is to use OpenCL but I do not recommend it unless if you really want to know more about the GPU, such as clock speeds or to use the GPU for other purposes.
They have an example and it detects GPU memory correctly as well.
https://code.google.com/archive/p/de...encl/downloads

felice2011 20-05-2020 02:11

Quote:

Originally Posted by Razor12911 (Post 485928)
They have an example and it detects GPU memory correctly as well.
https://code.google.com/archive/p/de...encl/downloads

Come on don't overdo it ....:D:p

is hungry a few GB on my old PC

https://i.ibb.co/CzsqD4t/VGA.png

Razor12911 20-05-2020 09:52

Quote:

Originally Posted by felice2011 (Post 485929)
Come on don't overdo it ....:D:p

is hungry a few GB on my old PC

https://i.ibb.co/CzsqD4t/VGA.png

I only noticed this alternative when I was trying to allocate memory in GPU instead of ram to see what will happen with my programs :p

felice2011 20-05-2020 10:06

Quote:

Originally Posted by Razor12911 (Post 485934)
I only noticed this alternative when I was trying to allocate memory in GPU instead of ram to see what will happen with my programs :p

I personally think it's too much information, most of it unnecessary to include in an installation or other. perhaps for other information purposes on hardware or software yes.:confused:

Razor12911 20-05-2020 10:48

Quote:

Originally Posted by felice2011 (Post 485935)
I personally think it's too much information, most of it unnecessary to include in an installation or other. perhaps for other information purposes on hardware or software yes.:confused:

Quote:

Originally Posted by Razor12911 (Post 485928)
I do not recommend it unless if you really want to know more about the GPU, such as clock speeds or to use the GPU for other purposes.

Well I did say

Cesar82 20-05-2020 16:55

1 Attachment(s)
I think a reading version of the registry does not work properly if you don't have a video card.
I created a version with both options in inno setup, if the result of the WMI verification is less than 0 (Negative value) it checks the registry.

DiCaPrIo 29-05-2020 04:19

Quote:

Originally Posted by BLACKFIRE69 (Post 486076)
guys,
test this plz :D

VRam: 17592186044415 MB :eek:

Cesar82 29-05-2020 04:55

Quote:

Originally Posted by DiCaPrIo (Post 486077)
VRam: 17592186044415 MB :eek:

Also here.

Razor12911 29-05-2020 05:20

Quote:

Originally Posted by DiCaPrIo (Post 486077)
VRam: 17592186044415 MB :eek:

Me wondering if this would be enough for Crysis Remastered :rolleyes:

Quote:

Originally Posted by BLACKFIRE69 (Post 486079)
my god! :eek:

this may fix, plz test too.

Code:

GpuName:  Intel(R) HD Graphics 4600
VRam:  1024 MB

My GTX 1060 not detected and these Intel garbage graphics are also 128MB, not 1024MB

BLACKFIRE69 29-05-2020 05:25

Quote:

Originally Posted by Razor12911 (Post 486080)
Me wondering if this would be enough for Crysis Remastered :rolleyes:

yup 😎

BLACKFIRE69 29-05-2020 05:38

Quote:

Originally Posted by Razor12911 (Post 486080)

Code:

GpuName:  Intel(R) HD Graphics 4600
VRam:  1024 MB


i am making progress... :cool: :D

Quote:

My GTX 1060 not detected and these Intel garbage graphics are also 128MB, not 1024MB
Usually this is shown (128 or 512 --> 1 GB). :rolleyes:

DiCaPrIo 29-05-2020 05:54

GpuName: NVIDIA GeForce GTX 1060 6GB
VRam: -1 MB
use Int64


All times are GMT -7. The time now is 13:07.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com