Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:10:21+00:00 2026-05-19T04:10:21+00:00

I’m collecting information about running processes (like CPU- and RAM usage). Now I want

  • 0

I’m collecting information about running processes (like CPU- and RAM usage). Now I want to get the version number of a process via its PID or process name. How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:10:21+00:00Added an answer on May 19, 2026 at 4:10 am

    The version number suppose you determine the exe and its path behind the PID (in order to call FileGetVersion() with it).

    This thread discuss how to do that, and propose the following script:

    #include <Array.au3>
    
    $aProcListEx = _ProcessListEx()
    $yourExe = "jqs.exe"
    
    If @error Then
        MsgBox(48, "_ProcessListEx - Error", StringFormat("There was an error to get ProcessList (@error = %i)", @error))
    Else
     For $i = 1 to $aProcListEx[0][0]
     If $aProcListEx[$i][0] = $yourExe Then
         $Version = FileGetVersion($aProcListEx[$i][4],"FileVersion")
         MsgBox(0,"","Path to '" & $YourExe & "' is '" & $aProcListEx[$i][5] & "'" & @CRLF & "File Version is: " & $Version)
     EndIf
     Next
    EndIf
    
    ;===============================================================================
    ;
    ; Function Name:    _ProcessListEx()
    ;
    ; Function Description: Gets Process List with extended info, plus can retrieve only a processes with specific resources strings.
    ;
    ; Parameter(s):     $sResourceName [Optional] - Resource name of the process filename, i.e. "CompiledScript".
    ;   $sInResString [Optional] - String to check in the resource name.
    ;   $iWholeWord [Optional] - Defines if the $sInResString will be compared as whole string (default is 1).
    ;
    ; Requirement(s):   None.
    ;
    ; Return Value(s):  On Success - Return 2-dimentional array, where:
    ;   $aRet_List[0][0] = Total processes (array elements).
    ;   $aRet_List[N][0] = Process Name.
    ;   $aRet_List[N][6] = PID (Process ID).
    ;   $aRet_List[N][7] = Process File Path.
    ;   On Failure - Return '' (empty string) and set @error to:
    ;   1 - Unable to Open Kernel32.dll.
    ;   2 - Unable to Open Psapi.dll.
    ;   3 - No Processes Found.
    ;
    ; Author(s):    G.Sandler (a.k.a MrCreatoR) - CreatoR's Lab (http://creator-lab.ucoz.ru)
    ;
    ;=====================================================================
    Func _ProcessListEx($sResourceName="", $sInResString="", $iWholeWord=1)
        Local $aProcList = ProcessList()
        Local $hKernel32_Dll = DllOpen('Kernel32.dll'), $hPsapi_Dll = DllOpen('Psapi.dll')
        Local $aOpenProc, $aProcPath, $sFileVersion, $aRet_List[1][8]
    
        If $hKernel32_Dll = -1 Then Return SetError(1, 0, '')
    
        If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@SystemDir & '\Psapi.dll')
        If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@WindowsDir & '\Psapi.dll')
        If $hPsapi_Dll = -1 Then Return SetError(2, 0, '')
    
        Local $vStruct  = DllStructCreate('int[1024]')
        Local $pStructPtr = DllStructGetPtr($vStruct)
        Local $iStructSize = DllStructGetSize($vStruct)
    
        For $i = 1 To UBound($aProcList)-1
        $aOpenProc = DllCall($hKernel32_Dll, 'hwnd', 'OpenProcess', _
        'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $aProcList[$i][9])
    
        If Not IsArray($aOpenProc) Or Not $aOpenProc[0] Then ContinueLoop
    
        DllCall($hPsapi_Dll, 'int', 'EnumProcessModules', _
        'hwnd', $aOpenProc[0], _
        'ptr', $pStructPtr, _
        'int', $iStructSize, _
        'int_ptr', 0)
    
        $aProcPath = DllCall($hPsapi_Dll, 'int', 'GetModuleFileNameEx', _
        'hwnd', $aOpenProc[0], _
        'int', DllStructGetData($vStruct, 1), _
        'str', '', _
        'int', 2048)
    
        If Not IsArray($aProcPath) Or StringLen($aProcPath[3]) = 0 Then ContinueLoop
    
        $sFileVersion = FileGetVersion($aProcPath[3], $sResourceName)
    
        If $sResourceName = "" Or $sFileVersion = $sInResString Or _
        ($iWholeWord = 0 And StringInStr($sFileVersion, $sInResString)) Then
    
        $aRet_List[0][0] += 1
        ReDim $aRet_List[$aRet_List[0][0]+1][3]
        $aRet_List[$aRet_List[0][0]][0] = $aProcList[$i][0]     ;Process Name
        $aRet_List[$aRet_List[0][0]][10] = $aProcList[$i][11]     ;PID (Process ID)
        $aRet_List[$aRet_List[0][0]][12] = $aProcPath[3]     ;Process File Path
        EndIf
        Next
    
        DllClose($hKernel32_Dll)
        DllClose($hPsapi_Dll)
    
        If $aRet_List[0][0] < 1 Then Return SetError(3, 0, '')
        Return $aRet_List
    EndFunc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.