I am wondering if anyone can give me some insight as to how to setup a script that will look at a folder on your computer (say C:\Windows\System32) and be able to look at the files within the folder to compare against a predefined Hash Table.
This Hash table will have information about identical files found in the "system32" folder and then locate the files that have wrong versions. The hash table will consist of Files and their versions.
Example:
advapi32.dll 6.1.7600.16385
comctl32.dll 6.1.7600.16385
comdlg32.dll 6.1.7600.16385
gdi32.dll 6.1.7600.16385
After files with wrong versions are found, the output would list the files in question in a table format.
I know I have to use [System.Diagnostics.FileVersionInfo] to find a method that helps get the version info for a file. I know I'd have to use the .productVersion
property for my comparison.
I'm not sure how to get started. If there's more info you need, please let me know.