if the app is listed on Add/remove programs, you can identify the msi command to execute previous to do a fresh install. Commonly the entry is on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall , and specific UninstallString like MsiExec.exe /I{23170F69-40C1-2702-0920-000001000000}.
So, you can do a GPO to run previously a CMD executing that command con Computer starts, and after push the new app.
This is one example for reinstall my Jabber with the last version with VBS:
On Error Resume Next
DIM fso
Dim version
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
x86=wshShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%")&"\Cisco Systems\Cisco Jabber\CiscoJabber.exe"
x64=wshShell.ExpandEnvironmentStrings("%PROGRAMFILES%")&"\Cisco Systems\Cisco Jabber\CiscoJabber.exe"
If (fso.FileExists(x86) or fso.FileExists(x64)) Then
version= CreateObject("Scripting.FileSystemObject").GetFileVersion(x86)
if (strcomp(version,"",1)=0) then
version= CreateObject("Scripting.FileSystemObject").GetFileVersion(x64)
'Wscript.echo "x64"
end if
'Wscript.Echo version & " en x86"
if (strcomp(version,"11.5.1.29337",1)=0) then
'Wscript.Echo "Tiene la ultima version"
else
'Wscript.Echo "Updating"
WshShell.Run "msiexec.exe /I ""\\server\sharefolder\CiscoJabberSetup.msi"" /quiet"
end if
Else
'WScript.Echo("Install as new app")
'WshShell.Run "msiexec.exe /I ""\\server\sharefolder\CiscoJabberSetup.msi"" /quiet"
End If
WScript.Quit()