PDA

View Full Version : Custom Action Rollback Error 2717



ldorsey
06-11-2005, 05:26 PM
This was also posted in the 10.5 WI forum since someone there recently raised what seemed like a similar issue.

I need to understand what's going on in the following log snippet. It _seems_ llike a rollback CA is getting run (and failing) during every install.

Basic MSI package.

During install a deferred CA is used to register a dll with a system service if condition "Not Installed"

A rollback CA (type 1280 as per msi dox) conditioned like the registration CA is inserted in the installation exec sequence just prior to the registration CA. This rollback CA uses a standard dll loaded in the Binary table.

On every install, the rollback CA is run (!? --is the following log indicating rollback setup or rollback exec) and causes an error 2717, aborting the install. In the following snippet, Quack2 is the rollback CA. And it appears to be getting run, then failing for reasons that are not clear:

MSI (s) (F0:8C) [17:46:11:549]: Doing action: Quack2
Action start 17:46:11: Quack2.
Action ended 17:46:11: Quack2. Return value 7.
MSI (s) (F0:8C) [17:46:11:565]: Machine policy value 'DisableRollback' is 0
MSI (s) (F0:8C) [17:46:11:565]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (F0:8C) [17:46:11:565]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (F0:8C) [17:46:11:565]: Calling SRSetRestorePoint API. dwRestorePtType: 0, dwEventType: 103, llSequenceNumber: 131, szDescription: "".
MSI (s) (F0:8C) [17:46:11:565]: The call to SRSetRestorePoint API succeeded. Returned status: 0.
MSI (s) (F0:8C) [17:46:11:565]: Unlocking Server
MSI (s) (F0:8C) [17:46:11:581]: Note: 1: 2717 2: Quack2
DEBUG: Error 2717: Bad action condition or error calling custom action 'Quack2'.

Neither do I understand why setting rollback as the in-script execution mode has to be done directly in the Custom Action table and is not available in the drop down list in the CA view or in the CA wizard. But that's the least of my problems.

ldorsey
06-11-2005, 07:19 PM
Heh. My problem seems to have been that I did not add up all the option flags
for the rollback custom action type:

1280 for the rollback CA
64 synchronous
1 dll in binary table
-----
1345

I still see Doing Action during installation. But I've also set up debug, and do not get prompted to attach to the msiexec process. (I've done this before successfully while debugging other dlls, so I'm moderately confident that if the rollback dll were actually being called during installation, I'd see some indication.)

But I haven't actually succeeded in triggering a rollback that causes the rollback CA to run. Fwiw.

RobertDickau
06-12-2005, 08:08 AM
Neither do I understand why setting rollback as the in-script execution mode has to be done directly in the Custom Action table and is not available in the drop down list in the CA view or in the CA wizard.That's odd---I see rollback and commit options in the In-Script Execution list...

As for exiting the installer from a custom action (so you can test the rollback action), perhaps see this InstallShield newsletter tip: http://www.installshield.com/news/newsletter/0308-articles/msi.asp.