mpande
Posts: 64
Joined: Tue Sep 28, 2021 1:52 pm

Upgrade Error Cause

Running an upgrade we are consistently getting an error that prevents the upgrade from completing. It appears to be happening with the RemoveExistingProducts step. Logs are below(I've stripped out a good portion of the properties for brevity.):


MSI (s) (4C:5C) [00:16:09:963]: Skipping action: ReportSuccessCAHelper (condition is false)
MSI (s) (4C:5C) [00:16:09:963]: Skipping action: AI_DeleteLzma (condition is false)
MSI (s) (4C:5C) [00:16:09:963]: Doing action: InstallFinalize
Action start 0:16:09: InstallFinalize.
MSI (s) (4C:5C) [00:16:09:966]: User policy value 'DisableRollback' is 0
MSI (s) (4C:5C) [00:16:09:966]: Machine policy value 'DisableRollback' is 0
MSI (s) (4C:5C) [00:16:10:412]: Note: 1: 2318 2:
MSI (s) (4C:5C) [00:16:10:427]: Note: 1: 2318 2:
MSI (s) (4C:5C) [00:16:10:429]: Calling SRSetRestorePoint API. dwRestorePtType: 0, dwEventType: 103, llSequenceNumber: 77, szDescription: "".
MSI (s) (4C:5C) [00:16:10:432]: The call to SRSetRestorePoint API succeeded. Returned status: 0.
MSI (s) (4C:5C) [00:16:10:432]: Unlocking Server
MSI (s) (4C:5C) [00:16:10:439]: PROPERTY CHANGE: Deleting UpdateStarted property. Its current value is '1'.
Action ended 0:16:10: InstallFinalize. Return value 1.
MSI (s) (4C:5C) [00:16:10:443]: Skipping action: ScStartNabHospMon (condition is false)
MSI (s) (4C:5C) [00:16:10:443]: Doing action: AI_SecureProperty
Action start 0:16:10: AI_SecureProperty.
MSI (s) (4C:D4) [00:16:10:457]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC306.tmp, Entrypoint: AddSecuredProp
CustomAction AI_SecureProperty returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 0:16:10: AI_SecureProperty. Return value 3.
Action ended 0:16:10: INSTALL. Return value 3.
Property(N): APPDIR = C:\Nabancard\NabHospMon\
Property(N): DiskPrompt = [1]


(Lists a bunch of properties)


Property(N): PrimaryVolumeSpaceRequired = 0
Property(N): PrimaryVolumeSpaceRemaining = 0
CustomAction returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 0:16:10: RemoveExistingProducts. Return value 3.
Action ended 0:16:10: INSTALL. Return value 3.
Property(S): APPDIR = C:\Nabancard\NabHospMon\
Property(S): DiskPrompt = [1]

(Lists a bunch of properties)

Property(S): OutOfNoRbDiskSpace = 0
Property(S): PrimaryVolumeSpaceAvailable = 9370432
Property(S): PrimaryVolumeSpaceRequired = 8164
Property(S): PrimaryVolumeSpaceRemaining = 9362268
Property(S): PrimaryVolumePath = C:
MSI (s) (4C:44) [00:16:11:090]: MainEngineThread is returning 1603
MSI (s) (4C:58) [00:16:11:095]: RESTART MANAGER: Session closed.
MSI (s) (4C:58) [00:16:11:098]: RESTART MANAGER: Session closed.
MSI (s) (4C:58) [00:16:11:100]: User policy value 'DisableRollback' is 0
MSI (s) (4C:58) [00:16:11:100]: Machine policy value 'DisableRollback' is 0
MSI (s) (4C:58) [00:16:11:100]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (4C:58) [00:16:11:101]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (4C:58) [00:16:11:101]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (4C:58) [00:16:11:103]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (4C:58) [00:16:11:103]: Restoring environment variables
MSI (s) (4C:58) [00:16:11:104]: Destroying RemoteAPI object.
MSI (s) (4C:D4) [00:16:11:104]: Custom Action Manager thread ending.
MSI (c) (C4:24) [00:16:11:123]: Back from server. Return value: 1603
MSI (c) (C4:24) [00:16:11:123]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (C4:24) [00:16:11:125]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.
Action ended 0:16:11: ExecuteAction. Return value 3.
=== Verbose logging stopped: 3/15/2022 0:16:11 ===

Action ended 0:15:43: ProgressDlg. Return value 1.
MSI (c) (B4:40) [00:15:43:499]: Note: 1: 2205 2: 3: AI_TempFile
MSI (c) (B4:40) [00:15:43:499]: Note: 1: 2228 2: 3: AI_TempFile 4: SELECT `Property` FROM `AI_TempFile`
MSI (c) (B4:40) [00:15:43:499]: Note: 1: 2262 2: AI_PreRequisite 3: -2147287038
MSI (c) (B4:40) [00:15:43:499]: Note: 1: 2205 2: 3: AI_XmlLocator
MSI (c) (B4:40) [00:15:43:499]: Note: 1: 2228 2: 3: AI_XmlLocator 4: SELECT `Property` FROM `AI_XmlLocator`
MSI (c) (B4:40) [00:15:43:569]: Note: 1: 2205 2: 3: AI_ChainedPackage
MSI (c) (B4:40) [00:15:43:569]: Note: 1: 2228 2: 3: AI_ChainedPackage 4: SELECT `ChainedPackage` FROM `AI_ChainedPackage`
MSI (c) (B4:40) [00:16:11:159]: Doing action: FatalError
Action start 0:16:11: FatalError.
Action ended 0:16:13: FatalError. Return value 1.
MSI (c) (B4:40) [00:16:13:453]: Doing action: AI_SHOW_LOG
Action start 0:16:13: AI_SHOW_LOG.
MSI (c) (B4:F8) [00:16:13:455]: Invoking remote custom action. DLL: C:\Users\mpande\AppData\Local\Temp\MSICEC0.tmp, Entrypoint: LaunchLogFile
Action ended 0:16:13: AI_SHOW_LOG. Return value 1.
MSI (c) (B4:40) [00:16:13:648]: Doing action: FatalError
Action start 0:16:13: FatalError.
Action ended 0:16:13: FatalError. Return value 2.
MSI (c) (B4:40) [00:16:13:650]: Note: 1: 2205 2: 3: Environment
MSI (c) (B4:40) [00:16:13:650]: Note: 1: 2228 2: 3: Environment 4: SELECT `Environment`,`Component_` FROM `Environment`
MSI (c) (B4:40) [00:16:13:733]: Destroying RemoteAPI object.
MSI (c) (B4:74) [00:16:13:766]: Custom Action Manager thread ending.
=== Verbose logging stopped: 3/15/2022 0:16:13 ===


My interpretation of this is that the uninstall is failing on the AI_SECURE_PROPERTY step, and then the subsequent install is not attempted. I had moved the AI_SECURE_PROPERTY to the end of the table actions to avoid encrypted values being used as described in this post (viewtopic.php?f=2&t=49914&p=125681#p125681)

Is my interpretation correct in that we are failing to uninstall correctly because of AI_SECURE_PROPERTY? If so how can we address this? Is there a way to make the upgrade bulldoze past the un-installation error and continue with the upgrade?
Last edited by mpande on Tue Mar 15, 2022 4:47 pm, edited 1 time in total.
mpande
Posts: 64
Joined: Tue Sep 28, 2021 1:52 pm

Re: Upgrade Error Cause

I should be clear what I think is happening is that the SecureProp.dll is being removed during the Remove Resources step. Then after the Remove Resources step the uninstaller is trying to secure properties and fails to find the dll.
wholt@nabancard.com
Posts: 9
Joined: Mon Feb 01, 2021 11:15 pm

Re: Upgrade Error Cause

and to be really clear, this method of securing the password has repeatedly bitten us in the behind and has cost us countless hours in testing, creating workarounds, etc. So much to the point at I have to keep reminding my team NOT to create our own custom app JUST to get around a incorrect method that AI is using to protect OUR app secrets.

I never chimed in before but on this ticket but in what reality would I want you to take a known password to us, and have a third party app convert it into a 128 len string of something of which I would NEVER know my password again? That just makes absolutely no sense. I want to save my password securely in the installer setup data, and then you unsecure it, use it to create users, tasks, services, etc, NOT transform it into something unknown and use / feed it as the unknown into the respective result! InstallShield and other installers dont do what this does.

We worked around the first issue by 'changing' the order so you dont do your wacky logic, and now that seems to have created yet more issues on uninstalls? (which btw, does that mean its now unsecure in the installer data somewhere for someone to snag?)

If I spend X number of $'s on AI, and then spend Y # of dollars on creating workarounds, conversations, etc, then at some point one will start to wonder if it just doesnt make more sense to pay the 'other' place more $$$ and be done with it. I will say you have been mostly responsive, and most issues have been worked out, but being told I cant get a new update out the door because of AI, is not a thing a person responsible for the product want to hear. My two sore spots are the registry data in the body, and this very aggravating thing over secrets protection.

Regards,
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Upgrade Error Cause

Hello,

We are very sorry for the trouble you faced so far when trying to make use of our Secure Property support. I really understand your mood and I'm sorry for this, but as you already noticed our current Secure Property support is not tailored to fully cover your requirements.

I can confirm you the our Secure Property design is quite different than your actual requirements. What our support does is to simply encrypt the value of a property each time the setup runs.

So, each time the setup runs (during install, maintenance and uninstall mode) the setup will run our proprietary custom action (AI_SecureProperty) during "Install Execution Stage -> Preparing" action group.
screenshot.jpg
screenshot.jpg (354.03 KiB) Viewed 33211 times
When the AI_SecureProperty action runs the current value of the property (to be secured) is encrypted and the property value is updated to the encrypted value.

So, the property value will be secured/encrypted only after the install process moves beyond "Preparing" action group. After this stage, if you need to decrypt the value of the secure property you should create your own set of custom action that calls the "GetRevealedTextLength" and "RevealText" functions of our SecureProp.dll.

Actually the design of our secure property support is intended for customers that want to get user input (on the fly at install time), encrypt the input string and save it encrypted on target machine (e.g. in a file or registry value).

Now, getting back to the current issue you are facing with, can I kindly ask you to send us by email at support at advancedinstaller dot com the .AIP (project file) of your old setup version (the one whose uninstall fails) and a verbose log of the uninstall operation?

To create a verbose log of the uninstall process, please use a command line like this:

Code: Select all

setup.exe AI_DEBUGLOG=1 /L*V <pathToLog>\debugLog.txt
if you have an EXE setup package, or a command line like this:

Code: Select all

msiexec.exe /i setup.msi AI_DEBUGLOG=1 /L*V <pathToLog>\debugLog.txt
if you have an MSI setup package.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Upgrade Error Cause

Hi,

We have analyzed your setup projects configuration and most likely our "AI_SecureProperty" custom action fails during upgrade installation because you have modified its execution stage (i.e. to be last action executed during installation).

Please note that when you change the execution sequence number of the "AI_SecureProperty" action you should also update accordingly the execution sequence number of its preceding AI_DATA_SETTER action. The AI_DATA_SETTER action should be always executed right before the "AI_SecureProperty" action.

This is because the AI_DATA_SETTER action is used to pass to the "AI_SecureProperty" action the name of the properties you want to encrypt.


So, can you please proceed like this:

1. open your setup project in Advanced Installer and go to "Table Editor" page

2. select the "InstallExecuteSequence" table and edit the sequence number of the "AI_DATA_SETTER_3" action (e.g. to 6602) so it be executed right before "AI_SecureProperty" action
screenshot.jpg
screenshot.jpg (179.04 KiB) Viewed 33141 times

3. save and rebuild the setup project

NOTE: The above setup project configuration should be applied in both versions of your setup project: old and new one.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”