Process Walking - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Process Walking

How can I get the full path of the exe filenames ?
The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.

Comments

  • zibadianzibadian Posts: 6,349Member
    : How can I get the full path of the exe filenames ?
    : The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.
    :
    :
    One way to get the full path is to use a iterative directory-tree-walk search using FindFirst(), FindNext(), and FindClose(). That's easy to code, but quite processor-heavy.
  • SeriSeri Posts: 28Member
    : : How can I get the full path of the exe filenames ?
    : : The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.
    : :
    : :
    : One way to get the full path is to use a iterative directory-tree-walk search using FindFirst(), FindNext(), and FindClose(). That's easy to code, but quite processor-heavy.
    :
    Yep it is far too heavy I think, is there any other way ?
  • erikkdrerikkdr Posts: 5Member
    : How can I get the full path of the exe filenames ?
    : The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.
    :
    :
    Hello!

    You can use following rows to extract it.

    var path: String;
    begin
    path := ExtractFilePath(application.Exname);
    end;


  • zibadianzibadian Posts: 6,349Member
    : : How can I get the full path of the exe filenames ?
    : : The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.
    : :
    : :
    : Hello!
    :
    : You can use following rows to extract it.
    :
    : var path: String;
    : begin
    : path := ExtractFilePath(application.Exname);
    : end;
    :
    :
    :
    That code does not give the path of the szExeName property, but only the path of the application, which is not necessarily the same application in the PROCESSENTRY32 record.
  • zibadianzibadian Posts: 6,349Member
    : : : How can I get the full path of the exe filenames ?
    : : : The szExeName property of PROCESSENTRY32 doesn't really show the full path but only the filename.
    : : :
    : : :
    : : One way to get the full path is to use a iterative directory-tree-walk search using FindFirst(), FindNext(), and FindClose(). That's easy to code, but quite processor-heavy.
    : :
    : Yep it is far too heavy I think, is there any other way ?
    :
    You can try the ExpandFilePath().
Sign In or Register to comment.