onsdag den 9. november 2011

Hello WiRunSQL

I am working with MSI at the time being. It started with the Visual Studio setup project which is easy, but not allways that good in larger projects. Then I found Orca which is good at the developing point. I needed to put some parameters into the package. I knew this could be done by a transformation file (mst) or directly as properties. But eventhough how well I tried to document it there would still be problems. Sometimes the IT-professionals forgot to apply the transformation or the properties, or the rollout method didn't support it.

Then I thought, what if we batched it? On the Google quest I found out that WiRunSQL that also could be found in Windows SDK Components for Windows Installer Developers could to nice things.

It actually connects to the WindowsInstaller.Installer-component which makes it possible to call the content of the MSI package with SQL sentences.

It's a VB-script, so the sourcecode is easily read. Which makes it easy to convert to C# or VB.NET to include in other projects.

Why is this smart?
If you have any customer related information in the installationpackage you can script the updates of the package.

The version of the package is not represented in the property of the file. I don't know why. But with this you can make a script to test the version before the installation.

cscript wirunsql.vbs %1 "select * from Property where Property='ProductVersion'"

So .. Hello WiRunSQL!