Discussion:
[WiX-users] Decompiling Visual Studio MSI
Mike Murray
17 years ago
Permalink
I have a Setup Project in Visual Studio 2008 for a product we have created. I would like to move it to WiX so that I can have more control over the installer package creation.

I tried using the Dark utility on it to decompile it into a WiX source file. It fails by throwing an InvalidCastException when it reaches the Control table while trying to get the X column value (saying it's "Unable to cast object of type 'System.Int32' to type System.String'").

I looked through the source of Dark.exe and the only thing I could find is that the Control object stores the X property as a String, but I wonder if the ColumnDefinition for X is declared as (or dynamically inferred as) an Integer. Then when it calls the X property's get method, it tries to get the value out of the Fields property using a string cast of the object rather than a Convert.ToInt32() call. But I'm not totally sure...

Anyway, I tried this with a very small test application and setup project. It also got the InvalidCastException at the same spot. So it appears maybe all Visual Studio produced MSI installer are having this problem when trying to decompile them using Dark?

Any thoughts or ideas how I can migrate to WiX? Thanks in advance.

Mike
Rob Mensching
17 years ago
Permalink
What version of the WiX toolset are you using?

From: wix-users-***@lists.sourceforge.net [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 14:57
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] Decompiling Visual Studio MSI

I have a Setup Project in Visual Studio 2008 for a product we have created. I would like to move it to WiX so that I can have more control over the installer package creation.

I tried using the Dark utility on it to decompile it into a WiX source file. It fails by throwing an InvalidCastException when it reaches the Control table while trying to get the X column value (saying it's "Unable to cast object of type 'System.Int32' to type System.String'").
I looked through the source of Dark.exe and the only thing I could find is that the Control object stores the X property as a String, but I wonder if the ColumnDefinition for X is declared as (or dynamically inferred as) an Integer. Then when it calls the X property's get method, it tries to get the value out of the Fields property using a string cast of the object rather than a Convert.ToInt32() call. But I'm not totally sure...

Anyway, I tried this with a very small test application and setup project. It also got the InvalidCastException at the same spot. So it appears maybe all Visual Studio produced MSI installer are having this problem when trying to decompile them using Dark?

Any thoughts or ideas how I can migrate to WiX? Thanks in advance.

Mike
Mike Murray
17 years ago
Permalink
I found version 3.0.3907.0 at http://wix.sf.net/releases/ a few weeks ago.

It seems to be the latest I can find. Can anyone replicate my problem of trying to decompile VS MSI install packages?

Thanks in advance.

Mike



From: Rob Mensching
Sent: Wednesday, April 16, 2008 6:10 PM
To: Mike Murray ; wix-***@lists.sourceforge.net
Subject: RE: [WiX-users] Decompiling Visual Studio MSI


What version of the WiX toolset are you using?



From: wix-users-***@lists.sourceforge.net [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 14:57
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] Decompiling Visual Studio MSI



I have a Setup Project in Visual Studio 2008 for a product we have created. I would like to move it to WiX so that I can have more control over the installer package creation.



I tried using the Dark utility on it to decompile it into a WiX source file. It fails by throwing an InvalidCastException when it reaches the Control table while trying to get the X column value (saying it's "Unable to cast object of type 'System.Int32' to type System.String'").

I looked through the source of Dark.exe and the only thing I could find is that the Control object stores the X property as a String, but I wonder if the ColumnDefinition for X is declared as (or dynamically inferred as) an Integer. Then when it calls the X property's get method, it tries to get the value out of the Fields property using a string cast of the object rather than a Convert.ToInt32() call. But I'm not totally sure...



Anyway, I tried this with a very small test application and setup project. It also got the InvalidCastException at the same spot. So it appears maybe all Visual Studio produced MSI installer are having this problem when trying to decompile them using Dark?



Any thoughts or ideas how I can migrate to WiX? Thanks in advance.



Mike
Bob Arnson
17 years ago
Permalink
Post by Mike Murray
I found version 3.0.3907.0 at http://wix.sf.net/releases/ a few weeks ago.
It seems to be the latest I can find. Can anyone replicate my
problem of trying to decompile VS MSI install packages?
There's a known bug in that version, fixed in 3.0.4014.0. That release
has a different bug: You need to edit dark.exe.config to remove
WixDirectXExtension from the list of extensions it loads.
--
sig://boB
http://joyofsetup.com/
Rob Mensching
17 years ago
Permalink
Can you provide the full stack trace and open a bug? This is definitely an issue with Dark and it would be good to get it sorted out. There are several cases where the casts are wrong or nullable fields are not be treated correctly.


From: wix-users-***@lists.sourceforge.net [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 17:17
To: wix-***@lists.sourceforge.net
Subject: Re: [WiX-users] Decompiling Visual Studio MSI

I found version 3.0.3907.0 at http://wix.sf.net/releases/ a few weeks ago.

It seems to be the latest I can find. Can anyone replicate my problem of trying to decompile VS MSI install packages?

Thanks in advance.

Mike


From: Rob Mensching<mailto:***@microsoft.com>
Sent: Wednesday, April 16, 2008 6:10 PM
To: Mike Murray<mailto:***@hotmail.com> ; wix-***@lists.sourceforge.net<mailto:wix-***@lists.sourceforge.net>
Subject: RE: [WiX-users] Decompiling Visual Studio MSI

What version of the WiX toolset are you using?

From: wix-users-***@lists.sourceforge.net<mailto:wix-users-***@lists.sourceforge.net> [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 14:57
To: wix-***@lists.sourceforge.net<mailto:wix-***@lists.sourceforge.net>
Subject: [WiX-users] Decompiling Visual Studio MSI

I have a Setup Project in Visual Studio 2008 for a product we have created. I would like to move it to WiX so that I can have more control over the installer package creation.

I tried using the Dark utility on it to decompile it into a WiX source file. It fails by throwing an InvalidCastException when it reaches the Control table while trying to get the X column value (saying it's "Unable to cast object of type 'System.Int32' to type System.String'").
I looked through the source of Dark.exe and the only thing I could find is that the Control object stores the X property as a String, but I wonder if the ColumnDefinition for X is declared as (or dynamically inferred as) an Integer. Then when it calls the X property's get method, it tries to get the value out of the Fields property using a string cast of the object rather than a Convert.ToInt32() call. But I'm not totally sure...

Anyway, I tried this with a very small test application and setup project. It also got the InvalidCastException at the same spot. So it appears maybe all Visual Studio produced MSI installer are having this problem when trying to decompile them using Dark?

Any thoughts or ideas how I can migrate to WiX? Thanks in advance.

Mike
Mike Murray
17 years ago
Permalink
It appears this bug is fixed in version 3.0.4014.0 (http://wix.sf.net/releases/). I did have to remove the WixDirectXExtension from Dark.exe.config, though, as Bob Arnson suggested.

Thanks.

Mike


From: Rob Mensching
Sent: Wednesday, April 16, 2008 11:55 PM
To: Mike Murray ; wix-***@lists.sourceforge.net
Subject: RE: [WiX-users] Decompiling Visual Studio MSI


Can you provide the full stack trace and open a bug? This is definitely an issue with Dark and it would be good to get it sorted out. There are several cases where the casts are wrong or nullable fields are not be treated correctly.





From: wix-users-***@lists.sourceforge.net [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 17:17
To: wix-***@lists.sourceforge.net
Subject: Re: [WiX-users] Decompiling Visual Studio MSI



I found version 3.0.3907.0 at http://wix.sf.net/releases/ a few weeks ago.



It seems to be the latest I can find. Can anyone replicate my problem of trying to decompile VS MSI install packages?



Thanks in advance.


Mike





From: Rob Mensching

Sent: Wednesday, April 16, 2008 6:10 PM

To: Mike Murray ; wix-***@lists.sourceforge.net

Subject: RE: [WiX-users] Decompiling Visual Studio MSI



What version of the WiX toolset are you using?



From: wix-users-***@lists.sourceforge.net [mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Mike Murray
Sent: Wednesday, April 16, 2008 14:57
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] Decompiling Visual Studio MSI



I have a Setup Project in Visual Studio 2008 for a product we have created. I would like to move it to WiX so that I can have more control over the installer package creation.



I tried using the Dark utility on it to decompile it into a WiX source file. It fails by throwing an InvalidCastException when it reaches the Control table while trying to get the X column value (saying it's "Unable to cast object of type 'System.Int32' to type System.String'").

I looked through the source of Dark.exe and the only thing I could find is that the Control object stores the X property as a String, but I wonder if the ColumnDefinition for X is declared as (or dynamically inferred as) an Integer. Then when it calls the X property's get method, it tries to get the value out of the Fields property using a string cast of the object rather than a Convert.ToInt32() call. But I'm not totally sure...



Anyway, I tried this with a very small test application and setup project. It also got the InvalidCastException at the same spot. So it appears maybe all Visual Studio produced MSI installer are having this problem when trying to decompile them using Dark?



Any thoughts or ideas how I can migrate to WiX? Thanks in advance.



Mike

Continue reading on narkive:
Search results for '[WiX-users] Decompiling Visual Studio MSI' (Questions and Answers)
3
replies
Any software that can Build a Database application and make it .exe file?
started 15 years ago
programming & design
Loading...