windows-admins / ConfigMgr

GNU General Public License v3.0
225 stars 57 forks source link

Repair-MSIApplication #105

Closed TeslaSysA closed 4 years ago

TeslaSysA commented 4 years ago

This function was written due to an interesting scenario we ran into, where an MSI would not repair or uninstall unless the file was in the same exact location it installed from. As we utilize MECM, this was an issue because the cache would often get cleared and the file was no longer there. The dev had no interest in fixing their product (even though their other products behaved correctly).

The script reads the fed MSI application, pulls the GUID, searches the registry for the InstallLocation value, then copies the file back to the original location and runs a repair from there.