<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-25084513</id><updated>2012-01-10T22:25:31.366Z</updated><category term='deployment'/><category term='vss'/><category term='VB6'/><category term='Virtualisation'/><category term='migration'/><category term='SQL'/><category term='build'/><category term='silverlight'/><category term='WiX'/><category term='svn'/><title type='text'>Neil Sleightholm's Blog</title><subtitle type='html'>A rarely updated random collection of things that interest me or I am working on.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-25084513.post-1412134375342826443</id><published>2011-07-20T18:44:00.001+01:00</published><updated>2011-07-20T18:44:20.069+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB6'/><title type='text'>VB6: Internal error during Pass2</title><content type='html'>&lt;p&gt;Very occasionally something will change in one of my VB projects (yes I still use VB) and it will stop compiling and display an error similar to this:&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Unexpected error occurred in code generator or linker.&amp;#160; &lt;br /&gt;Microsoft (R) Incremental Linker Version 6.00.8447      &lt;br /&gt;Copyright (C) Microsoft Corp 1992-1998. All rights reserved.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;modCommon.OBJ : error : Internal error during Pass2&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160; ExceptionCode&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = C0000005     &lt;br /&gt;&amp;#160; ExceptionFlags&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = 00000000      &lt;br /&gt;&amp;#160; ExceptionAddress&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = 10323E93      &lt;br /&gt;&amp;#160; NumberParameters&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = 00000002      &lt;br /&gt;&amp;#160; ExceptionInformation[ 0] = 00000000      &lt;br /&gt;&amp;#160; ExceptionInformation[ 1] = 00842000&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;CONTEXT:     &lt;br /&gt;&amp;#160; Eax&amp;#160;&amp;#160;&amp;#160; = 00842000&amp;#160; Esp&amp;#160;&amp;#160;&amp;#160; = 0012EFAC      &lt;br /&gt;&amp;#160; Ebx&amp;#160;&amp;#160;&amp;#160; = 007D6008&amp;#160; Ebp&amp;#160;&amp;#160;&amp;#160; = 0012EFFC      &lt;br /&gt;&amp;#160; Ecx&amp;#160;&amp;#160;&amp;#160; = 00000001&amp;#160; Esi&amp;#160;&amp;#160;&amp;#160; = 0012EFC4      &lt;br /&gt;&amp;#160; Edx&amp;#160;&amp;#160;&amp;#160; = 00001000&amp;#160; Edi&amp;#160;&amp;#160;&amp;#160; = 007D6008      &lt;br /&gt;&amp;#160; Eip&amp;#160;&amp;#160;&amp;#160; = 10323E93&amp;#160; EFlags = 00010246      &lt;br /&gt;&amp;#160; SegCs&amp;#160; = 0000001B&amp;#160; SegDs&amp;#160; = 00000023      &lt;br /&gt;&amp;#160; SegSs&amp;#160; = 00000023&amp;#160; SegEs&amp;#160; = 00000023      &lt;br /&gt;&amp;#160; SegFs&amp;#160; = 0000003B&amp;#160; SegGs&amp;#160; = 00000000      &lt;br /&gt;&amp;#160; Dr0&amp;#160;&amp;#160;&amp;#160; = 0012EFAC&amp;#160; Dr3&amp;#160;&amp;#160;&amp;#160; = 007D6008      &lt;br /&gt;&amp;#160; Dr1&amp;#160;&amp;#160;&amp;#160; = 0012EFFC&amp;#160; Dr6&amp;#160;&amp;#160;&amp;#160; = 00000001      &lt;br /&gt;&amp;#160; Dr2&amp;#160;&amp;#160;&amp;#160; = 00000000&amp;#160; Dr7&amp;#160;&amp;#160;&amp;#160; = 00000000      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I don’t know what causes this but I do know a simple fix, just re-order the file references. What I do is open the VBP file in a text editor and then sort the Class, Form, Module and UserControl values in to alphabetical order.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-1412134375342826443?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/1412134375342826443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=1412134375342826443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/1412134375342826443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/1412134375342826443'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2011/07/vb6-internal-error-during-pass2.html' title='VB6: Internal error during Pass2'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8484787118851148503</id><published>2010-10-03T17:25:00.001+01:00</published><updated>2010-10-03T17:25:45.347+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Silverlight 4 Tools Install Problem</title><content type='html'>&lt;p&gt;I have been struggling to get the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displaylang=en"&gt;Silverlight 4 Tools for Visual Studio 2010&lt;/a&gt; working on my laptop and I think I have found a solution.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem: &lt;/strong&gt;you install the tools and the install (“Silverlight_tools.exe”) doesn’t report an errors. When you open a Silverlight 4 project Visual Studio tells you that you don’t have the tools installed.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution: &lt;/strong&gt;uninstall “Microsoft Silverlight” i.e. the end user runtime and then re-install “Silverlight_tools.exe”. I would also suggest running Windows Update and letting it install the “Microsoft Silverlight” patch.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Additional information: &lt;/strong&gt;Although “Silverlight_tools.exe” doesn’t report a problem buried in the logs it does says “silverlight_developer.exe” has failed. If you expand “Silverlight_tools.exe” (using WinZip or with the /createlayout option) and manually run “silverlight_developer.exe” it reports that a later version of Silverlight is installed. It seems that “silverlight_developer.exe” is installing “Microsoft Silverlight” but doesn’t support installing over the newer version.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8484787118851148503?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8484787118851148503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8484787118851148503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8484787118851148503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8484787118851148503'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2010/10/silverlight-4-tools-install-problem.html' title='Silverlight 4 Tools Install Problem'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8987569143382193733</id><published>2010-09-28T07:24:00.001+01:00</published><updated>2010-09-28T07:24:44.849+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Building SilverLight 4 Applications without Visual Studio 2010</title><content type='html'>&lt;p&gt;On my build machines I prefer not to install Visual Studio and just rely on the .Net framework which includes all the tools required to run a build. Unfortunately the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displaylang=en"&gt;SilverLight 4 tools&lt;/a&gt; have been released so that they will only install on a machine with Visual Studio 2010 installed. I hunted around for a solution to this but didn’t find anything, then I realised that the file Silverlight4_Tools.exe could be extracted and you can install just the SDK as follows:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Download the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displaylang=en"&gt;SilverLight 4 tools&lt;/a&gt; (Silverlight4_Tools.exe). &lt;/li&gt;    &lt;li&gt;Extract the files silverlight_sdk.msi and silverlight_sdk.cab either by using WinZip or running Silverlight4_Tools.exe with the /createlayout command line. &lt;/li&gt;    &lt;li&gt;Run silverlight_sdk.msi on your build machine. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So far this is working for me but I may need to install some of the other tools at a later stage.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8987569143382193733?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8987569143382193733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8987569143382193733' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8987569143382193733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8987569143382193733'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2010/09/building-silverlight-4-applications.html' title='Building SilverLight 4 Applications without Visual Studio 2010'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-2167210113520738533</id><published>2010-06-29T21:20:00.002+01:00</published><updated>2010-12-16T18:50:33.148Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>WiX Reg File Heat Extension</title><content type='html'>&lt;p&gt;&lt;a href="http://wix.sourceforge.net/"&gt;WiX&lt;/a&gt; v2 had the tallow tool which was able to harvest a &lt;a href="http://wix.sourceforge.net/"&gt;WiX&lt;/a&gt; fragment from a file exported from the registry (reg file). WiX v3’s replacement for this tool, Heat, lost this functionality. The code presented here adds this back as an extension to Heat. It also gives an example of how to write a custom heat extension.&lt;/p&gt;&lt;p&gt;You can download v0.90 of the extension from &lt;a href="http://www.x2systems.com/files/RegFileHeatExtension.zip"&gt;here&lt;/a&gt; and the source &lt;a href="http://www.x2systems.com/files/RegFileHeatExtension_src.zip"&gt;here&lt;/a&gt;. The extension has been built against the WiX v3.0 assemblies but works with Heat from both v3.0 and v3.5.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Using the extension&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To create a basic fragment run:    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; heat regfile filename.reg –ext Wix.RegFileHeatExtension.dll –out regfile.wxs&lt;/p&gt;&lt;p&gt;To create a more useful fragment run:    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; heat regfile filename.reg –ext Wix.RegFileHeatExtension.dll –out regfile.wxs -gg -g1 -indent 2 -cg compGroup     &lt;br /&gt;This creates a fragment that can be referenced via the “compGroup” &lt;a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_componentgroup.htm"&gt;ComponentGroupRef/@Id&lt;/a&gt; element. It will also have automatically generated guids, for more information on the command line see the &lt;a href="http://wix.sourceforge.net/manual-wix3/heat.htm"&gt;Heat&lt;/a&gt; documentation.&lt;/p&gt;&lt;p&gt;It should be noted that due to limitations in Windows Installer the following registry keys are not harvested by this extension:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;REG_NONE(0), REG_LINK(6), REG_RESOURCE_LIST(8), REG_FULL_RESOURCE_DESCRIPTOR(9), REG_RESOURCE_REQUIREMENTS_LIST(a), REG_QWORD(b). &lt;/li&gt;&lt;li&gt;These will all start hex(n) in the reg file where “n” is the number/letter in brackets above. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I am hoping to get this functionality added to the WiX v3.5 core Heat command.&lt;/p&gt;&lt;p&gt;I hope you find this useful, if you find any problems with harvesting registry files please let me know.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Edit 04/08/10:&lt;/strong&gt; Update to support WiX 3.0 properly.&lt;/p&gt;&lt;strong&gt;Edit 16/12/10:&lt;/strong&gt; This feature is now built in to WiX 3.5, see help file for details.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-2167210113520738533?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/2167210113520738533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=2167210113520738533' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2167210113520738533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2167210113520738533'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2010/06/wix-reg-file-heat-extension.html' title='WiX Reg File Heat Extension'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-2041830014535711345</id><published>2009-08-19T18:29:00.007+01:00</published><updated>2009-08-19T18:45:35.739+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deployment'/><title type='text'>Registration Free COM</title><content type='html'>&lt;p&gt;From Windows XP SP2 Microsoft introduced a feature called RegFree COM, which allows you to call COM objects (yes some of us still use COM) without needing to register them first. The object in question must be in the same folder as the caller but this makes it much easier to install these objects and goes a little way to the xcopy distribution utopia. To use RegFree COM your caller and callee assemblies needs to have manifest files either externally or embedded - &lt;a href="http://msdn.microsoft.com/en-us/library/aa375632(VS.85).aspx"&gt;Manifest Files Reference&lt;/a&gt;. The assemblies can be written in any language that supports COM and you can call between languages, e.g. vb to vb, vb to .Net, .Net to vb.&lt;/p&gt;  &lt;p&gt;The calling application needs a manifest file configured as follows, in this example the application is called MyApp.exe so the manifest is MyApp.exe.manifest:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;manifestVersion&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assemblyIdentity&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;win32&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyApp&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0.0.0.0&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;dependency&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;dependentAssembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;      &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assemblyIdentity&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;win32&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ComAssembly.dll&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.2.3.4&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;    &amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;dependentAssembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;dependency&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;The COM assembly needs a manifest file configured as follows, in this example the assembly is called ComAssembly.dll so the manifest is ComAssembly.dll.manifest:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;manifestVersion&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assemblyIdentity&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;win32&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ComAssembly.dll&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.2.3.4&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;file&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ComAssembly.dll&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;comClass&lt;/span&gt; &lt;span class="attr"&gt;clsid&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{11111111-2222-3333-4444-555555555555}&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;threadingModel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Both&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;  &amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;file&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;In MyApp.exe.manifest I have set the version to “0.0.0.0” this should really match the application version but “0.0.0.0” works. The dependentAssembly/assemblyIdentity&amp;#160; can be repeated for as many COM dependencies that you have.&lt;/p&gt;&lt;p&gt;The assemblyIdentity in the caller manifest must match exactly the one in the callee.&lt;/p&gt;&lt;p&gt;Getting this right can be quite difficult to debug, on XP the only clues to problems are written to the system eventlog with the source SideBySide. On Vista (and I assume Windows 7 and Windows Server 2008 although I haven’t tried it) you can use SxsTrace to help debug the problem. To start trace run “SxsTrace Trace -logfile:SxsTrace.etl” to convert the log file to something you can view run “SxsTrace Parse -logfile:SxsTrace.etl -outfile:SxsTrace.txt”.&lt;/p&gt;&lt;p&gt;The two manifest files presented here have been reduced to the minimum required to get the code to work, they are more settings that can be included see the &lt;a href="http://msdn.microsoft.com/en-us/library/aa375632(VS.85).aspx"&gt;Manifest Files Reference&lt;/a&gt; for more details.&lt;/p&gt;&lt;p&gt;See also:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/cc188708.aspx"&gt;Simplify App Deployment with ClickOnce and Registration-Free COM&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2007/06/27/deploying-interop-usercontrols.aspx"&gt;Beth Massi - Sharing the goodness that is VB&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-2041830014535711345?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/2041830014535711345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=2041830014535711345' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2041830014535711345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2041830014535711345'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2009/08/registration-free-com.html' title='Registration Free COM'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-7339182297755404168</id><published>2009-01-06T21:28:00.004Z</published><updated>2009-04-10T16:57:17.307+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>WiX Script for Major Upgrades</title><content type='html'>&lt;p&gt;On the &lt;a href="http://wix.sourceforge.net/mailinglists.html"&gt;WiX mailing list&lt;/a&gt; recently there have been several requests for information about upgrades, this post presents a very basic script that has all the elements necessary to handle a major upgrade.&lt;/p&gt; &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!-- &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;  Simple WiX template - This example installs a file in to a directory. &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!-- This is application version number, update for each release --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;define&lt;/span&gt; &lt;span class="attr"&gt;Version&lt;/span&gt; = &lt;span class="kwrd"&gt;&amp;quot;1.0.0&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;define&lt;/span&gt; &lt;span class="attr"&gt;UpgradeCode&lt;/span&gt; = &lt;span class="kwrd"&gt;&amp;quot;2CFB7959-56C1-4968-94DB-A8FA212B0FA2&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/wix/2006/wi&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Product&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Simple WiX template $(var.Version)&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Language&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1033&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;Version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$(var.Version)&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Manufacturer&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ACME Corporation&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;UpgradeCode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$(var.UpgradeCode)&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Package&lt;/span&gt; &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Simple WiX template Installation&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;InstallerVersion&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;200&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Compressed&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt; &lt;span class="attr"&gt;Message&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;A later version of [ProductName] is already installed.&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;NOT NEWERVERSIONDETECTED&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TARGETDIR&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SourceDir&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;INSTALLDIR&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;DefaultFeature&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Level&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;ConfigurableDirectory&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TARGETDIR&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComponentGroupRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Test&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$(var.UpgradeCode)&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$(var.Version)&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;OnlyDetect&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;NEWERVERSIONDETECTED&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0.0.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Maximum&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$(var.Version)&amp;quot;&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;IncludeMinimum&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;IncludeMaximum&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;no&amp;quot;&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;OLDERVERSIONBEINGUPGRADED&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Media&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Cabinet&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;contents.cab&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;EmbedCab&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UIRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;WixUI_ErrorProgressText&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;FindRelatedProducts&lt;/span&gt; &lt;span class="attr"&gt;Before&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LaunchConditions&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RemoveExistingProducts&lt;/span&gt; &lt;span class="attr"&gt;After&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;InstallValidate&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;InstallUISequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;FindRelatedProducts&lt;/span&gt; &lt;span class="attr"&gt;Before&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LaunchConditions&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;InstallUISequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Product&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;For information on the FindRelatedProducts scheduling see here: &lt;a href="http://neilsleightholm.blogspot.com/2009/01/launchconditions-findrelatedproducts.html"&gt;LaunchConditions, FindRelatedProducts and Downgrades&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Useful links:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa370579(VS.85).aspx"&gt;Patching and Upgrades&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.joyofsetup.com/2008/12/30/paying-for-upgrades/"&gt;Paying for upgrades&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-7339182297755404168?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/7339182297755404168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=7339182297755404168' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/7339182297755404168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/7339182297755404168'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2009/01/wix-script-for-major-upgrades.html' title='WiX Script for Major Upgrades'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-4947913913114836628</id><published>2009-01-06T17:33:00.021Z</published><updated>2009-03-02T22:03:21.821Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>LaunchConditions, FindRelatedProducts and Downgrades</title><content type='html'>&lt;p&gt;Quite a long time ago I had a problem with my WiX installs when tried to detect that a newer version was installed (&lt;a href="http://n2.nabble.com/Upgrade-code-failing-for-silent-installs-td708137.html"&gt;Upgrade code failing for silent installs&lt;/a&gt;). I thought the solution was to use a custom action to detect the newer version but I have finally realised what the problem was.&lt;/p&gt; &lt;p&gt;To recap: my install worked fine if it was running with a UI but if I ran it silently so that the InstallUISequence sequence didn't run the newer version launch condition wasn't run. This is the code I had:&lt;/p&gt; &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;&amp;lt;!-- Upgrade settings --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.UpgradeCode)"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.Version)"&lt;/span&gt; &lt;span class="attr"&gt;OnlyDetect&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="NEWERVERSIONDETECTED"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;="0.0.0"&lt;/span&gt; &lt;span class="attr"&gt;Maximum&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.Version)"&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;IncludeMinimum&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="attr"&gt;IncludeMaximum&lt;/span&gt;&lt;span class="kwrd"&gt;="no"&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="OLDERVERSIONBEINGUPGRADED"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt; &lt;span class="attr"&gt;Message&lt;/span&gt;&lt;span class="kwrd"&gt;="A later version of [ProductName] is already installed."&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;NOT NEWERVERSIONDETECTED&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;This worked with a UI sequence because the default sequence for LaunchConditions is 100 and FindRelatedProducts is 200. From this it is clear that the launch condition won't trigger until FindRelatedProducts has run and when there is a UI sequence the order would be LaunchConditions, FindRelatedProducts then LaunchConditions again in the execute sequence and on this second run it would trigger the launch condition. If running silently only LaunchConditions is followed by FindRelatedProducts and hence the launch condition will never trigger.&lt;/p&gt;&lt;p&gt;So the solution is quite simple, ensure FindRelatedProducts runs before LaunchConditions e.g.:&lt;/p&gt; &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;FindRelatedProducts&lt;/span&gt; &lt;span class="attr"&gt;Before&lt;/span&gt;&lt;span class="kwrd"&gt;="LaunchConditions"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;InstallUISequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;FindRelatedProducts&lt;/span&gt; &lt;span class="attr"&gt;Before&lt;/span&gt;&lt;span class="kwrd"&gt;="LaunchConditions"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;InstallUISequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Edit 02/03/09:&lt;/strong&gt; As of &lt;a href="http://wix.sourceforge.net/" target="_blank"&gt;WiX&lt;/a&gt; version 3.0.5027.0 the default is for FindRelatedProducts to run before LaunchConditions so this code is not required.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-4947913913114836628?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/4947913913114836628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=4947913913114836628' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/4947913913114836628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/4947913913114836628'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2009/01/launchconditions-findrelatedproducts.html' title='LaunchConditions, FindRelatedProducts and Downgrades'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8623298955236553891</id><published>2008-10-22T23:04:00.015+01:00</published><updated>2009-05-10T08:47:31.157+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>How To Create a WiX build machine</title><content type='html'>&lt;p&gt;After quite a bit of struggling to build WiX I have finally succeeded, so I thought I would share the process. The WiX help file and the make.bat file outline what is required but it misses a lot of the detail, in particular there are quite a few files that are not in the WiX source zip file but they are in CVS. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Update: I have revised this following recent changes to WiX, this now applies to WiX v3.0.4707.0 or later.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;These notes should be read in conjunction with the WiX help file topic "Building WiX".&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Operating system: Windows 2008 Standard (Full Installation), installed with default options in a Virtual Machine.     &lt;br /&gt;- I chose Windows 2008 but the following instructions should also apply to other OS's.      &lt;br /&gt;- There is quite a lot to install and so I setup a 32Gb drive, the OS and all the tools took up about 20Gb of disk space, to build the source you will need about 2Gb. &lt;/li&gt;    &lt;li&gt;.Net Framework 3.5 SP1     &lt;br /&gt;- This is required to build WiX but only .Net Framework 2.0 is required to run WiX. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nant.sourceforge.net/"&gt;NAnt&lt;/a&gt; (build 2008-02-10-0.86 or later) with the modification to the SDK path shown in the WiX help file. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://sandcastle.codeplex.com/"&gt;Sandcastle&lt;/a&gt; May 2008 Release (Version 2.4.10520) and &lt;a href="http://www.codeplex.com/SHFB/"&gt;Sandcastle Help File Builder&lt;/a&gt; 1.7.0.0. The DTF help builder looks for them in an "external" directory parallel to the WiX "src" directory:     &lt;br /&gt;- Sandcastle: "external\Sandcastle"      &lt;br /&gt;- Sandcastle Help File Builder: "external\SandcastleBuilder"&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Don't get Sandcastle Help File Builder v1.8.0.0 or newer as they've removed the console version that DTF uses.&lt;/li&gt;    &lt;li&gt;Visual Studio 2005 plus Service Pack 1 (SP1 isn't required but I thought it made sense).     &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It is necessary to install "C++ | x64 Compilers and Tools" if you want to build the Visual Studio 2005 version of Votive even if you don't want the x64 components. &lt;/li&gt;    &lt;li&gt;Visual Studio 2008 plus Service Pack 1 (SP1 isn't required but I thought it made sense). &lt;/li&gt;    &lt;li&gt;Visual Studio 2005 SDK Version 4.0 (February 2007) - &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=51A5C65B-C020-4E08-8AC0-3EB9C06996F4&amp;amp;displaylang=en" displaylang="en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=51A5C65B-C020-4E08-8AC0-3EB9C06996F4&amp;amp;displaylang=en&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Visual Studio 2008 SDK Version 1.0 - &lt;a title="http://www.microsoft.com/downloads/details.aspx?familyid=" href="http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&amp;amp;displaylang=en" displaylang="en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&amp;amp;displaylang=en&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;Optional&lt;/em&gt; - Microsoft HTML Help 1.4 SDK      &lt;br /&gt;- I didn't install this as it is not required if you have installed all the previous items (check for "C:\Program Files\HTML Help Workshop"). &lt;/li&gt;    &lt;li&gt;&lt;em&gt;Optional&lt;/em&gt; - Windows SDK for Windows Server 2008 and .NET Framework 3.5      &lt;br /&gt;- I only installed the "Developer Tools" excluding the "Mobile Tools".      &lt;br /&gt;- This is only required to build the optimized IA64 binaries (see comment below). &lt;/li&gt;    &lt;li&gt;&lt;em&gt;Optional&lt;/em&gt; - &lt;a href="http://www.tortoisecvs.org/"&gt;TortoiseCVS&lt;/a&gt; - a version of CVS is required if you want to get the source. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Code Signing&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;By default when you build the WiX source it is &lt;a href="http://msdn.microsoft.com/en-us/library/t07a3dye(VS.80).aspx"&gt;delay signed&lt;/a&gt; with the Microsoft Public WiX key. This means that the code will only run on the machine that it is built on or any machine that trusts the public key. You can check this by running "sn -Vl" - if it returns "*,36e4ce08b8ecfb17" the code is trusted. If you want to trust it you can run "sn -Vr *,36e4ce08b8ecfb17". &lt;/p&gt;  &lt;p&gt;If you want to run the code on any other machine it is necessary to create your own signing key, e.g.: "sn -k wixkey.snk". You then need to set the environment variable OFFICIAL_WIX_BUILD to the path to this file, e.g.: "set OFFICIAL_WIX_BUILD=&amp;lt;path&amp;gt;\wixkey.snk". See "Helper batch file" below.&lt;/p&gt;  &lt;p&gt;If you want to build Votive you also need to modify the sconce project to allow it to trust your key as follows:  &lt;br /&gt;1. Extract the public key from your key with "sn -p wixkey.snk wixkeypublic.snk"   &lt;br /&gt;2. Run "sn -tp wixkeypublic.snk" this will display the public key (the long string of bytes is the one you want, the key is displayed on several lines, remove the line breaks from the public keybefore you use it)&lt;br /&gt;3. Now edit "src\Votive\sconce\Properties\AssemblyInfo.cs" and add your key to the ones that are already there, e.g.: &lt;br/&gt;              [assembly: InternalsVisibleTo("votive2005, PublicKey=YOUR_KEY_HERE")]&lt;br/&gt;              [assembly: InternalsVisibleTo("votive2008, PublicKey=YOUR_KEY_HERE")]&lt;/p&gt;&lt;p&gt;&lt;strong&gt;WiX Source&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Download and extract the WiX source zip file or download from CVS. (I prefer to use the source zip file.) &lt;/li&gt;    &lt;li&gt;If you are building from the source zip file you will need the following files from CVS as they are not in the zip file (or you may already have them on your machine in one of the Visual Studio or SDK folders).     &lt;br /&gt;    &lt;br /&gt;Files:      &lt;br /&gt;"src\pyro\mspatchc.dll"      &lt;br /&gt;"src\light\mergemod.dll"      &lt;br /&gt;"src\light\mergemod.cub"      &lt;br /&gt;"src\light\darice.cub"      &lt;br /&gt;"src\ext\VSExtension\wixlib\Redist\BIN_File_46001"      &lt;br /&gt;"src\ext\VSExtension\wixlib\Redist\BIN_File_46002"      &lt;br /&gt;"src\ext\VSExtension\wixlib\Redist\BIN_File_107602"      &lt;br /&gt;"src\votive\SDK\Redist\ProjectAggregator2.msi"      &lt;br /&gt;"src\votive\sdk_vs2008\tools\build\microsoft.vssdk.build.tasks.dll"      &lt;br /&gt;    &lt;br /&gt;Folders:      &lt;br /&gt;"src\ext\VSExtension\wixlib\vs2005\redist"      &lt;br /&gt;"src\ext\VSExtension\wixlib\vs2008\redist"      &lt;br /&gt;"src\ext\DifxAppExtension\wixlib\x86"      &lt;br /&gt;"src\ext\DifxAppExtension\wixlib\ia64"      &lt;br /&gt;"src\ext\DifxAppExtension\wixlib\x64"      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;On Windows 2008 and Windows Vista you will need to run the "make.bat" as an Administrator. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If all goes well you should now be able to build the full WiX release (I do this through the batch file shown below). When the build is complete the files will be copied to "build\ship\x86\wix3\3.0.xxxx.0" or "build\debug\x86\wix3\3.0.xxxx.0"&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problems&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Error: "&lt;em&gt;src\dtf\tools\sfxca\precomp.h(32) : fatal error C1083: Cannot open type library file: 'mscorlib.tlb': No such file or directory.&lt;/em&gt;"      &lt;br /&gt;- If you run the "Visual Studio 2008 Command Prompt" you will probably find that "C:\Windows\Microsoft.NET\Framework\v2.0.50727" is not in the path, either add it manually or run "%VS90COMNTOOLS%\vsvars32.bat" (see batch file below). &lt;/li&gt;    &lt;li&gt;If you do want to install "Microsoft HTML Help 1.4 SDK" the link in the WiX help file takes you to an MSDN page but the link in there to the download is broken. The file can be downloaded from here: &lt;a title="http://msdn.microsoft.com/en-us/library/ms669985.aspx" href="http://msdn.microsoft.com/en-us/library/ms669985.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms669985.aspx&lt;/a&gt;. When you install this it is titled "HTML Help 1.3" but this is the correct install. &lt;/li&gt;    &lt;li&gt;If you get an error saying "DTFAPI.chm" cannot be found then it probably hasn't been built because the build cannot find the Sandcastle files in the "external" folder. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Accessing WiX CVS&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you have CVS installed (I use &lt;a href="http://www.tortoisecvs.org/"&gt;TortoiseCVS&lt;/a&gt; which also installs CVSNT) then the following commands will retrieve all the source:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;cvs.exe -d:pserver:anonymous@wix.cvs.sourceforge.net:/cvsroot/wix login -p ""&lt;br /&gt;cvs.exe -z3 -d:pserver:anonymous@wix.cvs.sourceforge.net:/cvsroot/wix co -P wix&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Helper batch file&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Because I am lazy and can never remember command lines I created a helper batch file to call make.bat. This batch file sets up the environment and allows you to run a few make scenarios.&lt;/p&gt;&lt;pre class="csharpcode"&gt;@echo off&lt;br /&gt;REM *****************************************************************&lt;br /&gt;REM  Menu to run the WiX build&lt;br /&gt;REM *****************************************************************&lt;br /&gt;:START&lt;br /&gt;&lt;br /&gt;cd /d %~dp0&lt;br /&gt;&lt;br /&gt;cls&lt;br /&gt;echo.&lt;br /&gt;echo *****************************************************************&lt;br /&gt;echo     WiX Build&lt;br /&gt;echo *****************************************************************&lt;br /&gt;echo.&lt;br /&gt;echo     1. Full build - debug&lt;br /&gt;echo     2. Incremental - debug&lt;br /&gt;echo     3. Full build - ship&lt;br /&gt;echo     4. Incremental - ship&lt;br /&gt;echo     5. Clean all&lt;br /&gt;echo.&lt;br /&gt;echo     x. Exit&lt;br /&gt;echo.&lt;br /&gt;&lt;br /&gt;set /p opt=Select option and press enter:&lt;br /&gt;&lt;br /&gt;REM Check for exit&lt;br /&gt;if "%opt%"=="x" goto :EOF&lt;br /&gt;&lt;br /&gt;REM Setup environment&lt;br /&gt;call "%VS90COMNTOOLS%\vsvars32.bat"&lt;br /&gt;path=C:\Program Files\NAnt\bin;%path%&lt;br /&gt;&lt;br /&gt;set OFFICIAL_WIX_BUILD=%~dp0bin\wixkey.snk&lt;br /&gt;&lt;br /&gt;REM Run selected action&lt;br /&gt;if "%opt%"=="1" Call make debug build -l make.log&lt;br /&gt;if "%opt%"=="2" Call make debug inc-l make.log&lt;br /&gt;if "%opt%"=="3" Call make ship build-l make.log&lt;br /&gt;if "%opt%"=="4" Call make ship inc-l make.log&lt;br /&gt;if "%opt%"=="5" (&lt;br /&gt;  Call make debug clean&lt;br /&gt;  Call make ship clean&lt;br /&gt;)&lt;br /&gt;pause&lt;br /&gt;goto :START&lt;/pre&gt;&lt;hr /&gt;&lt;p&gt;&lt;em&gt;Edit: 23/10/08 - based on feedback I have updated the instructions.&lt;br /&gt;Edit: 07/11/08 - updated for WiX v3.0.4707.0.&lt;br /&gt;Edit: 29/12/08 - updated to include note about VS2005.&lt;br /&gt;Edit: 07/01/09 - updated to include code signing.&lt;br /&gt;Edit: 09/05/09 - updated Sandcastle references.&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8623298955236553891?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8623298955236553891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8623298955236553891' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8623298955236553891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8623298955236553891'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/10/how-to-create-wix-build-machine.html' title='How To Create a WiX build machine'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-6161843624342738248</id><published>2008-08-24T00:00:00.006+01:00</published><updated>2008-08-28T20:12:05.251+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Executing sqlcmd from WiX</title><content type='html'>I have been working on an install pack that needs to run and sql script. The script requires several parameters and the current version of the install (Wise Install Builder) uses the sqlcmd.exe to substitute the values using the -v option. I looked at using the inbuilt WiX custom actions but they don't accept parameters so I decided to run sqlcmd from WiX using a custom action.&lt;br /&gt;&lt;br /&gt;I have included a full working sample at the end of this post but the key sections are as follows:&lt;br /&gt;&lt;br /&gt;This sections finds the path to the sqlcmd.exe by searching the registry for the path to sql binn folder.&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="SQLBINDIR"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RegistrySearch&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="SqlBinDir"&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;Root&lt;/span&gt;&lt;span class="kwrd"&gt;="HKLM"&lt;/span&gt; &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup"&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="Path"&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;="raw"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This section builds the command line for sqlcmd. In this case the database is the local SQLEXPRESS instance and it uses a trusted connection (-E). The command passes in the parameter "SYSTEM_USER". It writes the output of the command to the log file "Test.log".&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd.cmd"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="&amp;amp;quot;[SQLBINDIR]sqlcmd.exe&amp;amp;quot; -E -S .\SQLEXPRESS -i &amp;amp;quot;[#Test.sql]&amp;amp;quot; -v var=SYSTEM_USER -o [INSTALLDIR]Test.log"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The final section executes sqlcmd. This will use the current users context to execute the script, that user must have permissions to execute the script. You can also change the attribute CustomAction/@Impersonate to "no" to execute in the context of the local system account (in my case I find this a better option).&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;BinaryKey&lt;/span&gt;&lt;span class="kwrd"&gt;="WixCA"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;DllEntry&lt;/span&gt;&lt;span class="kwrd"&gt;="CAQuietExec"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;Return&lt;/span&gt;&lt;span class="kwrd"&gt;="check"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;Execute&lt;/span&gt;&lt;span class="kwrd"&gt;="deferred"&lt;/span&gt; &lt;br /&gt;  &lt;span class="attr"&gt;Impersonate&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I have found this is working quite well and fits in with my method of building SQL scripts for database creation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sample&lt;/strong&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="UTF-8"&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!-- &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    This example executes sqlcmd.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!-- This is application version number, update for each release --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;define&lt;/span&gt; &lt;span class="attr"&gt;Version&lt;/span&gt; = &lt;span class="kwrd"&gt;"1.0.0"&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/wix/2006/wi"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Product&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="*"&lt;/span&gt; &lt;br /&gt;           &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="Execute sqlcmd WiX template"&lt;/span&gt; &lt;br /&gt;           &lt;span class="attr"&gt;Language&lt;/span&gt;&lt;span class="kwrd"&gt;="1033"&lt;/span&gt; &lt;br /&gt;           &lt;span class="attr"&gt;Version&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.Version)"&lt;/span&gt; &lt;br /&gt;           &lt;span class="attr"&gt;Manufacturer&lt;/span&gt;&lt;span class="kwrd"&gt;="ACME Corporation"&lt;/span&gt; &lt;br /&gt;           &lt;span class="attr"&gt;UpgradeCode&lt;/span&gt;&lt;span class="kwrd"&gt;="5D7D77A6-C8A7-4AE3-81C7-884E02AC2D8C"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Package&lt;/span&gt; &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;="Execute sqlcmd WiX template Installation"&lt;/span&gt; &lt;br /&gt;             &lt;span class="attr"&gt;InstallerVersion&lt;/span&gt;&lt;span class="kwrd"&gt;="200"&lt;/span&gt; &lt;br /&gt;             &lt;span class="attr"&gt;Compressed&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt; &lt;span class="attr"&gt;Message&lt;/span&gt;&lt;span class="kwrd"&gt;="You need to be an administrator to install this product."&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Privileged&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Condition&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="NewerVersion"&lt;/span&gt; &lt;span class="attr"&gt;Error&lt;/span&gt;&lt;span class="kwrd"&gt;="A later version of [ProductName] is already installed."&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="TARGETDIR"&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="SourceDir"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="INSTALLDIR"&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="Test"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Component&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="Test.sql"&lt;/span&gt; &lt;span class="attr"&gt;DiskId&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Guid&lt;/span&gt;&lt;span class="kwrd"&gt;="E1B7D00A-D6D8-4694-B4E0-E9AF67877119"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;File&lt;/span&gt; &lt;span class="attr"&gt;Source&lt;/span&gt;&lt;span class="kwrd"&gt;="Test.sql"&lt;/span&gt; &lt;span class="attr"&gt;KeyPath&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RemoveFile&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt; &lt;span class="kwrd"&gt;="RemoveTest.log"&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="Test.log"&lt;/span&gt; &lt;span class="attr"&gt;On&lt;/span&gt;&lt;span class="kwrd"&gt;="uninstall"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Component&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Directory&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="DefaultFeature"&lt;/span&gt; &lt;span class="attr"&gt;Level&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;ConfigurableDirectory&lt;/span&gt;&lt;span class="kwrd"&gt;="TARGETDIR"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComponentRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="Test.sql"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="OLDERVERSIONBEINGUPGRADED"&lt;/span&gt; &lt;span class="attr"&gt;Secure&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="5D7D77A6-C8A7-4AE3-81C7-884E02AC2D8C"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.Version)"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;OnlyDetect&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="NEWERVERSIONDETECTED"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UpgradeVersion&lt;/span&gt; &lt;span class="attr"&gt;Minimum&lt;/span&gt;&lt;span class="kwrd"&gt;="0.0.0"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Maximum&lt;/span&gt;&lt;span class="kwrd"&gt;="$(var.Version)"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;IncludeMinimum&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;IncludeMaximum&lt;/span&gt;&lt;span class="kwrd"&gt;="no"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="OLDERVERSIONBEINGUPGRADED"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Upgrade&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Media&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Cabinet&lt;/span&gt;&lt;span class="kwrd"&gt;="contents.cab"&lt;/span&gt; &lt;span class="attr"&gt;EmbedCab&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UIRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_ErrorProgressText"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt; &lt;span class="attr"&gt;Action&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd.cmd"&lt;/span&gt; &lt;span class="attr"&gt;After&lt;/span&gt;&lt;span class="kwrd"&gt;="InstallFiles"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;NOT Installed&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="rem"&gt;&amp;lt;!-- Ensure this runs after the CA to set up the property for its cmd line --&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt; &lt;span class="attr"&gt;Action&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd"&lt;/span&gt; &lt;span class="attr"&gt;After&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd.cmd"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;NOT Installed&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt; &lt;span class="attr"&gt;Action&lt;/span&gt;&lt;span class="kwrd"&gt;="NewerVersion"&lt;/span&gt; &lt;br /&gt;              &lt;span class="attr"&gt;After&lt;/span&gt;&lt;span class="kwrd"&gt;="FindRelatedProducts"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;NEWERVERSIONDETECTED&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Custom&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RemoveExistingProducts&lt;/span&gt; &lt;span class="attr"&gt;After&lt;/span&gt;&lt;span class="kwrd"&gt;="InstallInitialize"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;InstallExecuteSequence&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Find sqlcmd.exe path  --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="SQLBINDIR"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RegistrySearch&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="SqlBinDir"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Root&lt;/span&gt;&lt;span class="kwrd"&gt;="HKLM"&lt;/span&gt; &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="Path"&lt;/span&gt; &lt;br /&gt;                      &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;="raw"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Need to use "property" CA to get variable substitution --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd.cmd"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="&amp;amp;quot;[SQLBINDIR]sqlcmd.exe&amp;amp;quot; -E -S .\SQLEXPRESS -i &amp;amp;quot;[#Test.sql]&amp;amp;quot; -v var=SYSTEM_USER -o [INSTALLDIR]Test.log"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Note that the cmd line and args will come from a property with the same name as the CA, this has been set by the CA above --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="sqlcmd"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;BinaryKey&lt;/span&gt;&lt;span class="kwrd"&gt;="WixCA"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;DllEntry&lt;/span&gt;&lt;span class="kwrd"&gt;="CAQuietExec"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;Return&lt;/span&gt;&lt;span class="kwrd"&gt;="check"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;Execute&lt;/span&gt;&lt;span class="kwrd"&gt;="deferred"&lt;/span&gt; &lt;br /&gt;                  &lt;span class="attr"&gt;Impersonate&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Product&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Test.sql contains this:&lt;br /&gt;&lt;pre&gt;print convert(varchar(25),GetDate(),121) + ' Executing file: Test.sql'&lt;br /&gt;select $(var);&lt;br /&gt;go&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-6161843624342738248?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/6161843624342738248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=6161843624342738248' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/6161843624342738248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/6161843624342738248'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/executing-sqlcmd-from-wix.html' title='Executing sqlcmd from WiX'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8069943648308193618</id><published>2008-08-19T22:47:00.003+01:00</published><updated>2008-08-20T22:59:56.308+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>Customised UI's for WiX</title><content type='html'>I recently needed to add a dialog to my setup and customise the welcome dialog slightly. I wanted to use one of the standard WiX UI templates but with a few tweaks. I thought this was going to be quite hard and involve recompling the WiXUIExtension but it turned out to be relatively easy. &lt;em&gt;Note:&lt;/em&gt; this applies to WiX v3.0.4415.0 or later.&lt;br /&gt;&lt;br /&gt;First you need to download the WiX &lt;a href="http://wix.sourceforge.net/releases/"&gt;source &lt;/a&gt; and locate the UI code in the folder 'src\ext\UIExtension\wixlib'. Next copy the UI you want your code based on to your project, in my case this was WixUI_FeatureTree.wxs (the others are WixUI_Mondo.wxs, WixUI_Minimal.wxs, WixUI_InstallDir.wxs and WixUI_Advanced.wxs). Also copy the any dialogs you want to customise to your project, e.g. WelcomeDlg.wxs.&lt;br /&gt;&lt;br /&gt;To customise the dialog, edit the Dialog/@Id e.g. &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Dialog&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WelcomeDlg"&lt;/span&gt; ...&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt; becomes &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Dialog&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="MyWelcomeDlg"&lt;/span&gt; ...&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt; also edit any other references to this Id in the file to match the new Id.&lt;br /&gt;&lt;br /&gt;Edit the template UI e.g. WixUI_FeatureTree.wxs, change the UI/@Id e.g &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UI&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_FeatureTree"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt; becomes &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UI&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_MyFeatureTree"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Now change any references to your customised dialog to it's new Id.&lt;br /&gt;&lt;br /&gt;To add your new dialog edit the &lt;code&gt;&amp;lt;Publish&amp;gt;&lt;/code&gt; elements to modify the sequence of the "Back" and "Next" control attributes.&lt;br /&gt;&lt;br /&gt;Finally, if you want to support localization add a wxl file to your project and enter the customisation strings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Removing the License Dialog.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Another common request I have seen is to remove the license dialog from one of the standard templates, this can be achived in a similar way. Copy the template you want from the source folder, in this case I will edit WixUI_Mondo.wxs. Edit the &lt;code&gt;&amp;lt;Publish&amp;gt;&lt;/code&gt; elements to modify the sequence of the "Back" and "Next" control attributes to skip the license dialog. Edit the UI/@Id to something unique e.g. &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UI&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_MondoNoLicense"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;. Then just include you new WixUI_Mondo.wxs in your project and reference the new dialog, &lt;code class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UIRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_MondoNoLicense"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;A complete example of a mofified WixUI_Mondo is shown below:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="UTF-8"&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    Copyright (c) Microsoft Corporation.  All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    The use and distribution terms for this software are covered by the&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    Common Public License 1.0 (http://opensource.org/licenses/cpl.php)&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    which can be found in the file CPL.TXT at the root of this distribution.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    By using this software in any fashion, you are agreeing to be bound by&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    the terms of this license.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;    You must not remove this notice, or any other, from this software.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/wix/2006/wi"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Fragment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UI&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_MondoNoLicense"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextStyle&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Font_Normal"&lt;/span&gt; &lt;span class="attr"&gt;FaceName&lt;/span&gt;&lt;span class="kwrd"&gt;="Tahoma"&lt;/span&gt; &lt;span class="attr"&gt;Size&lt;/span&gt;&lt;span class="kwrd"&gt;="8"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextStyle&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Font_Bigger"&lt;/span&gt; &lt;span class="attr"&gt;FaceName&lt;/span&gt;&lt;span class="kwrd"&gt;="Tahoma"&lt;/span&gt; &lt;span class="attr"&gt;Size&lt;/span&gt;&lt;span class="kwrd"&gt;="12"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextStyle&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Font_Title"&lt;/span&gt; &lt;span class="attr"&gt;FaceName&lt;/span&gt;&lt;span class="kwrd"&gt;="Tahoma"&lt;/span&gt; &lt;span class="attr"&gt;Size&lt;/span&gt;&lt;span class="kwrd"&gt;="9"&lt;/span&gt; &lt;span class="attr"&gt;Bold&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="DefaultUIFont"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Font_Normal"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Property&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Mode"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="Mondo"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="ErrorDlg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="FatalError"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="FilesInUse"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="MsiRMFilesInUse"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="PrepareDlg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="ProgressDlg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="ResumeDlg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DialogRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="UserExit"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="ExitDialog"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Finish"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="EndDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="Return"&lt;/span&gt; &lt;span class="attr"&gt;Order&lt;/span&gt;&lt;span class="kwrd"&gt;="999"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="WelcomeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Next"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="WelcomeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="TypicalButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="CompleteButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "Change"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "InstallCustom"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Next"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "InstallCustom"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="SetupTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="3"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "Change"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Order&lt;/span&gt;&lt;span class="kwrd"&gt;="4"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceWelcomeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Next"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="ChangeButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomizeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="RepairButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="RemoveButton"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="VerifyReadyDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt; &lt;span class="attr"&gt;Dialog&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceTypeDlg"&lt;/span&gt; &lt;span class="attr"&gt;Control&lt;/span&gt;&lt;span class="kwrd"&gt;="Back"&lt;/span&gt; &lt;span class="attr"&gt;Event&lt;/span&gt;&lt;span class="kwrd"&gt;="NewDialog"&lt;/span&gt; &lt;span class="attr"&gt;&lt;br /&gt;               Value&lt;/span&gt;&lt;span class="kwrd"&gt;="MaintenanceWelcomeDlg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Publish&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UI&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UIRef&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="WixUI_Common"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Fragment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Wix&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8069943648308193618?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8069943648308193618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8069943648308193618' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8069943648308193618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8069943648308193618'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/customised-uis-for-wix.html' title='Customised UI&apos;s for WiX'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8898399354277355863</id><published>2008-08-17T08:44:00.008+01:00</published><updated>2009-08-19T22:37:28.346+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualisation'/><title type='text'>Server Virtualisation, DFS and SAN</title><content type='html'>&lt;strong&gt;Server Virtualisation&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I have been involved in a few projects recently that use Server Virtualisation and I thought I'd share my observations and thoughts.&lt;br /&gt;&lt;br /&gt;First off I think it is definitely a very useful technology when used in the correct place. From my experience low usage servers work well on the platform, as a rough estimate if you logon to the server and the CPU never goes above 10% utilisation then it is ideal. This can include domain controllers and DNS servers etc. Servers that don't migrate well are SQL servers, although I have seen it done and for development it can make sense.&lt;br /&gt;&lt;br /&gt;The main thing to ensure is that the host is a good box with lots of memory, lots of disk space and fast disks (I have found that RAID5 and RAID0 disks arrays are a good choice). Using 64bit Windows 2003 (or 2008) makes a good host as it can access more physical memory. In my case the VM host is not on the domain, it is in its own workgroup. I needed to do this because it hosts the domain controller but in some situations I think it is a reasonable model anyway. I am using the &lt;a href="http://www.vmware.com/products/server/"&gt;VMware Server&lt;/a&gt; to host my VMs, this product is free and in my experience has superior performance to the Microsoft server (although I have not tried the Windows 2008 platform). It also has the advantage of allowing me to take whole images and run them on my local copy of VMware workstation. The VMware server also allows you to create clients that have more than one CPU.&lt;br /&gt;&lt;br /&gt;I have changed my small office network over to VMs and although it is very small in comparison to most companies it has given some benefits that are equally applicable to any company. My original server was a domain controller and also general purpose file and application server. It was getting a bit old and I had some more modern hardware free. I toyed with the ideal of rebuilding the server but that seemed like a lot of work and what would happen next time I wanted to upgrade, converting it to a VM made sense.&lt;br /&gt;&lt;br /&gt;VMware have a free tool &lt;a href="http://www.vmware.com/products/converter/"&gt;VMware Converter&lt;/a&gt; that can convert a physical server in to a VM, this meant that I could try out the migration without any downtime on the live server. At the same time as migrating to a VM I was also able to increase the size of the system drive as it was getting a bit small after upgrading from Win2k to Win2k3. I was also able to split off some of the application server roles to a new VM as it didn't really make sense for them to be on the domain controller. Having a VM host also allowed me to host other machines that I don't use as often, for example, my main development machine is now running Vista but occasionally I need XP so I simply cloned the old physical XP development machine using VMware Converter and can boot it up anytime I need it.&lt;br /&gt;&lt;br /&gt;Once virtualised the benefits include: &lt;ul&gt;&lt;li&gt;I now have a simple backup of the whole machine. In the event of a hardware failure or upgrade I simply copy the files to another VM host machine and boot it up.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I can backup the full machine live by using a the VSS (Volume Shadow Service). The tool I use is &lt;a href="http://www.pluralsight.com/wiki/default.aspx/Craig/HoboCopy.html"&gt;Hobocopy &lt;/a&gt;and this allows me to snapshot the client machine without shutting it down. The image it creates can be booted on another VM host if I have a hardware failure. (This doesn't remove the need for some application backups as well, e.g. Exchange, but does make it easier for less frequent changes, e.g. AD, DNS etc.).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I can try out changes to the servers and simply roll back the whole machine to an earlier snapshot.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;On the downside: &lt;ul&gt;&lt;li&gt;"All eggs in one basket", if the host fails so do all the clients.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It is possible for one VM to slow down other clients on the same host.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;strong&gt;DFS&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;At the same time as doing this migration I also made use of DFS (Distributed File System). I have set this up so that one machine is the host and all shares to my SAN disk or servers are accessed through this. This means that it doesn't matter how the physical hardware changes the access to shares is the same. To take this one step further I would even create a DNS entry for the DFS host so that even the DFS host can change without changing any other applications or configurations.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SAN&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;One thing setting up the DFS highlighted to me was that cheap SAN devices (e.g. the Buffalo Terastation) are limited. They rarely support NTFS, even if that say they support AD (Active Directory) they are limited to the number of accounts they will import (I think 1000 is common). If they don't support AD then you have to manually setup security and even if they do it is not the same as the security on the DFS host. The expensive SAN systems tend to work in a different way and appear to the host like any other disk drive, I can't find a way to do this with this cheaper systems. The lack of NTFS is the biggest issue for me, I can't use security on folders and also tools like Robocopy don't read the file timestamps properly. I also have a file image backup that looses properties like the hidden attribute which makes restores difficult. These problems led me to hunt out another option and I think I have found it. &lt;a href="http://www.drobo.com/"&gt;Drobo&lt;/a&gt; is a disk array that I can connect to the VM host or VM server as a real drive. It has the advantage over normal external drives of being expandable as you need more disk space, you could start with four 500Gb disks (giving 1.4 Tb) and when this is full you simply remove one disk and put it another larger one. If there is a failure you can also swap a drive and it will automatically resync it. The unit is not cheap but I think it makes a really good system for disk storage when used with DFS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8898399354277355863?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8898399354277355863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8898399354277355863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8898399354277355863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8898399354277355863'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/server-vitalisation-dfs-and-san.html' title='Server Virtualisation, DFS and SAN'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-7264540908299995706</id><published>2008-08-16T22:10:00.009+01:00</published><updated>2008-10-05T12:22:55.859+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><category scheme='http://www.blogger.com/atom/ns#' term='deployment'/><title type='text'>Report Loader for SQL Server Reporting Services</title><content type='html'>I recently had to deploy some reports to SQL Server Reporting Services and found that Microsoft don't supply any tools to make this easy. My requirement was to be able to take reports from developers and deploy them directly to Reporting Services and fix up the database connections to point at the correct SQL server for the environment. With the help of the code from Jason Smith at &lt;a href="http://www.sqldbatips.com/"&gt;SQLdbatips.com&lt;/a&gt; I wrote a command line deployment program in C#. &lt;br /&gt;&lt;br /&gt;The command line syntax for this program is shown below:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ReportLoader [--help|-?|-h] (--url=targeturl|--server=targetserver)&lt;br /&gt;[--source=sourcefolder] --target=targetfolder [--connstring=connstring]&lt;br /&gt;[--username=username --password=password]&lt;br /&gt;&lt;br /&gt;--help - this information&lt;br /&gt;--url - target rss server url&lt;br /&gt;--server - target server name, defaults to current folder&lt;br /&gt;--source - source folder containing reports (*.rdl) and datasources (*.rds)&lt;br /&gt;--target - target folder name&lt;br /&gt;--connstring - connection string to use&lt;br /&gt;--username - username to use in datasource&lt;br /&gt;--password - password for username&lt;br /&gt;--delete - delete all reports before upload&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;ReportLoader --url="http://localhost/ReportServer/ReportService2005.asmx" --source="D:\My Reports\Reports" --target="/My Reports" &lt;br /&gt;ReportLoader --server=rsserver --source="D:\My Reports\Reports"&lt;br /&gt;--target="/My Reports" --connstring="Data Source=SQLSERVER;Initial Catalog=Database"&lt;br /&gt;--username=DOMAIN\SvcMyReports --password=pass&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The command line help doesn't say it but this will also upload GIF and JPG files it finds in the source directory.&lt;br /&gt;&lt;br /&gt;If you would like to use this the source and compiled application are available here: &lt;a href="http://www.x2systems.com/files/ReportLoader.zip"&gt;ReportLoader.zip&lt;/a&gt;. If you have any comments about it or suggestions to improve it please let me know.&lt;br /&gt;&lt;br /&gt;If I get time I would like to convert this application in to a custom action for Windows Installer that can be used from WiX.&lt;br /&gt;&lt;br /&gt;Edit: 05 October 2008 - Updated download to include -url parameter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-7264540908299995706?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/7264540908299995706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=7264540908299995706' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/7264540908299995706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/7264540908299995706'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/report-loader-for-sql-server-reporting.html' title='Report Loader for SQL Server Reporting Services'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-8768899991866027057</id><published>2008-08-16T17:17:00.004+01:00</published><updated>2008-08-16T17:36:44.216+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>Mallow for WiX v3</title><content type='html'>I had a build process that used mallow (a tallow clone) with WiX v2, I recently needed to update this to WiX v3 and had to update mallow to generate v3 compatible code. I thought this may be useful to others so here it is: &lt;a href="http://www.x2systems.com/files/mallow_v3.zip"&gt;http://www.x2systems.com/files/mallow_v3.zip&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I would like to thank the original author of mallow, Stefan Zschocke, but &lt;a href="http://osdir.com/ml/windows.devel.wix.user/2005-02/msg00115.html"&gt;this&lt;/a&gt; is the only link I can find to the original source.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-8768899991866027057?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/8768899991866027057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=8768899991866027057' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8768899991866027057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/8768899991866027057'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/mallow-for-wix-v3.html' title='Mallow for WiX v3'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-2802492057752441615</id><published>2008-08-09T09:46:00.004+01:00</published><updated>2008-08-09T10:01:46.645+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deployment'/><title type='text'>Deployment Driven Development</title><content type='html'>In Peter Marcu's Blog he talks about this (&lt;a href="http://blogs.msdn.com/pmarcu/archive/2008/05/22/Design-your-Application-to-Fit-Your-Shipping-Container.aspx"&gt;http://blogs.msdn.com/pmarcu/archive/2008/05/22/Design-your-Application-to-Fit-Your-Shipping-Container.aspx&lt;/a&gt;) and it something that I feel needs promoting more. &lt;br /&gt;&lt;br /&gt;In my roll I often have to deploy new components or systems that have not considered how they will be deployed. In a lot of cases the development teams pick a new technology (usually from Microsoft) because it solves a development issue but this then creates a whole new deployment problem. &lt;br /&gt;&lt;br /&gt;One example I came across recently was SQL Reporting Services, there doesn't seem to be any sensible way of deploying this. I have written a command line program to do this which I hope to share here soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-2802492057752441615?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/2802492057752441615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=2802492057752441615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2802492057752441615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/2802492057752441615'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2008/08/deployment-driven-development.html' title='Deployment Driven Development'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-6761553645050654455</id><published>2007-08-15T08:11:00.005+01:00</published><updated>2008-09-22T21:38:02.091+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vss'/><category scheme='http://www.blogger.com/atom/ns#' term='migration'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Migrating from Visual Source Safe to Subversion (VSS to SVN)</title><content type='html'>I have been working on migrating a VSS repository to SVN and this post includes an updated version of the Perl migration script (migrate.pl) found at &lt;a href="http://www.hyllander.org/node/23"&gt;"Migrating from Visual Source Safe to Subversion (VSS to SVN)"&lt;/a&gt; by Magnus Hyllander which in turn is based on &lt;a href="http://www.riseup.com/~brettw/dev/VSS2Subversion.html"&gt;"Visual SourceSafe to Subversion Migration"&lt;/a&gt; by Brett Wooldridge (this site doesn't seem to be available anymore).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have made the following changes:&lt;br /&gt;&lt;br /&gt;3.00 - Changes by Neil Sleightholm:&lt;br /&gt;- Improved generation of atoms to make resume more reliable.&lt;br /&gt;- Handle pinned files.&lt;br /&gt;- Print migration start/end date and time.&lt;br /&gt;- Improve status ('sugar') feedback.&lt;br /&gt;- Simplify extract status code.&lt;br /&gt;- Supply username and password for admin functions.&lt;br /&gt;- Code reformatting.&lt;br /&gt;- Added support for cutoff date to allow only newer files to be migrated.&lt;br /&gt;- Always dump user names during migration.&lt;br /&gt;- Add support for usernames containing spaces.&lt;br /&gt;- Exclude additional vss warning message.&lt;br /&gt;- Change to UK date format. Add commented out code to allow for european and US date formats. TODO: Make this a command line option.&lt;br /&gt;- Add version number.&lt;br /&gt;3.01 - Don't import vss files e.g. files ending .vssscc, .vspscc etc.&lt;br /&gt;3.02 - Allow vss project $/ e.g. all of vss.&lt;br /&gt;3.03 - Don't import vss files - .vsscc&lt;br /&gt;3.04 - Improve handling of cuttoff date if it is not set.&lt;br /&gt;3.05 - Changed so that svn url is the root and the vss path is append to it e.g. $/MyPath is imported in to url svn://Import as svn://Import/MyPath&lt;br /&gt;- Remove redundant commented out code.&lt;br /&gt;- Add support for multiple vss projects on the command line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This new version can be download from here: &lt;a href="http://www.x2systems.com/files/migrate.pl.txt"&gt;http://www.x2systems.com/files/migrate.pl.txt&lt;/a&gt; (rename to migrate.pl).&lt;br /&gt;&lt;br /&gt;This version was modified to support a US install of VSS (thanks Rory Kingan): &lt;a href="http://www.x2systems.com/files/migrate_us.pl.txt"&gt;http://www.x2systems.com/files/migrate_us.pl.txt&lt;/a&gt; (rename to migrate.pl).&lt;br /&gt;&lt;br /&gt;Edit 17-09-2008&lt;br /&gt;Command line examples:&lt;br /&gt;&lt;br /&gt;Assuming these environment variables have been set&lt;br /&gt;set SS_HOME=C:\Program Files\Microsoft Visual SourceSafe&lt;br /&gt;set SSDIR=D:\VssData&lt;br /&gt;set SVNREPOS=file:///D:/svnrepos2/migrate&lt;br /&gt;set VSSPROJ="$/X2 Systems" &lt;br /&gt;set CUTOFF=20050701&lt;br /&gt;&lt;br /&gt;This is a full migration:&lt;br /&gt;    perl migrate.pl --repos=%SVNREPOS% %VSSPROJ% --cutoff-date=%CUTOFF%&lt;br /&gt;&lt;br /&gt;This will migrate the latest changes:&lt;br /&gt;    perl migrate.pl --migrate-latest --repos=%SVNREPOS% %VSSPROJ% --cutoff-date=%CUTOFF%&lt;br /&gt;&lt;br /&gt;This will resume a migration:&lt;br /&gt;    perl migrate.pl --resume --repos=%SVNREPOS% %VSSPROJ% --cutoff-date=%CUTOFF%&lt;br /&gt;&lt;br /&gt;This will generate a file containing all the VSS users:&lt;br /&gt;    perl migrate.pl --dumpusers --repos=%SVNREPOS% %VSSPROJ% --cutoff-date=%CUTOFF%&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-6761553645050654455?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/6761553645050654455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=6761553645050654455' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/6761553645050654455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/6761553645050654455'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2007/08/migrating-from-visual-source-safe-to.html' title='Migrating from Visual Source Safe to Subversion (VSS to SVN)'/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25084513.post-114375195866877579</id><published>2006-03-30T21:50:00.000+01:00</published><updated>2006-03-30T21:52:38.670+01:00</updated><title type='text'></title><content type='html'>Things I am currently working on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows Installer XML&lt;/li&gt;&lt;li&gt;AlienBBC plugin &lt;a href="http://www.x2systems.com/alienbbc"&gt;http://www.x2systems.com/alienbbc&lt;/a&gt; for SlimServer &lt;a href="http://www.slimdevices.com"&gt;http://www.slimdevices.com&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25084513-114375195866877579?l=neilsleightholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://neilsleightholm.blogspot.com/feeds/114375195866877579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25084513&amp;postID=114375195866877579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/114375195866877579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25084513/posts/default/114375195866877579'/><link rel='alternate' type='text/html' href='http://neilsleightholm.blogspot.com/2006/03/things-i-am-currently-working-on.html' title=''/><author><name>Neil Sleightholm</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
