Page 1 of 1

miabuild fails with \"Unable to initialize MSI database\"

Posted: Thu May 07, 2009 4:08 pm
by afriesen3
Evaluating InstallAware. Attempting to build from commandline:

Code: Select all

> miabuild xxxxx.mpr /o=C:\\Temp

InstallAware Command Line Build Utility

Build Project: xxxxx
Output Folder: C:\\Temp\\Release\\Uncompressed\Deployment Type: Uncompressed Directory Layout
Code Signing: Disabled
Compression: Best
Compiler Variables: BUILDROOT=C:\\Build\\Src,BUILDVERSION=3.99.99999
###
Cleared output folder C:\\Temp\\Release\\Uncompressed\Error during build: Unable to initialize MSI database, recommend IDE restart (or verify build folder permissions)

Build failed

>
It's from the commandline, so no IDE to restart. I manually created the output folder, so should not be a build folder permissions problem.

The project successfully builds from the IDE.

Thanks,

Posted: Thu May 07, 2009 4:19 pm
by bokkie
Aaron,

Have you tried deleting the Release folder before you run miabuild? Are you running miabuild with the IDE closed? I'm just wondering if some file resource might not be locked somewhere. I know for certain that I've had the IDE open when I've used miabuild so I'm not sure what might be causing your issue.

I suppose the old chestnut "It works on my machine" does not help? :wink:

Posted: Thu May 07, 2009 5:09 pm
by afriesen3
The IDE is not running. I have tried both with and without the output folders already existing.

Posted: Thu May 07, 2009 6:14 pm
by MichaelNesmith
Make sure no other software on your system is accessing the MSI file at the time of build. The only cause of this error is being unable to get a write handle to the target MSI file.

Posted: Fri May 08, 2009 11:11 am
by afriesen3
Nothing is accessing the MSI file. There is no MSI file yet. It is a brand new build in a completely empty directory.

After playing around a bit more, the problem appears to be that the current directory MUST be the directory containing the mpr file. It fails if the directory is anywhere else. I didn't find this requirement in the documentation, but it is an easy enough thing to do.

Posted: Fri May 08, 2009 11:32 am
by MichaelNesmith
Interesting. Are you not specifying the full path to the MPR file?

Posted: Fri May 08, 2009 11:37 am
by afriesen3
Yes, I was specifying a full path to the mpr file. I tried both relative and absolute paths. If you do not specify the full path the error is "Project file not found".