I'm trying to install a software in my computer using Powershell script.
Before install, I want to check if my installer file version is newer than the installed program.
For the installed program I can get the DisplayName, Version, etc...
but I need to get the DisplayName of the installer file before to make some queries with this DisplayName.
For instance
I have installed npp.7.9.5.Installer.x64 (Version 7.9.5) and
I want to install npp.8.1.7.Installer.x64 (Version 8.1.7)
I can get version and name with this, (for the installed programs in my computer).
Get-WmiObject -Class Win32_Product | select Name, Version
But I want to know if I can get the same info from my npp.8.1.7.Installer.x64.exe file, (something like extract info from the installer)