Tool to validate the MSI packages

Tool to validate the MSI packages

I write a little utility for myself to validate MSI packages before submission. Validation algorithm is based on this topic Download Suggestions are welcomed.
8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Does the checks performed here suit the latest SDK? I only ask as I noticed the date of the first post was before it was released.

Hello dmitry

Your tool works fine.I checked some of my packages and it al went well.But recently when I vlidated one of my package it gives me this error

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.msi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.msi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at ValidateSetup.Main.ValidateMSI(String path, StatusCallbackType statusCallback)
at ValidateSetup.Main.btnValidate_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ValidateSetup
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/DOCUME~1/Akshay/LOCALS~1/Temp/Temporary%20Directory%201%20for%20validatesetup.zip/ValidateSetup.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

When I run my package it works well.There is no errors.It creates shortcuts and installa the necessary runtime if not installed.Then why is this error coming

Akshaynath,

It looks as though the tool cannot open the msi file (permissions or path issues perhaps). A quick look with Reflector should expose the source of the exception.

Hi,

Thank you. This is a very useful tool. I could test the msi package in a few seconds.

Regards,
Priya

Thanks Dmitry,

It appears to check the following in the selected MSI:

1.) Shortcuts do not contain "[]" characters
2.) That all shortcuts point to the same binary
3.) That a feature record exists for the target
4.) That a component record exists for the target
5.) That file records exist for the component
6.) That the file name format is correct

I will have to create a "bad" MSI later and test it out more thoroughly. Great contribution.

You have done a greate job.I just tested it and it works very fine.I can validate my packages very easily.

Thank you for your feedback! If you think this application can be more useful - just let me know.

Login to leave a comment.