Error 2732 – Directory Manager not initialized

I was working with InstallShield 2011. It was a Basic MSI project. One of the features is to automatically show a checkbox in the final dialog of the installation to view the MSI logs, if MSI logging is enabled. This feature works if Windows Installer 4.0+ is installed in the target machine.

Now, if the installer fails during the LauchCondition action, the “Show the Windows Installer log” checkbox is checked and the wizard is closed, the following error is seen.

Error 2732 - Directory Manager not initialized

Searching at the InstallShield forums did not end up at a solution.

So, I started digging deeper to figure out a solution myself.

First, I found that the custom action that gets called on the “Finish” button click was ShowMsiLog

This action was not seen in Installation Designer | Behavior and Logic | Custom Actions and Sequences. So, I went to the Direct Editor and checked CustomAction table. Voila – There it was.

Type: 226. Name: ShowMsiLog.Now what does Type 226 mean? A quick look at MSDN gave some information about the Type field.

226 in binary is 11100010. The 6 least significant bits tells us the type of the custom action.

100010 in decimal is 34 – which means the custom action is “EXE file having a path referencing a directory”. And the Source column is a key to the Directory table. Sounds like the error is happening due to invoking a custom action that requires the Directory table to be completely constructed before it is actually done.

One solution that I could think of at that time was to change the custom action type to “EXE file having a path specified by a property value” (Type: 50), update the relevant entries and check if it works.

50 in binary is 110010. I did not want the execution scheduling and other options to be changed. So I got the binary value 11110010, which in decimal is 242. Type column was updated to 242.

Source column was set to NOTEPADPATH. I created a “Set Property” custom action, scheduled it before LaunchCondtion. I set NOTEPADPATH to [SystemFolder]\notepad.exe.

Target column refers to the command line argument that gets passed to the executable in Source column. It was set to [MsiLogFileLocation].

Recompiled the project and tested.

The problem was solved. 🙂


About jagathish

Everyday superhero!
This entry was posted in Installer and tagged , . Bookmark the permalink.

2 Responses to Error 2732 – Directory Manager not initialized

  1. Doc says:

    I was more hopeful than I should have been for this work around. This just fails in a similar way, quicker.

    Error 2732 Directory Manager not initialized. I don’t believe you can run this Set Directory action before CostFinalize 😦

  2. Doc says:

    Ack! You’re using a Set “Property” action. Silly me. I’ll try that.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s