tag:blogger.com,1999:blog-9851596351936332352024-03-12T19:43:48.046-07:00ISWIXHistorical archive 2003-2016Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.comBlogger379125tag:blogger.com,1999:blog-985159635193633235.post-48871435128336583832017-02-21T18:25:00.002-08:002017-02-21T18:25:31.172-08:00Changing Domains<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">The ISWIX blog has moved to </span><a href="http://www.iswix.com/blog" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-decoration: none;">http://www.iswix.com/blog</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">. All 379 previous articles from 2003 - 2017 will remain at this URL to make sure the content can be linked to from all over the web.</span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">Christopher Painter's email address is also changing to </span><a href="mailto:chrpai@iswix.com" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-decoration: none;">chrpai@iswix.com</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">.</span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">Sincerely,</span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">Christopher Painter</span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">ISWIX, LLC.</span>Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-20163062564383202522017-02-19T07:20:00.004-08:002017-02-19T07:20:45.393-08:00IsWiX Visual Studio 2017 Support RoadmapI just wanted to put an FYI out there that IsWiX will not support Visual Studio 2017 at launch date. Microsoft has made substantial changes to the way VS is deployed and created a lot of complications for extension developers. <br />
<br />
In order for IsWiX to function in VS 2 extensions need to be installed:<br />
<br />
WiX Votive<br />
IsWiX AddIn<br />
<br />
<br />
The WiX votive is required to load .wixproj based projects in your solution and is the foundation for IsWiX's own multiproject solution templates.<br />
<br />
The IsWiX AddIn is required to send a .wxs document to the IsWiX.exe.<br />
<br />
WiX appears to be moving in the direction of removing Votive from their installer and shipping it separately via the VS marketplace. Assuming the work is completed (there is currently no ship date announced for v3.11.0) it will likely require the setup developer to do an additional installation step prior to being able to load an existing solution or create a new one.<br />
<br />
As sub optimal as this is, it appears to be set in stone and I have no intention of spending any energy on IsWiX until I see the final landscape of what I have to deal with. I will likely do something similar to what they are doing or I might make a bootstrapper to automate installing WiX, the votive extension and the IsWiX AddIn extension.<br />
<br />
FWIW, while this has been the worst, ever release of VS has caused pain for me as either a user of WiX or a user of InstallShield. It just takes time for this to catch up. For this reason I *ALWAYS* recommend keeping your application projects in one solution and your installer projects in another. This way you can ensure you won't be blocking your application developers from moving forward to the latest version of VS while you continue to compile against the tried and true version you've always used. They need to be cutting edge, we do not need to be.<br />
<br />Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com1tag:blogger.com,1999:blog-985159635193633235.post-41762941297496136722017-01-01T06:29:00.002-08:002017-01-01T06:29:45.229-08:00IsWiX 4.0.17001.1<div abp="4">
Happy New Year!</div>
<div abp="5">
</div>
<div abp="6">
I've published a new version of IsWiX with a pretty important (to me and a few of my customers) bug fix. I actually did the work yesterday and couldn't decide if I wanted it to be the only release of 2016 or the first release of 2017. Silly, I know... that and the evenings festivities were calling.</div>
<div abp="7">
</div>
<div abp="8">
Anyways let's talk about the fix. The files and folder designer code is a bit scary. I didn't write it and I appreciate the efforts of the person that did. That said, it had a pretty bad performance issue. Most people only put a handful of directories and files in any given merge module so most people would have never seen it. However if you are working on website and find yourself dealing with 1000 directories and 10,000 files in a single merge module it suddenly becomes quiet unusable.</div>
<div abp="9">
</div>
<div abp="10">
But first a back story....</div>
<div abp="11">
</div>
<div abp="12">
Many people probably don't know that IsWiX had a design goal of creating sorted documents with deterministically unique (predictable) Id attributes and GUIDs. The reason for this was the company I worked at did *A LOT* of branching and merging and we wanted to make it as easy as possible to branch and merge IsWiX generated .WXS files. </div>
<div abp="13">
</div>
<div abp="14">
So every time Files and Folders updates it's model it resorts the XML. This usually isn't a problem. However on really large documents it can take 5-10 seconds depending on machine performance. When doing a drag and drop the process would go something like this. Write the XML for a directory, sort, process subfolders recursively. So if you dragged a folder with say a 1000 subfolders you would see it get visibly slower and slower until it bogged down so bad you walked away hoping it would finish or just terminated the process.</div>
<div abp="14">
</div>
<div abp="14">
I've done a simple fix remove the sort step and do a final sort at the end. Now you see it update all the directories in the UI very quickly, a 5-10 second wait as it does the sort and done. If your documents aren't that large you probably won't notice a difference at all.</div>
<div abp="14">
</div>
<div abp="14">
You can get the new release <a abp="88" href="http://iswix.codeplex.com/releases/view/630256">here</a>.</div>
<div abp="14">
</div>
<div abp="14">
PS- It seems certain browsers have been complaining about anything downloaded from CodePlex. That really sucks. IsWiX (and the WiX Toolset) is as safe as always. If you have problems downloading just use a different browser. If you still get issues be sure to "unblock" the file before installing.</div>
<div abp="14">
</div>
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com1tag:blogger.com,1999:blog-985159635193633235.post-62885577926720948252016-04-20T03:11:00.001-07:002016-04-20T08:44:54.530-07:00AppX for Native Apps ThoughtsFive years ago, I wrote two blog posts where I explored the possibilities of AppX:<br />
<br />
<br />
<a href="http://blog.iswix.com/2011/09/appx-just-might-work.html">AppX Just Might Work </a><br />
<br />
<br />
<a href="http://blog.iswix.com/2011/09/appx-just-might-fail.html">AppX Just Might Fail </a><br />
<br />
<br />
I don't work in Redmond or <strike>Schaumburg</strike> Itasca so I tend to not get caught up in the hype of new technologies and instead focus on what works for my customers TODAY. Over the next few years Windows RT came (and went) and the Windows Store continued to be pretty much irrelevant. About a year ago there was some chatter of a Project-C. I continued to have that "meh" feeling.<br />
<br />
<br />
The a few months ago I read about some work that the Windows Nano team was doing to support installing per-machine native apps using extensions for AppX. Additionally the FireGiant team was developing an extension to support creating MSI and AppX from a single source code base. Now I found this REALLY interesting except that I don't have any apps to deploy to Windows Nano Server.<br />
<br />
<br />
Along comes BUILD2016 and FireGiant is now posting about creating MSI for Windows 8.1 and below and AppX for Windows 10 DESKTOP applications. Flexera is also sending similar messages. Ok, I'm really interested now. <br />
<br />
<br />
So it seems now some five years later that AppX just might work!<br />
<br />
<br />
I am wondering what FireGiant will charge for this capability though. It's kind of sad to not see it in the core WiX Toolset as open source goodness. Rob and Bob, like the rest of us, do have mortgages to pay after all. Maybe there will be options similiar to Visual Studio Community Edition for small business, open source and educational uses.<br />
<br />
<br />
Slightly off topic I'd like to tie this into another <strike>possibly over</strike> hyped technology: Chocolatey<br />
<br />
<br />
I want to like chocolatey. I really do. I also want to like <strike>One-Get</strike> Package Management. However the former is just a wrapper for installers of various quality and the latter was never really finished and updated to support the latest chocolatey client.<br />
<br />
<br />
Before anyone gets too offended... I'm not discarding chocolatey yet. I'm wondering allowed... what if in a few years time everyone is on Windows 10 (Microsoft is pushing it hard after all), most Choco packages are really AppX wrappers and Packge Management has excellent chocolatey support.<br />
<br />
<br />
While I'm dreaming... What if we had a way of white listing choco packages in SCCM Software Center? Oh the possibilities.<br />
<br />
<br />
So in closing, while new and "modern" (oh I dislike that term) usually disappoints me, I'm seeing reason to be optimistic today. There could be a sea change coming to my world view soon.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com1tag:blogger.com,1999:blog-985159635193633235.post-40017549429341679842015-10-11T16:45:00.001-07:002015-10-11T16:45:51.713-07:00IsWiX4.0.15284.1 ReleasedA month ago I announced a new version of IsWiX with support for WiX v4.0. At the time I wrote the warning:<br />
<br />
<em>I tested all of the designers but there is a chance that one of my refactoring's, well, sucked. I'm sorry, I don't have unit tests to know for sure. If you find a bug, please report it and revert to IsWiX 3.0. I will follow up with an IsWiX 4.0 fix in a matter of days possibly hours.</em><br />
<em></em><br />
Sure enough, one of my updates did, cough, "suck". It seems I didn't test all of my designers, rather only the ones that appeared. I missed the fact that one of them wasn't showing until I needed it to do some work for a client. I opened up IsWiX and went to define a custom table and was really disappointed that it wasn't there. So I followed my own advice and downgraded to IsWiX 3.0, kept calm and carried on. Eventually I had some time to go look at it and sure enough the IsValidContext() member simply needed to be refactored. <br />
<br />
The new and improved IsWiX can be found <a href="http://iswix.codeplex.com/releases/view/617872">here</a>.<br />
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-62458030598676703742015-09-04T12:37:00.002-07:002015-09-04T12:37:27.782-07:00IsWiX4.0.15247.1 ReleasedIn the past few weeks I've completely revamped my development and build environments to adopt the latest versions of Windows, Visual Studio and Windows Installer XML. In the process I decided that it was time to look at WiX Toolset v4.0 (beta) and the implications on Industrial Strength Windows Installer XML.<br />
<br />
I had read tidbits about WiX v4.0 being a redesign with tons of breaking changes. I had also read that WiX v3.x would have many more releases. My concern was that eventually v4.0 would be complete and it would result in IsWiX become end of life.<br />
<br />
My findings at this point are:<br />
<br />
<ul>
<li>WiX v3.x and v4.x <em>mostly</em> install side by side. You end up getting two sets of the compiler and MSBuild targets files which means that you can have wix v3 and v4 projects in the same solution and they will both build.</li>
<li>WiX does not install Votive side by side. Last one on (or repaired) currently 'wins'. For the most part this isn't completely horrible since Votive hasn't really changed much.</li>
<li>WiX will only show you project templates for the version of Votive that is active. So if you want to create a v4 project you might have to repair WiX v4 and if you want to create a v3 project you might have to repair v3. Read on for how IsWiX is a little different and doesn't have this problem.</li>
<li>WiX v3 and v4 have completely different XML and C# (DTF) namespaces along with different Import statements in their .wixproj files. Presumably WiXCop or some other tool will help with migrations but at this point it's all done by hand.</li>
<li>WiX v4 is currently beta and buggy. Attempts to use WiXUI and Merge/MergeRef resulted in light errors. </li>
</ul>
Ok, so with that as our current platform, here's what I've done with IsWiX<br />
<br />
<ul>
<li>IsWiX has a series of project templates that get zip'd as part of the build process then laid down and registered with Visual Studio during the install. I split them into two sets: v3 and v4. </li>
<li>The project templates screen is starting to get a little crowded so I organized the installer to have v3 and v4 project template features. They default to install if the WiX v3 / v4 MSBuild targets are found. This way people who don't yet have WiX v4 don't have to be bothered by the new templates.</li>
<li>I had a lot of hardcoded namespace references in IsWiX. This has all been refactored so that IsWiX looks at the in memory document and uses the v3 or v4 namespace as appropriate.</li>
<li>The namespaces designer view now offers the correct sets of namespaces based on the above root namespace behavior.</li>
<li>The XML editor designer view also has the same behavior for proper validation / intellisense processing.</li>
<li>I tested all of the designers but there is a chance that one of my refactoring's, well, sucked. I'm sorry, I don't have unit tests to know for sure. If you find a bug, please report it and revert to IsWiX 3.0. I will follow up with an IsWiX 4.0 fix in a matter of days possibly hours.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
</div>
So, I think that's about it. Head on over to CodePlex to download the new <a href="https://iswix.codeplex.com/releases/view/617164">release</a>! Here's a few pictures to illustrate the above points:<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-qZ7jfdTILLk/Venyvwq6ccI/AAAAAAAAAdo/F1lFWS7NrjU/s1600/Projects.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="http://3.bp.blogspot.com/-qZ7jfdTILLk/Venyvwq6ccI/AAAAAAAAAdo/F1lFWS7NrjU/s320/Projects.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-eNqL-ZqQNkI/Venyv_bJ0GI/AAAAAAAAAdk/N-kYXN64RkM/s1600/Namespaces3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="184" src="http://1.bp.blogspot.com/-eNqL-ZqQNkI/Venyv_bJ0GI/AAAAAAAAAdk/N-kYXN64RkM/s320/Namespaces3.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-rwtxpVZ_mgA/Venyv79encI/AAAAAAAAAds/wgIVrQE1eHk/s1600/Namespaces4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://1.bp.blogspot.com/-rwtxpVZ_mgA/Venyv79encI/AAAAAAAAAds/wgIVrQE1eHk/s320/Namespaces4.png" width="320" /></a></div>
<br />
<br />
<br />
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-1273321868783468112015-08-12T19:38:00.000-07:002015-08-17T14:34:00.623-07:00DTF Bug with new Windows 10 Apps and FeaturesOne of my customers came across an uninstall issue on Windows 10 and shot me an email. It seems Windows 10 has a new way of adding and removing software:<br />
<span id="goog_1705126401"></span><span id="goog_1705126402"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-pYl1hmyCqpI/VcwALVm35eI/AAAAAAAAAc0/pbZCp0ytTjY/s1600/newarp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://4.bp.blogspot.com/-pYl1hmyCqpI/VcwALVm35eI/AAAAAAAAAc0/pbZCp0ytTjY/s320/newarp.png" width="320" /></a></div>
<br />
The problem was users were calling into my customers helpdesk reporting the uninstall being blocked by a custom action. The common theme was that uninstall from the legacy Programs and Features worked but that it failed from the new Apps and Features. My customer provided me log files and the following stood out:<br />
<br />
<em>Action start 11:22:33: REDACTED.<br />SFXCA: Failed to create new CA process via RUNDLL32. Error code: 575<br />CustomAction REDACTED returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)</em><br />
<em></em><br />
<em></em><br />
This indicated a WiX DTF SfxCA error. 575 means that RunDLL32 failed to initialize. <br />
<br />
In my good log I saw:<br />
<br />
<em>Action start 11:36:35: REDACTED.<br />SFXCA: Extracting custom action to temporary directory: C:\Users\REDACTED\AppData\Local\Temp\MSIAFD1.tmp-\<br />SFXCA: Binding to CLR version v4.0.30319<br />Calling custom action REDACTED!REDACTED.CustomActions.REDACTED<br />MSI (s) (30:20) [11:36:36:464]: Doing action: REDACTED<br />Action ended 11:36:36: REDACTED. Return value 1.</em><br />
<br />
That's what I expected to see. Ok, so what's different? Again I looked at the logs.<br />
<br />
<em>=== Verbose logging started: 10/17/2015 11:36:34 Build type: SHIP UNICODE 5.00.10011.00 Calling process: C:\Windows\Explorer.EXE ===</em><br />
<em>MSI (s) (30:20) [11:36:34:401]: Command Line: REMOVE=ALL CURRENTDIRECTORY=C:\Windows\system32 CLIENTUILEVEL=2 CLIENTPROCESSID=2704</em> <br />
<br />
and from the bad:<br />
<br />
<em>=== Verbose logging started: 10/17/2015 11:22:31 Build type: SHIP UNICODE 5.00.10011.00 Calling process: C:\Windows\ImmersiveControlPanel\SystemSettings.exe ===</em><br />
<em>MSI (s) (1C:F0) [11:22:31:794]: Command Line: REMOVE=ALL CURRENTDIRECTORY=C:\Windows\ImmersiveControlPanel CLIENTUILEVEL=2 CLIENTPROCESSID=3420</em> <br />
<br />
<br />
My customer was using WiX 3.7. I decided to set out to reproduce the problem with 3.7 and 3.10. My first attempt failed as I scheduled the custom action for deferred and it worked. However when I changed it to immediate execution, I was able to reproduce the problem. That's very strong evidence o me that this new "immersive control panel" process has an environment that is impacting DTF's ability to find and launch RunDLL.<br />
<br />
Hopefully this write up will help the WiX guys find a resolution. You can find the bug logged <a href="http://wixtoolset.org/issues/4857/">here</a>.<br />
<br />
Update:<br />
<br /> Further testing indicates this is limited to 64 bit Windows 10. 32 bit seems to function normally.<br />
<br />
I did a simple Type 2 EXE custom action test and it called RunDLL32 just fine.<br />
<br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">SetProperty</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Id</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">RunDLL</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Value</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">rundll32.exe</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">After</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">AppSearch</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">
</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">CustomAction</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Id</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">test</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Property</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">RunDLL</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">ExeCommand</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">printui.dll,PrintUIEntry /?</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">
</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">InstallExecuteSequence</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">></span></span></span><br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">
</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">Custom</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Action</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">test</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"> </span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">After</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">InstallInitialize</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">></span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">REMOVE="ALL"</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"></</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">Custom</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">></span></span></span><br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">
</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"></</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">InstallExecuteSequence</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">></span></span></span><br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"></span><br />Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com2tag:blogger.com,1999:blog-985159635193633235.post-53661681592998629022015-04-17T18:10:00.004-07:002015-04-17T18:10:23.630-07:00Building and Deploying a Windows Desktop Application using IsWiXI posted a quick, low budget (silent) video on YouTube demonstrating how to create a basic windows desktop application using Visual Studio / C# / WPF, package it using WiX / IsWiX and finally test the install and uninstall. The entire process is two minutes.<br />
<br />
The flow goes like this:<br />
<br />
Step 1: Create the application and stage it for the installer to consume:<br />
<br />
1) Create a WPF project somewhere on your harddrive. Name the solution Application.<br />
2) Place the following postbuild command in the project:<br />
<br />
xcopy /iery "$(TargetDir)*.*" "$(SolutionDir)..\Installer\Deploy"<br />
<br />
3) Build the project and close the solution.<br />
<br />
Step 2: Create the installer<br />
4) Create an IsWiX installer in the same directory as selected above. Name the solution Installer.<br />
5) Open the merge module wxs fragment and select the IsWiX addin from the tools menu.<br />
6) Use the Files and Folders designer to author your files into the merge module.<br />
7) Use the Shortcuts designer to create a shortcut on the desktop.<br />
8) Exit the IsWiX addin.<br />
10) Build the MSI<br />
<br />
That's it! The source tree is 100% compatible with Microsoft Team Foundation Server so checking it all into TFS and creating a build for it is a piece of cake.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/nnV_OU6fk8c/0.jpg" src="http://www.youtube.com/embed/nnV_OU6fk8c?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com2tag:blogger.com,1999:blog-985159635193633235.post-37790639633917793552015-04-15T20:59:00.002-07:002015-04-16T19:34:36.547-07:00IsWiX 5th Anniversary Release 3.0.15106.1IsWiX is coming up on 5 years old. Wow! Where did the time go?<br />
<br />
It has been such an interesting journey. The year was 1996 and I was fresh out of the Marine Corps traveling the world as a DoD contractor. Over the next year I experienced the pain caused by poor deployment planning and crappy installers. I married my wife Cheryl in 1997 and a decision was made to stop traveling 100K miles a year. I used my lessons learned in the field experience to get a transfer and suddenly found myself in a meeting where an architect was talking about how great InstallShield Install From The Web was and how we were going to create "Client Software Distribution" aka "CSD". Everyone then looked at me. I nervously asked "So who's the expert on this?" to which the reply was "you are".<br />
<br />
Gulp!<br />
<br />
It's been a whirl wind ever since. The story picks up again in 2005 when I moved to Austin, TX. I was a pretty good setup developer by then but it was here that I was introduced to the demanding challengers of Product Line Development. I did my best but in the end I was <a href="http://blog.iswix.com/2006/09/change-change-change.html" target="_blank">completely hampered</a> by the choice someone had made to embrace agile setup development despite the fact that no suitable tools existed yet. They decided to use Visual Studio Deployment Project merge modules since all the developer had Visual Studio and no one wanted to do WiX XML by hand or pay for licenses of InstallShield for all the developers. In the end it was a complete disaster and I left the company.<br />
<br />
But I learned a lot from that job and I kept finding myself coming back to merge modules and using InstallShield product configurations to be more efficient. I kept looking for ways to embrace agile setup development in ways that didn't make my life hell and the installer crappy.<br />
<br />
I always resisted creating my own tools. It's probably because I came up through the ranks in a company that believed in integrating off the shelf software instead of reinventing the wheel. I wasn't some fresh out working for a big name silicon valley company with something to prove. I just wanted to get the job done quick, cheap and bulletproof. However, as time passed, I came to realize that the installation tools market was mature and that I couldn't count on the innovation I needed to come to be. It was at this time I remembered what my old boss (Col Truman Crawford) in the Marine Corps would say: "If it's to be, it's up to me."<br />
<br />
So in June 2008 I posted <a href="http://blog.iswix.com/2008/06/maybe-i-should-roll-my-own.html" target="_blank">Maybe I Should Roll My Own</a>. It was just a casual exploration but I think it really did get me to start thinking about it. Later in Nov 2008 I returned to the company that I had previously tried and failed to succeed at. The barriers that had caused my failure had been removed and I now had complete authority to make all architectural decisions. The installers group had swung away from agile back to a centralized model and with it had come a whole bunch of problems.<br />
<br />
To be honest, I don't really remember any of these conversations but I imagine we had them. My friend Chris Tyler was really good about forcing us to write down our roadmap items and somewhere in there the vision was born: We would write our own internal "WiXShield" program that would enable us to embrace agile setup development *AND* achieve the highest quality standards we could set for the organization. From the very beginning we knew we would want to release it as open source.<br />
<br />
So I was loaned 3 part time developers for 3 months and WiXShield was born. To be honest I don't remember when that was exactly. We trained all the developers on how to use it and we went across every software baseline that we had solution by solution and redid everything in WiX. It was amazingly successful.<br />
<br />
At some point we realized that the company simply wasn't going to be able to publish WiXShield as open source due to the sensitive nature of our work. To this day I don't know who pulled a miracle or what they threatened (probably that I would leave the company if it didn't get published) but some how <a href="http://www.textronsystems.com/" target="_blank">Textron Systems</a> and I came to agreement that all intellectual property rights would be assigned to me with the stipulation that I would initially publish it as an open source project.<br />
<br />
I remember coming home with CM issued CD-ROM of all the sources. This was truly amazing as you simply didn't take software in or out of that building! I had a celebration dinner with my family and then stayed up late rebranding everything to IsWiX and checking it all into CodePlex. <br />
<br />
My eyes were bleary from the all-nighter that I pulled when I posted our <a href="http://iswix.codeplex.com/releases/view/44592" target="_blank">first release</a> on CodePlex. Then Cheryl, in remission from cancer, and I took off for a week Jamaica to spend quality time together.<br />
<br />
So why "IsWiX" with a red and blue logo? Well, officially it stands for Industrial Strength Windows Installer XML and IMO it is exactly that... Industrial Strength. The Windows Installer Team, back when they still blogged, actually made reference to a certain Industrial Strength Household Name MSI Editing Tool (ISHNMET). There are things I like about WiX (despite being unfairly accused of being a troll for pointing out the obvious) and there are things that I could see WiX simply was never going to do. I'm sorry, I don't want to use Notepad++ or VIM to write my installers. There are things that InstallShield does very, very well. My ideal setup development tool uses an XML/XSD based language with extensions and compilers but also had an automation interface and graphical designers for developer productivity. Simply put, IMO, InstallShield and WiX should not be mutually exclusive. Hence IsWiX.<br />
<br />
Version one was all about authoring merge modules to be consumed with InstallShield. This was because that's what the business needed and what they paid to build. Version two added the concept of Visual Studio project templates to begin to provide scaffolding for installer projects using nothing but WiX. Today I release version three which adds support for shortcuts and services. Today IsWiX can be used to support three major stories: Windows Application, Windows Service and Web Application. It is possible to create basic installers for all three without writing a single line of XML.<br />
<br />
So what does the future hold? Well, it's hard to say for certain since I really don't have a development team. Personally I'd love to create some great webinars to explain MSI, WiX and IsWiX. It's still too hard to get up to speed in this space despite the technology being so mature.<br />
<br />
Anyways, thanks for reading this far and I hope you like our <a href="http://iswix.codeplex.com/releases/view/614484" target="_blank">latest release</a>.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com2tag:blogger.com,1999:blog-985159635193633235.post-37134664427624542552014-11-25T05:53:00.001-08:002014-11-25T05:54:37.795-08:00WiX v3.10.1124.0 ReleaseThe WiX Toolset team did their first v3.10 weekly release: <a href="http://wixtoolset.org/releases/v3-10-1124-0/" target="_blank">v3.10.1124.0</a><br />
<br />
Weekly releases are basically developer beta test builds and are not final releases. This release is interesting to me because it includes Visual Studio 2015 support. I've tested this build with VS2015 Preview and <a href="http://iswix.codeplex.com/" target="_blank">IsWiX 2.5.14324.3</a> and I find everything is working just fine. I can now relax knowing that I'm well ahead of the curve in supporting the next release of Visual Studio.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-6513816490827996012014-11-20T18:58:00.003-08:002014-11-20T18:58:38.409-08:00IsWiX 2.5.14324.3 ReleasedWhen IsWiX was first developed, we targeted Visual Studio 2008. I dove into VS extensibility trying to figure out how to get the addin story to work. I got it to work but the solution left a little bit to desire. The first problem was very embarrassing: the icon was a big smiley face.<br />
<br />
The API / method that registered the addin with the menu supported 2 techniques. One was an orginal index from a Microsoft Office icon library and the second involved creating a resources dll. I didn't have the skill or the time to go down the second road so I stuck with the smiley face telling myself that I'd go back and fix it. As the days, weeks, months, years went by I failed to do so.<br />
<br />
The second problem was that occasionally Visual Studio would just decide to drop the addin from the menu. You had to run a devenv /resetaddin command to get it back.<br />
<br />
Today a new version of IsWiX is released that solves these problems. I've scoped the "old" addin to VS 2008, 2010 and 2012 and created a "new" addin using VSIX extension that targets VS 2013 and 2015. This new extension registers IsWiX in Help | About and Tools | Packages and Extensions and gives a nice blue flame icon with the new text "Launch IsWiX" under the tools menu. <br />
<br />
That's right, IsWiX now supports VS2015! There is a caveat though. The IsWiX multiproject solution templates ride on top of WiX infrastructure. WiX as of v3.9 does not yet support VS2015 so although IsWiX has correctly registered with VS2015 the project templates will not show up until WiX is ready to support VS2015. We are way ahead of the curve though so I expect all of this will come together prior to VS2015 shipping next year.<br />
<br />
I'm sorry for letting the yellow icon live for so long and for doing back to back weekly releases. I finally get a fired up on this issue making it now or never.<br />
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-82021528534396763392014-11-15T09:52:00.002-08:002014-11-15T10:17:48.811-08:00Development using Free Tools Three and a half years ago, I wrote an article titled <a href="http://blog.iswix.com/2011/03/installation-collaboration-workflows.html">Installation Collaboration Workflows using Free Tools</a>. I'd like to add a few comments based on recent events.
<br />
<br />
Over the past couple of years Microsoft has been doing some really cool things to help out the community. The first was making Visual Studio Online ( Cloud hosted Team Foundation Server ) free to teams of 5 or less. This is a really big deal because now you have "process in a box" infrastructure provisioned in minutes that features high availability, monitoring and disaster recovery all for the low, low price of.... FREE!
<br />
<br />
In the past Microsoft had Visual Studio Express for free but it lacked the ability to extend the IDE. At the same time they had the Visual Studio Shell which did. This created a way of developing .NET applications and packaging installers for them but in a very disjointed manner. Now Microsoft has released Visual Studio Community Edition which is on par with Visual Studio Professional. Now you can do both your application coding, installer coding and connect to that shiny TFS cloud instance for the low, low price of.... FREE!
<br />
<br />
Additionally Microsoft has open source the .NET core libraries. Awesome!
<br />
<br />
Windows Installer XML has been free and open source for 10 years. IsWiX has been free and open source for nearly 5 years. Combine all of above and a independent consultant like myself now has everything needed to be productive without spending a whole lot of money. A laptop, internet connection and a <strike>guest bedroom</strike> corner office is all you need to either start a business or give back to your favorite open source project. <br />
<br />
Looking back over the past year, I've written 95% of my installers using WiX and 5% using InstallShield. I still like InstallShield but the ROI just isn't there for most of my customers. I've been approached by many customers who were about to purchase InstallShield and after a needs analysis I explained to them that I could author their MSI using WiX for a fraction of the cost of the InstallShield license alone. To do setup development collaboration with InstallShield you have to invest thousands of dollars in multiple licenses of DRM laden proprietary software. To do it using WiX and IsWiX is free and integrates into a development ecosystem (Visual Studio) already understood by your customer.
<br />
<br />
Thanks for reading. Please feel free to reach out to me if you want more information on this topic.
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-90771609541221187662014-11-15T09:29:00.000-08:002014-11-15T09:30:11.922-08:00IsWiX 2.4.14319.1 ReleasedI'm sorry that I haven't been blogging or working on IsWiX much this year. There just isn't a lot of time left over after my day job, consulting, passion for SCUBA diving and family time. Still, I've managed to get a small release of IsWiX released on our <a href="http://iswix.codeplex.com/">CodePlex site</a> today. This release adds support for authoring 64bit components, parses the MSI Product Version automatically when using TFS 2013 and has some minor improvements to the Files and Folders UI.
<a href="http://iswix.codeplex.com/"></a>Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-77482126999187543272014-06-27T10:33:00.001-07:002014-06-28T15:31:52.199-07:00WiX DTF Behavior AlertI was troubleshooting an installer today when I came across what I consider to be a bug in Windows Installer's DTF managed custom action pattern. First a little backstory:
WiX DTF Managed Custom Action projects allow you to add project items as content. During the build this all gets packed into a self extracting custom action that then gets stored in the Binary table of your MSM/MSI. At runtime the binary is extracted to an MSI determined temp directory and a native hook is invoked. This native code then extracts the contents of the self extracting CA into another temp directory and then launches a routine that eventually results in your managed code running. It also sets the current directory of the process to this temp directory so that your content resources can be referenced.
That's how it's supposed to work. Or at least that's how it's always worked. The WiX team doesn't really document this so I'm sure the "functions as designed" or "functions as coded" door is cracked slightly open.
Ok, so the behavior I want to alert you in is if the Microsoft.Deployment.WindowsInstaller.dll (interop library that DTF uses to marshal MSI API calls to the custom action) is in the GAC the current directory won't be the temp directory as expected, it'll be the directory in the GAC (C:\windows\assembly\GAC_MSIL\Microsoft....) that the assembly is stored in. This means any relative path references to your content files will now fail.
Ok, so how do you protect yourself? Add this line to the beginning of your custom action:
Environment.CurrentDirectory = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName;
This will ensure that the current directory is set to the directory that your assembly was extracted to. I believe this is the first DTF bug I've seen in about 3 years. The last was a race condition fixed in 3.6 or 3.5 that randomly prevented a CA from firing. The only before that was back around 2008 and involved custom action sandboxes being recycled and previous custom actions changing the current directory to a directory you wasn't expecting. I believe it was back then that DTF added a current directory initialization pattern and it generally works well except for the gotcha I just noticed.
Update 6/28/2014: Just one day after reporting the bug, Sean Hall has submitted a pull request and the issue has been marked as fixed for WiX 3.9. I'm not sure when 3.9 is going to ship but I'm very thankful and impressed with how quickly this bug was addressed. Thanks guys!
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-78250344784942145842014-04-18T17:57:00.001-07:002014-04-19T10:49:26.476-07:00Visual Studio Installer Resurrection<br />
Like a late really, really bad April Fool's joke, Microsoft announced the day before Good Friday that Visual Studio Deployment Project have been raised from the dead. See:<br />
<br />
<br />
<a href="http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx" target="_blank">Visual Studio Installer Projects Extension</a><br />
<br />
<br />
I guess the thousands of ignorant developers at User Voice (<a href="https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3041773-bring-back-the-basic-setup-and-deployment-project" target="_blank">Bring back the basic setup and deployment project type Visual Studio Installer</a>) and the departure of all the Windows Installer experts from Microsoft was finally too much to keep a bad thing dead.<br />
<br />
Sigh.<br />
<br />
If you read this and decide to use this tool anyways, keep in mind:<br />
<br />
1) .VDPROJ doesn't support MSBuild so don't expect a decent TFS Build story without some custom plumbing to call DevEnv to build the project. Also don't expect this extension to be the Visual Studio Online build servers.<br />
<br />
<br />
2) Read my old article <a href="http://blog.iswix.com/2011/03/redemption-of-visual-studio-deployment.html" target="_blank">Redemption of Visual Studio Deployment Projects</a> for tips on how to get the most out of the tool without letting it suck the life out of your soul. (A little bit of VDPROJ and a whole lot of WiX / IsWiX!)<br />
<br />
<br />
<br />
<br />
Think I'm being dramatic? Read <a href="http://blog.iswix.com/2006/09/change-change-change.html" target="_blank">Change Change Change</a>. I literally spent a year banging my head against the wall trying to make this technology create installers that rival anything and everything that MSFT DevDiv puts out. I know this tool better then they do and I can say with complete confidence that it sucks.<br />
<br />
<br />
But Chris.... you didn't even try it!<br />
<br />
<br />
Actually, yes, I did try it. Installed the extension, created an empty installer and attempted to build it. Every time I do Windows Installer kicks off a Visual Studio 2013 repair and the application log indicates:<br />
<br />
<br />
<span lang="EN">Detection of product '{9C593464-7F2F-37B3-89F8-7E894E3B09EA}', feature 'Visual_Studio_Professional_x86_enu' failed during request for component '{CBB86C09-565A-43CF-9120-9D45AE3374CA}'</span><br />
<br />
<br />
But Chris.... why do you care what other developers use?<br />
<br />
<br />
Because I care passionately about the state of the setup industry and at my day job we often receive poor quality installers from third parties that we are then expected to somehow deploy without any issues.<br />
<br />
<br />
Still don't believe me? Go read the comments in this old blog post: <a href="http://blogs.msdn.com/b/robmen/archive/2006/09/18/761580.aspx" target="_blank">WiX in Visual Studio</a> Nearly 8 years have gone by and none of the problems in the tool mentioned in the 100+ comments have been fixed.<br />
<br />
<br />
Just consider that the $.02 of an 18 year industry veteran who is the Windows .NET ALM & Deployment Architect for a Fortune 35 retailer with $70B a year in revenue. We probably have a store very near you and we work hard to make sure that software is delivered to the business flawlessly and on schedule every time.<br />Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com2tag:blogger.com,1999:blog-985159635193633235.post-13899184857531281582013-10-21T18:03:00.000-07:002013-10-21T18:03:13.571-07:00IsWiX 22.13293.1 ReleasedI always liked the Code View / Design View patterns in Visual Studio so I choose to emulate this in IsWiX. Another aspect of this is to have one source file maintained by a code emitter and another source file maintained manually by the developer using a text editor. Think Foo.cs and Foo.Designer.cs in Winforms or XAML / CS in WPF.<br />
<br />
Usually you can mark up IsWiX authored XML without problems ( add various element such as ServiceInstall, ServiceControl, ShortCut and so on ) but sometimes you need to add an element that might cause IsWiX issues ( Component typically ) or that you want to really add a lot of custom action elements and related sequencing and you really want that code in another file for readability.<br />
<br />
To solve this problem I like to create a second .wxs file and use the Fragment element. Then with the use of ComponentGroup, ComponentGroupRef, DirectoryRef, Directory and Component elements you can tie the two together. This is sometimes a little hard to explain to a new WiX developer so I decided to make this the default experience in IsWiX merge module projects going forward. With that said, go check it out <a href="https://iswix.codeplex.com/releases/view/113776" target="_blank">here</a>.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-20630380016046105202013-09-27T14:50:00.000-07:002013-09-27T14:50:11.299-07:00IsWiX 2.1.13270.1 ReleasedAs I promised in my earlier blog post today, IsWiX 2.1.13270.1 is released and be found on CodePlex <a href="https://iswix.codeplex.com/releases/view/112674" target="_blank">here</a>.<br />
<br />
This release adds support for Microsoft Visual Studio 2013 RC. The IsWiX Setup and IsWiX Merge Module projects will show up in File | New | Project just as soon as WiX 3.8 supports VS 2013. Or can follow my instructions linked in my previous blog post.<br />
<br />
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-26861898559611989782013-09-27T08:13:00.002-07:002013-09-27T09:02:08.589-07:00WiX / IsWiX support for VS 2013 RCVisual Studio 2013 is set to GA next month and RTM in November. Based on blog posts and mailing list messages, it seems that the WiX team is now struggling to meet their schedule of a WiX 3.8 beta release with VS 2013 support by Halloween and a final release by the end of the year. You can read more about it <a href="http://www.joyofsetup.com/2013/09/13/getting-from-here-to-there-for-wix-v3-8/" target="_blank">here</a> and <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Weekly-releases-tp7589191p7589221.html" target="_blank">here</a>. My guess is that with Rob leaving MSFT and the DevDiv <a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3041773-bring-back-the-basic-setup-and-deployment-project-" target="_blank">embracing InstallShield LE</a> that they aren't getting the VS team support anymore.<br />
<br />
I've taken a look into what it would take and my initial impression is that there isn't any difficult VSIX work. A WiX setup developer with C++ expertise should be able to knock this out for them. Hopefully John Cooper will be able to step up as he has offered. If not, please consider jumping on the wix-devs list and see what you can do.<br />
<br />
That said, I've done some prototyping using manual steps and have come up with some procedures to get WiX 3.7 working on VS 2013 RC. You can read those steps <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-WiX-3-7-Votive-with-VS2013-RC-td7589257.html" target="_blank">here</a>.<br />
<br />
I have also gone ahead and made all the changes needed for IsWiX to work on VS 2013 RC. Basically IsWiX interacts with Visual Studio in two ways. The first is a Tools menu bar AddIn. To make this work I simply update the AddIn XML to declare that I support VS 2013. No other code changes are needed as the integration is very simple and no other code changes are required.<br />
<br />
The second interaction is that IsWiX leverages WiX infrastructure to provide two additional project template types. They are very similar to the WiX project types but more built out for a specific purpose. (Convention over configuration covered in my last blog post.) To get this to work I merely updated the IsWiX installer to locate the location of VS2013 and copy the project template zip files to the right directory followed by a call to devenv /setup. No other changes were required.<br />
<br />
The problem is that if WiX isn't properly registered with VS 2013 then the IsWiX project templates won't show. There is no error per say... they just don't appear.<br />
<br />
Hopefully WiX 3.8 will be released soon with VS2013 RC support. In the mean time I will be releasing a new version of IsWiX this weekend with my pieces completed.<br />
<br />
Until then, my general recommendation is to never use project references and keep your installer projects and your application projects in different solutions. This way you don't box yourself into a corner if some of your projects are ready to upgrade and others are not.<br />
<br />Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com1tag:blogger.com,1999:blog-985159635193633235.post-36954354677127899642013-01-13T19:32:00.000-08:002013-01-14T04:35:57.726-08:00IsWiX 2.0.13013.4 Released<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-yJo6ENlxV6U/UPN5NT2_WfI/AAAAAAAAAXE/XIAek8ykN5I/s1600/iswix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="388" src="http://1.bp.blogspot.com/-yJo6ENlxV6U/UPN5NT2_WfI/AAAAAAAAAXE/XIAek8ykN5I/s640/iswix.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<a href="http://iswix.codeplex.com/" target="_blank">IsWiX 2.0.1310.4</a> has been published on CodePlex. I've added two new Visual Studio Project Templates that go beyond what WiX proper provides. These templates along with the WiX designer allows for fast and simple MSI creation using the following simple steps.<br />
<br />
1) Create an IsWiX Setup Project and VS Solution. Example: Notepad<br />
2) Add a new IsWiX Merge Module Project. Name it the same as the project in step 1 except add MM to it. Example: NotepadMM<br />
3) Add the IsWiX Merge Module Project as a reference to the IsWiX Setup Project.<br />
4) Take a look through the source for any other changes you may need such as CompanyName, EULA, Banner and Dialog Bitmaps.<br />
5) Use IsWiX to author your files into the IsWiX Merge Module Project. <br />
6) Author additional meta into the IsWiX Merge Module Project that's not supported by IsWiX yet.<br />
<br />
I've been able to use this process to create a C# Windows Service, create the installer and set up a CI build using Team Foundation Service. This installer is fully versioned and supports major upgrades. The amount of time needed to author and test is less then 10 minutes! Here is a short video ( no sound ) to demonstrate.<br />
<iframe allowfullscreen="" frameborder="0" height="270" src="http://www.youtube.com/embed/NJxU47_zqbw" width="480"></iframe>Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-41631633803816376282012-11-08T05:47:00.004-08:002012-11-08T19:59:02.564-08:00Windows 8 Changes Setup Developers Need To Know AboutI've been using Windows 8 for awhile and I like it a lot. I can't say I liked the new Start Screen at first but it's grown on me. There is room for improvement though.<br />
<br />
Anyways, back to installs Here's a short list I have for the moment and I'll come back and grow it as more things occur to me.<br />
<br />
1) The Change UAC Settings dialog doesn't really disable UAC. You'll find your command windows aren't elevated and that you get UAC confirmation when updating files in the Windows directory. To completely disable UAC you have to go into the registry and change the EnableLUA policy registry value from 1 to 0 and reboot. I'm not saying you should do this, I'm just saying that if you *STILL* aren't creating installers that follow best practices with regard to custom action scheduling and execution context you really, really need to get on board. (Ahem Visual Studio Deployment Project users ).<br />
<br />
2) .NET 2.0/3.0/3.5 is not installed by default. If you are using managed code such as custom actions that don't have an activation policy manifest that allows the use of newer versions of the framework they will blow up. (Ahem Visual Studio Installer Class Custom actions users)<br />
<br />
3) Installing .NET 2.0/3.0/3.5 on Windows 8 is a pain in the back side. You can't use the EXE redist, you have to use a dism command to enable the feature. However, Microsoft didn't include the bits in the install.wim so it has to be able to go out to Windows Update and download source. In other words it's web/wsus enabled (via the OS) install only. There is no standalone installer (MSU) that I'm aware of. This is a sore spot and is best cured by moving your code forward to .NET 4.0 or beyond.<br />
<br />
4) The new start screen shows all icons by default. The user can create groups (think groupbox ) but they can not create subfolders and zoom into to see the icons. In other words, if your installer creates a bunch of icons and you thought that was ok because you were putting them into subfolders to hide them, they will all appear and the user will have to unpin a bunch of shortcuts to clean up his desktop. (InstallShield, Visual Studio... lots of icons ) To prevent your installer from doing this, set the System.AppUserModel.StartPinOption to 1 using the MsiShortCutProperty table.<br />
<br />
<br />Those are my three biggies so far. As I discover more, I'll keep you posted.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com4tag:blogger.com,1999:blog-985159635193633235.post-46620390688936088732012-11-03T13:48:00.003-07:002012-11-03T13:52:25.125-07:00Help Wanted - Austin, TX or Atlanta, GA<span class="share-body" id="yui-gen26">Calling all available Hard Core Deployment Engineers!</span><br />
<span class="share-body" id="yui-gen26"> </span><span class="share-body" id="yui-gen26"> </span><br />
<span class="share-body" id="yui-gen26">I'm looking for a setup developer with experience using three or more of the following:</span><br />
<br />
<span class="share-body" id="yui-gen26">WiX, MSI, InstallShield, C#, C++, Microsoft TFS (Source Control and Team Build ), Build / Release Automation</span><br />
<br />
<span class="share-body" id="yui-gen26">This is for a contract position in Atlanta, GA or Austin, TX supporting The Home Depot's Open Systems Engineering - Windows Automation team.</span><br />
<br />
<span class="share-body" id="yui-gen26">Feel free to
reach out to me to discuss further. </span><br />
<br />
<span class="share-body" id="yui-gen26">No Third Parties.</span><br />
<span class="share-body" id="yui-gen26"> </span>Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-23144859739110037132012-09-11T18:24:00.003-07:002012-09-11T18:24:48.891-07:00Visual Studio Deployment Projects Migration Assistance AvailableWith Visual Studio 2012 shipped, the news from a year and a half ago that Visual Studio Deployment Projects would no long be supported is finally hitting home with developers.<br />
<br />
They generally aren't happy. <br />
<br />
FWIW, I've converted hundreds of these projects to other project types using tools such as Windows Installer XML and InstallShield. I have this process down to a science and I'd love to have an opportunity to work with anyone needing assistance in moving forward. <br />
<br />
You'll find that I have tools and methodologies that keep my costs very low while greatly improving the quality of your product's installer.<br />
Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-86302291426721094592012-04-19T15:46:00.001-07:002012-04-19T15:48:43.220-07:00Patriotic Opener<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-FFzUUwfp7rc/T5CTwMrPROI/AAAAAAAAAVc/c7ErZEKvyxo/s1600/marines.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="http://3.bp.blogspot.com/-FFzUUwfp7rc/T5CTwMrPROI/AAAAAAAAAVc/c7ErZEKvyxo/s400/marines.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Credit: United States Marines / Released</td></tr>
</tbody></table><br />
Back when <em>I</em> was in the Corps, I used to travel all over the world performing for audiences. One of our show formats was the Patriotic Opener. This was basically where we would march onto a stage and do a stand still performance. Over the years we performed at some impressive venues for some high up big wigs but none as cool or as high as this recent performance. You can watch the entire ceremony over at <a href="http://www.c-span.org/Events/C-SPAN-Event/10737430005/" target="_blank">C-SPAN</a>.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0tag:blogger.com,1999:blog-985159635193633235.post-89708869295191133522011-12-24T10:10:00.000-08:002011-12-24T10:10:05.361-08:00IsWiX 1.5 ReleasedRelease <a href="http://iswix.codeplex.com/releases/view/79364" target="_blank">1.5.11358.1</a> of Industrial Strength Windows Installer is now available for download over at CodePlex.<br />
<br />
This release completes the "Component Rules" radio buttons on the Files and Folders designer. You can read about it in the release notes at CodePlex.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com1tag:blogger.com,1999:blog-985159635193633235.post-21041297620998918432011-11-21T18:54:00.000-08:002011-11-21T18:54:55.729-08:00The Curious Case of the Corrupted CharactersRecently I was shown a machine where the PowerShell cmdlet Get-WmiObject was failing to query the Win32_Product class. The strange thing was that WMIC path Win32_Process was working.<br />
<br />
I almost wanted to blow this off as yet another example of how Win32_Product is broken but there was a catch: I could fix and break the behavior at will by uninstalling and installing the MSI I was working on.<br />
<br />
I started to wonder how this could be. I could only assume that there was some bad data causing casting problems in PowerShell ( COM interop is a pain ) so I decided to run MSI validation to see if it warned me of anything.<br />
<br />
Sure enough, it did. A big ICE24 error alerted me to a problem in the ProductVersion property. Well, at least it tried to. 2.0.1600 sure looked like a valid ProductVersion to me. For the life of me I couldn't get it to stop complaining about that value so I decided to export the Property table to an IDT file. Sure enough notepad showed me a special character and a Hex editor showed me that there were actually two special characters corrupting my property.<br />
<br />
I kept digging and found the root of the problem in the build automation NAnt file. A text file was being created and loaded into a NAnt property using the loadfile elemnt. Those two extra characters were coming along for the ride.<br />
<br />
Let's see all the ways this could have been caught:<br />
<br />
1) NAnt could have trimmed the property automatically.<br />
2) ISCmdBld could have trimmed the property.<br />
3) MSI Validation could have been turned on in the build.<br />
4) MsiPublishProduct could actually enforce the required datatype of the property<br />
5) The MSI WMI provider could trim the property.<br />
6) The Get-WmiObject could trip the property or report a better error.<br />
<br />
And of course, this post wouldn't be complete without me mentioning that there is a much better alternative to Win32_Product called the ProductInstallation class as found in WiX DTF's Microsoft.Deployment.WindowsInstaller interop. It's a very nice encapsulation of the unmanaged MsiEnumProducts function and doesn't have the horrible performance problems that Win32_Product has.Christopher Painterhttp://www.blogger.com/profile/12167478740431444267noreply@blogger.com0