aaronparker / packagefactory

A packaging factory for Microsoft Intune using Evergreen, VcRedist, and IntuneWin32App
https://stealthpuppy.com/packagefactory/
MIT License
62 stars 19 forks source link

checks for correct GUID in UninstallCommand with real .msi file #16

Closed Constey closed 1 year ago

Constey commented 1 year ago

Hi Aaron,

i've added another check in Create-Win32App.ps1 which extracts the GUID in app.json: "UninstallCommand": "MsiExec.exe /X \"{5140803c-3de4-49a7-9565-78be00a11a16}\" /quiet", and tries to find the real GUID from the .msi package itself with $msiID = Get-MsiProductCode(Join-Path -Path $SourceFolder -ChildPath $($appdata.PackageInformation.SetupFile))

so when evergreen updates an msi package and the publisher has changed the GUID, we can go for sure that we have a correct uninstall script.

Kind regards, Constantin

aaronparker commented 1 year ago

Could you re-create this PR? I accidentally merged into main so had to revert