TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

Uninstallation error - AI_PrepareRevokePermissions

Hello!

I'm working with advanced installer 17.6 (yes it's old) and on a specific computer, we are unable to uninstall our application package or upgrade to a newer version of our package. The package is exe with msi inside.
Funny enough, the same package works as expected on all other environments, so not a aip issue (in theory), and likely an environment issue.

Here is a quick extract of the log when uninstalling (with names redacted):

Code: Select all

Action start 16:15:59: AI_IIsRemove.
Action ended 16:15:59: AI_IIsRemove. Return value 1.
MSI (s) (9C!FC) [16:15:59:709]: PROPERTY CHANGE: Deleting AI_IIsRemove property. Its current value is 'ProductNameMyProductProductCode{AA63687B-8208-4B57-A7DE-1F4ACDE7B2A0}IISOPENMMCIISBACKUPAFTERIISINSTALLPOLICYOVERWRITEAI_ISMAINTENANCEIISPRESERVEONUPGRADEIIS_PRESERVE_CUSTOMIZATIONSUPGRADINGPRODUCTCODE{41D1464F-E738-488C-B336-191B3B3C9B47}0MyComponentPool14465-1-1-1-1-1240-1-1-1-1-1-1-1-1-11MyProductPool14469-1-1-1-1-1240-1-1-1-1-1-1-1-1-10C:\Program Files (x86)\My Company\MyProduct\149761513index.html, index.htm, default.htmDefault Web Site:80:0-1-1-1-11C:\inetpub\wwwroot\137473513index.html, index.htm, default.htmDefault Web Site:80:0-1-1-1-10C:\inetpub\wwwroot\MyComponent\137409513MyComponentPoolMyComponent11C:\inetpub\wwwroot\MyProduct\133313513MyProductPoolMyProduct1'.
Action ended 16:15:59: AI_IIsUninstall. Return value 1.
MSI (s) (9C:C8) [16:15:59:730]: Doing action: AI_PrepareRevokePermissions
Action start 16:15:59: AI_PrepareRevokePermissions.
MSI (s) (9C:7C) [16:15:59:820]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI84D2.tmp, Entrypoint: OnPrepareRevokePermissions
MSI (s) (9C!AC) [16:15:59:894]: PROPERTY CHANGE: Adding AI_CA_MODULE_ID property. Its value is 'C:\Support\MyProductSetup25.3.0.2.exe'.
MSI (s) (9C!AC) [16:16:00:047]: PROPERTY CHANGE: Adding AI_RevokePermissions.C:\Support\MyProductSetup25.3.0.2.exe property. Its value is 'DBBackup_DirCreateFolderEveryone1610809791DBBackup_1_DirCreateFolderEveryone1610809791Logs_1_DirCreateFolderIIS_IUSRS1880096767SHORTCUTDIRTARGETDIRSHORTC~1|SHORTCUTDIRC:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyProduct\DBBackup_DirMyToolx86_DirDBBackupC:\Program Files (x86)\MyProd\MyToolx86\DBBackup\DBBackup_1_DirMyToolx64_DirDBBackupC:\Program Files (x86)\MyProd\MyToolx64\DBBackup\Logs_1_DirMyProduct_DirLogsC:\inetpub\wwwroot\MyProduct\Logs\SpecificScripts_2_DirMyToolx86_DirSPECIF~1|SpecificScriptsC:\Program Files (x86)\MyProd\MyToolx86\SpecificScripts\SpecificScripts_1_DirScripts_DirCustomC:\Program Files (x86)\MyProd\MyToolx86\Scripts\Custom\SpecificScripts_3_DirMyToolx64_DirSPECIF~1|SpecificScriptsC:\Program Files (x86)\MyProd\MyToolx64\SpecificScripts\SpecificScripts_DirScripts_1_DirCusto
MSI (s) (9C!AC) [16:16:00:048]: Doing action: AI_RevokePermissions.C:\Support\MyProductSetup25.3.0.2.exe
Action start 16:16:00: AI_RevokePermissions.C:\Support\MyProductSetup25.3.0.2.exe.
Action ended 16:16:00: AI_RevokePermissions.C:\Support\MyProductSetup25.3.0.2.exe. Return value 0.
MSI (s) (9C!AC) [16:16:00:054]: PROPERTY CHANGE: Deleting AI_CA_MODULE_ID property. Its current value is 'C:\Support\MyProductSetup25.3.0.2.exe'.
CustomAction AI_PrepareRevokePermissions returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:16:00: AI_PrepareRevokePermissions. Return value 3.
MSI (s) (9C:C8) [16:16:00:065]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (9C:C8) [16:16:00:067]: Machine policy value 'DisableRollback' is 0
MSI (s) (9C:C8) [16:16:00:067]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (9C:C8) [16:16:00:067]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (9C:C8) [16:16:00:067]: No System Restore sequence number for this installation.
MSI (s) (9C:C8) [16:16:00:067]: Unlocking Server
Action ended 16:16:00: INSTALL. Return value 3.



We tried many things (repair, reinstall, manually clean the installation, install again, clean the install again, create a new package with slight version update, etc) and the issue reappears at uninstall.

The only way I've been able to "correctly" remove the package, is by creating a transform, and add a "AND 0=1" condition on that specific custom action to bypass it.

My next step, would be to package the same software, using the latest version of Advanced installer, install it on that environment, and try un-installing it to see if either it works, or fails again.

If you have any hints, suggestions on debug options I could activate, or a debug dll I could use to troubleshoot the issue further, let me know.

Just tying to plan my next move on this issue, to understand what is going on...

Thanks!
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstallation error - AI_PrepareRevokePermissions

Hello,

That custom action is indeed one specific to Advanced Installer.

Now, why it is failing, I'm afraid I can't say for sure.

However, the most commond cause for this is the custom action being blocked by an AV product - a recent example that gave me some headaches is SentinelOne.

That being said, I would try, if any product is enabled, to disable it temporarily.

Another thing I'd try is using the Microsoft FixIt tool which helps in a lot of cases where the installation got corrupted.

Fix problems that block programs from being installed or removed
My next step, would be to package the same software, using the latest version of Advanced installer, install it on that environment, and try un-installing it to see if either it works, or fails again.
This is indeed a very good next step, as the version you are using is quite old (probably around 7 years old :D ).

However, the problem here is the uninstall of the version you already have installed there, so not quite sure how generating a new package with the latest version would help here, as we would still need to uninstall the previous version somehow. Even if installing and uninstalling the latest version works, we still need to get rid of the older vesrion built uisng 17.6.
If you have any hints, suggestions on debug options I could activate, or a debug dll I could use to troubleshoot the issue further, let me know.
Such debug dll is usually built on the spot for specific issues, so I do not have one right now, but if none of the solutions above work, I will discuss with the developer team to generate one.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”