.comment-link {margin-left:.6em;}

I Hate Linux

Tuesday, August 14, 2007

Setting WHSLogo from the command line

I'm nearly done with my entry for the Windows Home Server Code2Fame Challenge and have spent some time trying to refine my MSI generation manually loading Orca and importing the property was just taking to long and I didn't want to spend the time to learn WiX just yet.

My solution comes courtesy of WiRunSQL.vbs, a nifty little VB script file that comes with the Windows SDK that allows you to modify an existing MSI using SQL syntax... so to add a property named WHSLogo with a value of 1 to the Property table (required to have the Home Server Console be able to see the installer)... I simply add the following as a post build event of my installer:

"C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\SysMgmt\MSI\scripts\WiRunSQL.vbs" "$(BuiltOuputPath)" "INSERT INTO Property(Property.Property, Property.Value) VALUES('WHSLogo',  1)"

Next up... more testing before I announce it here and release an early build to the WHS Developers Forum and see if I can find any brave souls willing to test my add-in out for me.


Post a Comment

<< Home