VirtualBox 1.6.0 setup another example of the second law of thermodynamics

VirtualBox, the desktop virtualization product acquired by Sun Microsystems in February, shipped version 1.6.0 on Friday. I previously mentioned VirtualBox in my blog post on setup testing with virtual machines. I lauded their clean setup and low custom-action count.

Unfortunately, the latest version hasn’t kept up that standard of Setup Goodness™.

The x64 package isn’t marked with the x64 platform template. I suspect that was intentional, as it allows the package to be opened and then canceled with a more friendly error message than the stock message Windows Installer provides. Nonetheless, it throws a bunch of ICE errors because MSI treats the package as 32-bit.

They also added a custom action: ActionRemoveDataFiles. Nothing to get too worked up about, but it’s like they tried to cram into one CA all the possible wrong things you can do with CAs:

  1. It’s VBScript. Evil. One day after release, a user started a thread on the VirtualBox support forum about getting a 2738 error on Windows Vista.
  2. It’s an immediate CA that modifies machine state.
  3. As an immediate CA, it runs impersonating the installing user, so attempts to delete files outside that user’s profile will fail unless the user started the setup as an administrator.
  4. It doesn’t have a “matching” rollback CA to undo what it does.
  5. It tries to “clean up” user data — including the virtual machine and disk configuration.
  6. It tries to clean up all users’ data, even those who aren’t logged in. That’s going to fail for roaming profiles, because the MSI server doesn’t have permissions to the remote data.
  7. It’s scheduled in InstallExecuteSequence but shows message boxes to prompt the user for permission to clean up files. CAs scheduled in InstallExecuteSequence should never show UI; all UI should be handled via CAs scheduled in InstallUISequence or via dialog boxes in the Back/Next wizard sequence.
  8. The CA’s condition in InstallExecuteSequence uses “UILevel>2” presumably so the message boxes are shown when the user uninstalls VirtualBox from Add/Remove Programs (Programs and Features on Vista). Unfortunately, it violates the contract MSI provides for “basic UI” mode. Using the /qb or /passive switches is commonly used in automated installations to show modeless progress UI without ever showing a modal prompt. ActionRemoveDataFiles will show modal UI during any uninstall other than with the /silent or /qn switches.
    To be fair, the shell folks who designed ARP and the MSI folks are partially responsible: They didn’t provide a UI level that says “I’m uninstalling interactively from ARP, so it’s OK to show some modal UI.”

Worst of all: This particular custom action makes it way too easy to delete gigabytes of virtual machine configuration and drives with no more than an accidental Yes button click. <shudder/>

5 thoughts on “VirtualBox 1.6.0 setup another example of the second law of thermodynamics”

  1. In their defense, they probably had a customer say “But your product installs SO MUCH DATA and then doesn’t clean it up on uninstall!!!”

  2. It does kind of sound like a committee decision. 🙂 Of course, that’s why I gave this post the title I did: Just because you start with a clean slate doesn’t mean it stays that way without effort.

  3. If you had to satisfy the requirement to prompt/allow users to have all the folders and files created by the install deleted during the uninstall, how would you do it?

    I guess you would have a dialog with an appropriate checkbox in UI sequence, setting the property which conditions deferred CA in execute sequence?!

    Without Wizard UI, users would never get all of their files and folders deleted which seems right. For silent batch-based uninstalls a property set on msiexec command line could do the job.

Comments are closed.