Announcement

Collapse
No announcement yet.

Processor, Memory, OS, SSD and TPM information

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pawel
    replied
    Originally Posted by Anders View Post
    Just to clarify, when I say CPU (in software) I mean physical core or logical core, never physical package/socket. Most CPUs these days have multiple physical cores.
    I fully agree. But, the plugin purpose is to show basic PC parameters to know software can be installed or not.

    As you said, almost all PC has single CPU (with many cores/logical cores). But, in my opionion I don't need to get speed of single core. Just max clock is enough to know user can run installed software or not.

    Example:
    Let's assume that installed software require at least:
    Specification:
    - CPU 2 [GHz]
    - RAM 8 [GB]
    - VRAM 2 [GB]

    NSIS script can get that data using the SysInfo plugin and make a comparison.
    User:
    - CPU 2.4 [GHz] -> OK
    - RAM 16 [GB] -> OK
    - VRAM 1 [GB] -> ! -> Can not install - not enough memory.


    There is a small problem with multiple devices, best example is Video Adapter (Graphic Card). My laptop has 2 GPU:
    - integrated with CPU (Intel 4600)
    - dedicated GPU (GeForce GTX 850M)
    What is the best way to choose better one? I decided to use the following alghoritm.

    I get graphics card RAM ("AdapterRAM" in WMI Win32_VideoController class query) for each graphic card and gather data for GPU with more RAM. Simple and easy!

    Of course, the problem is that in my laptop my GeForce is Offline (Intel is active). However, NVIDIA GPU is more powerfull and this is the choice (if user for example install a game that requires more GPU RAM).

    I will try to implement this in SysInfo 1.1

    Leave a comment:


  • Anders
    replied
    Just to clarify, when I say CPU (in software) I mean physical core or logical core, never physical package/socket. Most CPUs these days have multiple physical cores.

    A physical CPU package (the hardware chip you see on the motherboard with your eyes) is usually just one except on big servers. They contain one or several physical cores. Each physical core is able execute one or several logical cores (hyper threading).

    GetFastestCPUMaximumCoreSpeed should compare either every physical core or every logical core. The result should be the same AFAIK but testing logical cores may be easier.


    (2 physical packages, 4 cores in each for a total of 8. 16 logical cores in total.)

    Leave a comment:


  • Pawel
    replied
    If I understand you well... Let's assume we have 2 CPU's .
    So, I should get clock speed for first CPU and second CPU. Compare them and return data for faster cpu... Than can be done relatively easy.

    Btw, most computers have 1 CPU and 1 graphic card.

    Leave a comment:


  • Anders
    replied
    For graphic cards it probably makes sense to return information for the default/currently active. Perhaps a parameter that you set to "" for the default or a number/index for a specific GPU if the user wants to check all of them.

    For CPUs the same somewhat applies although my suggestion for GetFastestCPUMaximumCoreSpeed should check all the CPUs and just return a usable number. I don't like the | pipe idea. Just using "" as input for some kind of default and an index or group/index pair for a specific CPU. What is the default? Who knows. Up until 2021 it did not matter much, most people just took the information from whatever CPU your thread is currently on but with the introduction of P/E cores you actually need to be specific in your internal code and should probably return the fastest CPU as the default.

    Leave a comment:


  • Pawel
    replied
    Originally Posted by Anders View Post
    Support queries for specific CPUs.
    There is a problem with devices that are more then 1 (CPU or Graphic Card, etc)
    I still don't know what would be the best for script user (dll caller).

    Maybe:
    CPU Name 1 | CPU Name 2
    CPU Speed 1 | SPU Speed 2

    But, user would have to know there are more then 1 device and would have to split it by "|".
    Graphic Card is a good example (it can be gpu buil-in CPU and external dedicated gpu). Maybe the answer is to chose active (default) and display info only for that one...
    How do you think?

    Leave a comment:


  • Anders
    replied
    Not wanting to mess with CPU specifics, I made a wiki page that dumps some information. (No TPM support since I don't have one)

    Leave a comment:


  • Anders
    replied
    Originally Posted by Pawel View Post
    PROCESSOR (CPU)
    Which CPU does it get this information from? We now have asymmetrical CPUs (A.K.A big.LITTLE). Intel calls these cores P-Cores and E-Cores and they are effectively different CPUs inside a single CPU chip. On top of this Windows Server probably supports hot-swapping CPUs.

    A few suggestions:

    Support queries for specific CPUs. Just naming these is hard. One solution is processor groups. When there are more than 64 cores there will be multiple groups. Input like "1.5" would mean core #5 in group #1. This scheme is annoying for the caller and maybe even annoying to implement with WMI but is easy with raw Win32. The other would just be a simple number ("winmgmts:root\cimv2:Win32_Processor='cpu0'"). Or support both.

    Something to help the OP here: GetFastestCPUMaximumCoreSpeed and GetSlowestCPUMaximumCoreSpeed. This should cover P-Cores vs E-Cores? For a game you probably only care about GetFastestCPUMaximumCoreSpeed.

    Leave a comment:


  • Pawel
    replied
    SysInfo 1.0 Plugin for NSIS is now ready to test.

    Plugin should run in Windows 7/8/10/11 with NSIS (unicode).
    Current version of plugin allows you to get the following data:

    OPERATING SYSTEM
    OS Caption | Manufacturer | Version | Build Number | Language | Locale | Code Set |
    Country Code | Edition ID | Display Version | Current Build Number | UBR | ReleaseID


    PROCESSOR (CPU)
    CPU Name | Description | Family | Manufacturer | Number of Cores | Number of Logical Processors |
    Architecture | Clock Speed | External Clock Speed | L2 Cache Size | L3 Cache Size


    MEMORY
    Total Physical Memory | Free Physical Memory | Used Physical Memory
    Total Virtual Memory | Free Virtual Memory | Used Virtual Memory
    Total PageFile Memory | Free PageFile Memory | Used PageFile Memory
    Total Installed Memory | Total Reserved Memory


    STORAGE DEVICE
    Disk Name | Disk Serial Number | Disk File System | Disk Drive Type | Disk Media Type
    Disk Drive Total Size | Disk Drive Free Space | Disk Drive Used Space
    Drive Media Type | Drive Model | Drive Description | Drive Manufacturer | Drive Serial Number
    Drive Interface Type | Drive Media Type | Drive Total Cylinders | Drive Tracks/Cylinder
    Drive Total Tracks | Drive Sectors/Track | Drive Total Sectors | Drive Bytes/Sector |
    Drive Total Heads | Drive Size


    TRUSTED PLATFORM MODULE
    IsActivated_InitialValue | IsEnabled_InitialValue | IsOwned_InitialValue |
    SpecVersion | ManufacturerVersion | ManufacturerVersionInfo | ManufacturerId | PhysicalPresenceVersionInfo


    Please, take a look into attached demo script, where you can see how to use it.

    -Pawel
    Attached Files
    Last edited by Pawel; 28 September 2022, 15:02.

    Leave a comment:


  • Pawel
    replied
    Originally Posted by Mike-Sean View Post
    Did u get a chance to create the Plugin for the above data?
    I am slowly trying to create something... But, it will take few more days...

    You can check the follwoing demo. It should get info for Operating System and TPM

    Ps: I am not promising anything more soon... However, I am planning to add CPU/RAM and maybe Storage info tomorrow....

    Edit: Link removed. See below.
    Last edited by Pawel; 28 September 2022, 13:02.

    Leave a comment:


  • Mike-Sean
    replied
    Hi Pawel,

    Did u get a chance to create the Plugin for the above data?

    Leave a comment:


  • Anders
    replied
    I don't know what your script looks like but you are checking the powershell.exe exit code and you are missing a pop.

    PHP Code:
    Section 
    nsExec
    ::ExecToStack '"$sysdir\cmd.exe" /C echo Hello World %random%'
    Pop $0
    Pop 
    $1
    MessageBox MB_OK 
    'Process exit code: $0$\n$\nStdOut: $1'
    SectionEnd 

    Leave a comment:


  • Mike-Sean
    replied
    I have written Nsis script like below:
    Push $R0
    nsExec::ExecToStack 'powershell -inputformat none -ExecutionPolicy RemoteSigned -File ""$EXEDIR\GetHWInfo1.ps1""'
    Pop $R0

    ${If} $R0 == '0'
    MessageBox MB_OK "SSD exists"
    ${Else}
    MessageBox MB_OK " SSD not exists"
    ${EndIf}

    Is this correct?

    Leave a comment:


  • Anders
    replied
    The nsExec plug-in can catch stdout strings.

    Alternatively you can write it to a .ini in $pluginsdir. Make PS output something like
    [ssd]
    0=name1here
    1=name2here
    and use the NSIS ini functions to read 0..N-1

    Leave a comment:


  • Mike-Sean
    replied
    And i have added the below powershell script to get the SSD info:
    ForEach ($disk in (Get-PhysicalDisk | Select-Object FriendlyName, MediaType)){
    If ($disk.MediaType -eq 'SSD'){
    $SSDName = $disk.FriendlyName
    Write-host "SSD name " : $SSDName
    break
    }
    }

    This script i called from my .nsi script but how do i get the actual output from powershell to nsi script and get displayed?

    Leave a comment:


  • Mike-Sean
    replied
    Hi Thanks for your reply.

    Yes i need a plugin which gives all these information like :
    - CPU Name
    - Total RAM - In GB
    - OS Name, Version
    - SSD -> Need Name of the SSD and Type
    - TPM -> Need Active or not and type or Name of TPM.

    It would be great if you provide me this plugin information.

    Leave a comment:

Working...
X
😀
🥰
🤢
😎
😡
👍
👎