I would like to know the version of all exe files in D: Drive (right click the exe, details tab, "Product version" field)

I have done a script which include sigcheck.exe from Sysinternals Suite; it finishes with a CSV file with all the exe files I include in the script, so, I have to put them manually.

The thing is, I want to do something to avoid writing the path of each exe files.

I tried with forfiles.exe /P D: /S /M *.exe but how can I get the results to be checked by the sigcheck.exe?

Thanks in advance


You can do that with a simple line in powershell, no need for external tools:

Get-ChildItem -Recurse -Filter "*.exe" D: |select fullname,@{n="ProductVersion";e={$_.versioninfo.productversion}}


FullName                        ProductVersion
--------                        --------------
D:\Program Files\7-Zip\7z.exe   18.06
D:\Program Files\7-Zip\7zFM.exe 18.06
D:\Program Files\7-Zip\7zG.exe  18.06
  • It works if the exe file is the root of D: but it is not searching inside of the other directories. Perhaps I thought in a complicated solution instead using only commands. Thanks Gerald. – Victor Jan 25 '19 at 10:53
  • The parameter -recurse makes it search for all .exe files under the target directory, including subdirectories. – Gerald Schneider Jan 25 '19 at 10:57
  • It took a long time to search all D: drive, that's why I thought it didn't work. Thanks for your help Gerald. – Victor Jan 25 '19 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.