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.
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.