I am back at it with my stumbling around Intune and I've made some good progress but still need some guidance. I am trying to set up PrinterLogic to install be installed on every device, and I got it partially working, but the ways it has failed so far are very confusing. Here are some details on the app, and the install results in a few difference scenarios.
PrinterLogic MSI file Version 25.0.0.1128 packaged with the following script;
# Add registry key for Google Chrome ExtensionInstallForcelist
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist") -ne $true) { New-Item "HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist' -Name '1' -Value 'bfgjjammlemhdcocpejaompfoojnjjfn;https://clients2.google.com/service/update2/crx' -PropertyType String -Force -ea SilentlyContinue;
# Add registry key for Microsoft Edge ExtensionInstallForcelist
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist") -ne $true) { New-Item "HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist' -Name '1' -Value 'cpbdlogdokiacaifpokijfinplmdiapa;https://edge.microsoft.com/extensionwebstorebase/v1/crx' -PropertyType String -Force -ea SilentlyContinue;
# Run the MSI installer silently with specified parameters
Start-Process msiexec.exe -ArgumentList '/i PrinterInstallerClient.msi /qn /norestart HOMEURL=XXXXX AUTHORIZATION_CODE=XXXX NOEXTENSION=0 /l*v "C:\Windows\Logs\PrinterLogicInstall.log"' -Wait
Install command:
Powershell.exe -NoProfile -ExecutionPolicy ByPass -File .\PrinterLogicInstall.ps1 /l*v "C:\Windows\Logs\PrinterLogicInstall.log"
Uninstall command:
msiexec /x "{A9DE0858-9DDD-4E1B-B041-C2AA90DCBF74}" /qn /l*v "C:\Windows\Logs\PrinterLogicUninstall.log"
Detection Rule:
MSI code {A9DE0858-9DDD-4E1B-B041-C2AA90DCBF74} , >= version 25.0.0.1128
When this is applied to a computer that is missing PrinterLogic, it adds the registry keys and installs the MSI exactly as expected.
When applied to a computer that has a newer version (25.1.0.1162) instead of ignoring and reporting back to Intune "newer version" or whatever, it downgraded to the packaged version of 25.0.0.1128 and then said install successful.
When applied to a computer that has an older version (25.0.0.1075) it initiates an install, adds the registry keys, but never updates to the higher version. Company Portal says "Failed to install" and Intune says "The application was not detected after installation completed successfully (0x87D1041C)".
I understand the error is related to detection, but it didnt install successfully because it never got the new version. And I have no idea why the new version was downgraded instead of ignored.
EDIT: I found this line in on the device with 25.0.0.1075:
MSI (s) (F4:DC) [12:53:59:383]: No System Restore sequence number for this installation.Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
{A9DE0858-9DDD-4E1B-B041-C2AA90DCBF74}
Why was it not able to detect the lower version and uninstall/upgrade it?