Wix bug fix for importing InstallShield project with Dark
I have been spiking migrating our project’s InstallShield scripts to Wix. There are several good reasons to do this, which I will get to in another post.
But when trying to decompile the InstallShield msi using Dark I get the following error:
dark.exe : error DARK0001 : Cannot set column 'KeyColumn' with value 0 because it is less than the minimum allowed value for this column, 1. Exception Type: System.InvalidOperationException Stack Trace: at Microsoft.Tools.WindowsInstallerXml.ColumnDefinition.ValidateValue(Object value) at Microsoft.Tools.WindowsInstallerXml.Unbinder.UnbindDatabase(String databaseFile, Database database, OutputType outputType, String exportBasePath) at Microsoft.Tools.WindowsInstallerXml.Unbinder.UnbindDatabase(String databaseFile, OutputType outputType, String exportBasePath) at Microsoft.Tools.WindowsInstallerXml.Unbinder.Unbind(String file, OutputType outputType, String exportBasePath)
It turns out that InstallShield doesn’t put the right values in the _Validation table (whatever that is). Some hints are in this bug. It is next to impossible to fix it from the InstallShield side, so I did it by fixing the Wix side.
Note: You need to check out the CVS version of Wix to build it - the source downloads from the website do not work. No documentation on this anywhere of course. Sigh.
When you have the code compiling, the hack is simple - modify the columnDefinition for KeyColumn in the file src/wix/Data/tables.xml to allow 0’s in that column. Note that this is a hack not a solution. This may cause other problems and probably the Wix guys will need to fix this for real, maybe by supplying a default value. But it did allow me to export the MSI successfully.
Patch against the latest cvs:
Index: src/wix/Data/tables.xml
===================================================================
RCS file: /cvsroot/wix/wix/src/wix/Data/tables.xml,v
retrieving revision 1.49
diff -u -r1.49 tables.xml
--- src/wix/Data/tables.xml 21 Sep 2007 07:58:40 -0000 1.49
+++ src/wix/Data/tables.xml 21 Nov 2007 14:32:05 -0000
@@ -1482,7 +1482,7 @@
<columnDefinition name="KeyTable" type="string" length="255" nullable="yes"
category="identifier" description="For foreign key, Name of table to which data must link"/>
<columnDefinition name="KeyColumn" type="number" length="2" nullable="yes"
- minValue="1" maxValue="32" description="Column to which foreign key connects"/>
+ minValue="0" maxValue="32" description="Column to which foreign key connects"/>
<columnDefinition name="Category" type="string" length="32" nullable="yes"
set="Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL" description="String category"/>
<columnDefinition name="Set" type="string" length="255" nullable="yes"
May 9th, 2008 at 4:14 am
Hey,
Can you please send me the updated dark.exe.
Because i am not able to compile the wix source. There is some prebuild command which is not executing properly. Also i haven’t found any proper documentation for that.
Thanks,
Vasudev, Balu
August 18th, 2008 at 10:50 pm
Hi Chris,
Could you do me a favour to send a copy of the dark.exe you created to me?
In fact, I’m working on a similar project now, could you give me some suggestion about it?
Thanks
Dante
August 19th, 2008 at 3:25 am
Hi, thanks for your post. Could you also send me the updated dark.exe? Thanks!
August 25th, 2008 at 7:20 am
Hi,
I’m looking to move to wix but at the moment I can’t finish my evaluation as I can’t migrate to the WIX project. Could you please send me updated dark.exe?
Thanks,
Andoni
September 21st, 2008 at 4:47 am
Hi, could you please send me the updated dark.exe file?
(Perhaps you should put it on this page considering all the requests? :-)