Thursday, November 11, 2010

Technobrief #12

Summary: Recent findings of software, articles, and more.
  • InstantFirefox
    Add-on that enables instant (Chrome-like) search in Firefox.
  • Syphon
    Keeps your favorite extensions synced with all your computers.
  • Simplicity
    Great illustration of what a typical Apple product, Google interface and your company's application look like (funny, and so true).
  • 50 New Free High Quality Icons Sets
    Most of the listed freebies may be used for commercial projects as well, some of them may not.
  • Gcons
    Comprehensive collection of 100 creative, open source and multi-purpose icons in 12 colors for the web and desktop applications.
  • John Sculley On Steve Jobs, The Full Interview Transcript
    Offers awesome insights into how Steve Jobs does things; it’s also one of the frankest CEO interviews you’ll ever read (Sculley talks openly about Jobs and Apple, admits it was a mistake to hire him to run the company and that he knows little about computers).
  • The Essentials of Writing High Quality JavaScript
    Stoyan Stefanov offers an excerpt of his book (JavaScript Patterns) detailing the essentials of writing high quality JavaScript, such as avoiding globals, using single var declarations, pre-caching length in loops, following coding conventions, and more. This excerpt also includes some habits not necessarily related to the code itself, but more about the overall code creation process, including writing API documentation, conducting peer reviews, and running JSLint.
  • Laborers versus Professionals
    Jan Van Ryswyck offers a frank look at typical corporate application development practices (fear-driven development!).
  • Diffuse
    Tool for comparing and merging text files.
  • FotoMix
    Allows you to crop, resize, rotate, mix and manipulate different pictures,
    to create a wide variety of images.
  • Hamster Free Video Converter
    Converts video and audio files between various formats.
  • Free Video Converter
    Converts video between formats (AVI, MP4, WMV, MKV, SWF, 3GP, MPEG), creates custom presets, converts to devices, rips & burns DVDs, and uploads videos to YouTub.
  • JD-GUI
    Java decompiler.
  • xSearch
    A free search tool that offers more features than Windows Search, including searches for special words in files (any of the words, all of the words, exact phrase, without the words, etc), search for hexadecimal values, search for words in Unicode or UTF-8 format, and more.
  • CPU-Z
    Displays information about the main devices of your computer including CPU, graphics card, motherboard, memory, etc.
  • Rasterbator
    Creates rasterized versions of images, which can be printed and assembled into enormous (or smaller, if you prefer) posters.
Web tools
Web development
  • The Footer’s the Menu
    James Edwards suggests ways to address usability and accessibility problems with drop-down and fly-out menus.

Tuesday, November 9, 2010

Windows Live Essentials 2011 error [SOLVED]

Summary: Why can't I install Photo Gallery and Movie Maker?
This is what an installation error should not look like:

Two hours of frustration, searching the web and support sites for possible hints, following any remotely close suggestions, and the only thing I get is:
An unknown error occurred.
Error: 0x80096005
Source: D3DX9
Thank your Microsoft, kids!

UPDATE: Okay, after getting a number of hints from troubleshooting posts, I was able to fix the problem. It looks like my system missed the original DirectX 9 DLL (D3DX9.DLL). I don't know why it's missing. Maybe some program removed it when it was not supposed to (I did not see any errors related to DirectX 9, though). So, I just made copies of the latest version of the DirectX 9 DLL (D3DX9_XX.DLL) in the System32 and SysWow64 folders and renamed the copies to D3DX9.DLL. Problem solved. Hope it helps someone.

Wednesday, October 27, 2010

Free web site builders: Weebly vs. Yola

Summary: Pros and cons of using Weebly and Yola free web site builders.
If you need a simple web site, a wide range of providers can offer you a capability to build and host your site for free, assuming that you can live within their limitations. The most common limitation is banner advertisements which will be sprinkled across your web pages. Banner ads may not be a problem for some, but they often make you site look amateurish. If you want a more professionally looking site with no banner ads, your free web hosting options are limited to:
I have checked these sites and used two of them to establish web presence for some friends (small businesses owners). Here is a brief summary of my experience (note: I describe the features of free hosting; all companies provide premium -- paid -- hosting with fewer limitations).

Wix looks slicker than the other two, but it produces web pages that use Adobe Flash technology instead of more common (and expected) HTML. Now that Google can index Flash-based pages this may not be a big deal, but being mostly an HTML type of developer, I can't bring myself to embrace Flash as a web page medium. Call me old-fashioned or biased, but I think that for simple web pages, HTML is more appropriate than Flash.

Yola (formerly, Synthasite) and Weebly are very similar. They give you a web site builder to create web pages based on available templates (some templates are free, some are not). You pick a template (you can change the template at any time), then you add elements (such as two-column layout, heading, text, picture, hyperlink) to the page layout via available widgets. Widgets allow you to customize the page elements, but customization options are often limiting. If you need to add an element that does not have a corresponding widget (such as a table), you can use an HTML widget that lets you enter any HTML code snippet.

Once your web site is ready, you publish it to a subdomain under or (e.g. or, or you can use a custom domain (e.g., which you can purchase directly from Yola or Weebly (for a slightly higher fee), or from any domain registrar, such as GoDaddy.

Yola and Weebly add their company logos to page footers, but the logos are rather unobtrusive.

Here is a list of problems I encountered when I worked with Yola and Weebly:
  • Yola: Web site builder requires Firefox (it did not work for me in Chrome). (This seems to have been fixed.)
  • Yola: CSS customization is tricky (there is no easy way to define common styles, such as fonts, etc).
  • Weebly: Cannot paste formatted text (say you paste text copied from a web page); it messes up formatting and does not let you correct it (the only way is to delete the element and recreate it).
  • Weebly: Customization of a window title is somewhat limited (you cannot define an arbitrary title for a page title).
  • Weebly: Cannot reference already uploaded images (e.g. you can upload an image and reference it on one page, but how do you reference it on another page?).
  • Weebly: Some features of the resulting site work only in Internet Explorer (e.g. ALT properties of IMG elements only work in IE).
  • Weebly: There is no option to preview changes before publish the site.
  • Weebly: Customer support is sporadic at best (I got a response to one out of four questions I submitted).
  • Both: Cannot specify title (tooltip) for hyperlinks (looks bad for image URLs).
The best things about Yola are vibrant user community and customer support. I raised several issues with Yola's customer support and got prompt responses from Yola's representatives. All my issues were resolved. I can say that Yola's customer support rivals (well, it's actually better than) customer support of most big names in software industry. I also found good recommendations at Yola's user forum.

The major limitation of both sites is their page templates. Although, they offer dozens of free templates, most of them look like they were designed in mid-90's for a high school project. I found one relatively decent template at Weebly (which I used for one site), but I had even less luck with Yola (I ended up building one site at Yola, but it's not something I would be proud to show).

If you need a simple and unassuming web site, give Weebly or Yola a try. They could be so much better, but even with current limitations, you can use either service to build online presence for a small business, create a personal or family site, and other simple applications.

If you can recommend another alternative (based on personal experience), please leave a comment (just make sure that this alternative does not use banner ads and supports other features offered by Yola and Weebly: custom domains, templates, site builder, custom CSS, HTML editing).

UPDATE (Dec 25, 2010): I recently published another site on Weebly, and while working on it, I appreciated the feature that let me easily find and incorporate free stock photos into the pages. Being able to select a different photo in the page header for each page was especially handy.

Tuesday, October 19, 2010

How to fix a hanging uninstaller

Summary: How to fix a hung uninstaller issue due to inclusion of Visual C or MFC runtime merge module in the MSI package.
I have hassled with this problem for a long time and just recently figured out how to fix it, so I'm posting the solution in hope that it will help someone else.

You create an MSI package using Visual Studio, WiX Toolset, or whatever. The MSI package works fine during initial installations, repairs, and upgrades, but it takes really long time to uninstall. It may take two minutes, five minutes, 15 minutes, or longer, when it should've taken a few seconds. In my last case, after 20 minutes of waiting I gave up and killed the MSIEXEC process (this was during testing, so no harm was done).

I suspect that an uninstaller can (appear to) hang for different reasons. If your setup package includes merge modules for any version of Visual C or MFC runtime, such as Microsoft_VC80_CRT_x86.msm, Microsoft_VC80_MFC_x86.msm, Microsoft_VC90_CRT_x86.msm, Microsoft_VC90_MFC_x86.msm, etc, they can cause the problem. To verify, build your MSI package without these merge modules and see if the uninstaller runs faster. If it does not, I'm sorry, I can't help you, but if your uninstaller runs significantly faster, you should be able to correct the problem. Another troubleshooting step could be running uninstaller for the MSI containing the merge modules with logging enabled and checking the log entries. The command line for this should be similar to:
msiexec /uninstall "PATH TO YOUR MSI FILE" /l*vx "PATH TO OUTPUT/LOG FILE"
In my log file, when the installer appeared hanging, I saw a repetition of the same pattern of log messages that looked like these:
Action start 13:07:24: SxsUninstallCA.
1: sxsdelca tried opening key w/o wow64key  2: Software\Microsoft\Windows\CurrentVersion\SideBySide\PatchedComponents 3: 380 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (235) of type 790531 for thread 200
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (236) of type 790531 for thread 200
1: sxsdelca tried opening wow64key  2: Software\Microsoft\Windows\CurrentVersion\SideBySide\PatchedComponents 3: 404 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (236) of type 790531 for thread 200
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (237) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 1158 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (237) of type 790531 for thread 200
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (238) of type 790531 for thread 200
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (239) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 1186 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (239) of type 790531 for thread 200
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (240) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 732 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (240) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 748 4: 0
MSI (s) (E8!C8) [13:07:24:507]: Creating MSIHANDLE (241) of type 790531 for thread 200
1: scavenge 2: {121634B0-2F4B-11D3-ADA3-00C04F52DD52} 3: {98CB24AD-52FB-DB5F-C01F-C8B3B9A1E18E} 4: {AEA1383C-9A90-406A-8CAE-718170D9CBDA} 5: -1
MSI (s) (E8!C8) [13:07:24:507]: Closing MSIHANDLE (241) of type 790531 for thread 200
MSI (s) (E8!C8) [13:16:37:663]: Creating MSIHANDLE (180783) of type 790531 for thread 200
1: scavenge 2: {EDDF99D9-9FE3-4871-A7DB-D1522C51EE9A} 3: {42CDEC6E-1259-F078-C01F-C8B3B9A1E18E} 4: {AEA1383C-9A90-406A-8CAE-718170D9CBDA} 5: -1
MSI (s) (E8!C8) [13:16:37:663]: Closing MSIHANDLE (180783) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 748 4: 0
MSI (s) (E8!C8) [13:16:37:663]: Creating MSIHANDLE (180784) of type 790531 for thread 200
1: scavenge 2: {0EFDF2F9-836D-4EB7-A32D-038BD3F1FB2A} 3: {42CDEC6E-1259-F078-C01F-C8B3B9A1E18E} 4: {AEA1383C-9A90-406A-8CAE-718170D9CBDA} 5: -1
MSI (s) (E8!C8) [13:16:37:663]: Closing MSIHANDLE (180784) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 748 4: 0
MSI (s) (E8!C8) [13:16:37:663]: Creating MSIHANDLE (180785) of type 790531 for thread 200
1: scavenge 2: {4D7B7CF9-E7EA-4404-B148-0C8B8A520E35} 3: {42CDEC6E-1259-F078-C01F-C8B3B9A1E18E} 4: {AEA1383C-9A90-406A-8CAE-718170D9CBDA} 5: -1
MSI (s) (E8!C8) [13:16:37:663]: Closing MSIHANDLE (180785) of type 790531 for thread 200
1: sxsdelca 2: traceop 3: 748 4: 0
I'm not quite certain why this is happening, but apparently the problem only occurs under certain conditions, i.e. the same MSI package that includes Visual C or MFC runtime merge modules may work fine on some systems and hang on others. For more information, check the See also section.

This may not be the most elegant solution, but in the absence of alternatives, to fix the problem, do not process Visual C and MFC runtime components during uninstallation. In the MSI terms, you need to delete the SxsUninstallCA action from the CustomAction table in the MSI package.


You can delete this record manually using Orca, but it would be more convenient to automate the operation, which you can do with the help of the WiRunSql.vbs script. The script comes with the Windows Installer Software Development Kit (SDK). Once you install the SDK, you can find the WiRunSql.vbs file in the location similar to:

C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\sysmgmt\msi\scripts\WiRunSQL.vbs

You can copy this file to your project or solution folder and then execute it as a post-build step. For example, if you keep the script in the solution folder, your post-build command in a WiX project may look like this (make sure the command appears on one line):

cscript //nologo "$(SolutionDir)WiRunSql.vbs" "$(TargetPath)" "DELETE FROM CustomAction WHERE CustomAction.Action='SxsUninstallCA'"


See also:
WinForm app Uninstall involving VC++ runtime libs takes a long tim[e]

Monday, October 18, 2010

WiX how-tos and missing links

Summary: Links to articles explaining how to accomplish different tasks in WiX and other helpful information.
This is post #4 of the six-part Learning WiX series. For other topics, see:

Table of contents
  1. Background (why WiX?)
  2. Introduction (answers to common questions)
  3. Getting started (references and tutorials)
  4. How-to's and missing links
  5. Slides and demo projects
  6. Improved demo projects (32- and 64-bit installers)
Here is a list of articles covering topics that I either did not find -- or found implemented better than described -- in most popular WiX tutorials and wikis:

How to: Exclude license agreement dialog from the dialog sequence
How to: Install a Windows service (see also this and that)
How to: Build 32-bit and 64-bit MSI packages (see this thread, and that one, too)
How to: Add a shortcut (without an icon [.ICO] file)
How to: Add a checkbox to conditionally install a desktop shortcut (via a check box)
How to: Add a desktop shortcut (without a registry key)
How to: Create shortcuts for ALL USERS
How to: Execute custom action (CA) on uninstall only
How to: Create an uninstall shortcut
How to: Launch program after installation
How to: Add a neat checkbox to the exit dialog for launching a program or help file
How to: Create a localized installer and bootstrapper (see also parts 2, 3, and 4)
How to: Modify XML files (e.g. web.config) during installation
How to: Modify web.config file during installation (turn off debug flag, etc)
How to: Implement custom actions (CAs) (excellent explanation of different CA types)
How to: Implement a custom action in managed code (C#/VB.NET)
How to: Implement a major upgrade (see Brian Gillespie's comment for optimization ideas)
How to: Preserve original Windows service configuration on major upgrade
How to: Deploy a web site (also this one)
How to: Save path to installation folder in the registry (search for ARPINSTALLLOCATION; see also this, this, and that)
How to: Override (wrong) Program Files (x86) on x64 machines in WixUI_Advanced sequence
How to: Upgrade application in the original installation folder ()
How to: Make setup UI sequence show only two (Welcome and Final) dialog boxes
How to: Retain user-customized files during a Windows Installer major upgrade
How to: Register a COM+ application
How to: Create an event log source
How to: Deploy publisher policy files to GAC

I also found the following information very insightful (some related to MSI, other about WiX):

Description of TARGETDIR and SourceDir
Explanation of the MergeRedirectFolder variable
Differences between 32-bit, 64-bit, and mixed MSI packages (includes folder locations, package compatibility and other info)
How Windows Installer Processes Packages on 64-bit Windows
List of system folders defined by the Windows Installer engine
Add/Remove Programs (ARP) support (good explanation and illustration of ARP properties)
Windows Installer: Property Reference
MSI Writing Guidelines

I will keep updating these lists updated when I find more useful articles.

See also:
WiX - Windows Installer XML (more how-tos)
WiX tricks and tips (includes a few how-tos)
WiX Tricks (several good suggestions)
WiX Tips & Tricks

Tuesday, October 12, 2010

Learning WiX from ground up

Summary: Reference guide for beginners.
This is post #3 of the six-part Learning WiX series. For other topics, see:

Table of contents
  1. Background (why WiX?)
  2. Introduction (answers to common questions)
  3. Getting started (references and tutorials)
  4. How-to's and missing links
  5. Slides and demo projects
  6. Improved demo projects (32- and 64-bit installers)
So you decided to create your first setup package using Window Installer XML (WiX). Where do you start? And how much do you need to know about WiX and Windows Installer (MSI) to build a working deployment package?

The answer to the second question is: it depends. Well... sort of. Before you begin, you definitely need to know the fundamentals of the Windows Installer (MSI) technology, such as:
  • The overall structure of an MSI package (MSI database)
  • The difference between packages, features, components, and deployment items (files, registry keys, shortcuts, etc)
  • Custom actions (CAs) and how they are used
  • Upgrade types (minor vs. major upgrade)
  • Merge modules
You don't need the in-depth knowledge, but at the very least, you need to understand the terminology (check the Wikipedia overview and MSI Basics). You may need to learn more to implement such complex features as program shortcuts (yes, shortcuts are complex in Windows Installer), but you will be able to learn additional concepts as you go.

To get started, install the current version of WiX Toolset from:
You can download a beta version of the upcoming release or an older version of WiX Toolset from SourceForge.

I assume that you will be using Visual Studio to develop setup programs. WiX Toolset includes a Visual Studio add-on, Votive, that enables WiX integration with the Visual Studio IDE. After installing WiX Toolset, make sure that WiX project templates appear in the New Project dialog box:

At this point, you can create a WiX project, but when you open the auto-generated WiX source file, you'll realize that you have no idea what to do with it. This is where a tutorial can help.

The WiX Toolset's help file is a good place to start (by default, the help file is installed to C:\Program Files\Windows Installer XML v3\doc\wix.chm; you can find a shortcut to the help document under the WiX program group in the Start menu; the help file can be also viewed online). You don't need to read it all; the first few chapters and how-to articles give you a basic idea of what you need to do to get a functional setup project.

To get more in-depth understanding of WiX, check out more advanced tutorials. The ones I found most helpful include:
There is also a very insightful presentation by Jeffrey Sharp (with slides and video):
The following MSDN article by Ibrahim Hashimi is a bit out-of-date and has a slightly different focus (build automation), but it still offers a pretty decent overview of WiX:
Nick Ramirez just published an excellent book that covers a lot of WiX and Windows Installer (MSI) topics (see my Amazon review):

You can read the Getting Started and Adding a User Interface chapters online.

And here is a list of tools that you may want to check out:
  • SharpSetup creates bootstrapper and GUI for your WiX installer in C# and WinForms.
  • Wix# (WiXSharp) builds MSI packages or WiX source code from C# code.
  • IsWix (Industrial Strength Windows Installer XML) is a document editor that enables non-setup developers to collaborate with setup developers using WiX projects.
  • WixEdit is an editor for XML source files for the Windows Installer XML (WiX) toolset to build MSI and MSM setup packages.
After you feel more comfortable with WiX basics (deploying files, etc), your next challenge will be implementing slightly less obvious operations (registering COM objects, creating shortcuts, using custom actions, etc) that are either not covered in the help file and popular tutorials or covered incompletely. In the next post, I will include the list of references to the how-to articles that I found most helpful.

Friday, October 8, 2010

Introduction to WiX

Summary: Answers to most likely questions from Windows Installer XML (WiX) novices.
This is post #2 of the six-part Learning WiX series. For other topics, see:

Table of contents
  1. Background (why WiX?)
  2. Introduction (answers to common questions)
  3. Getting started (references and tutorials)
  4. How-to's and missing links
  5. Slides and demo projects
  6. Improved demo projects (32- and 64-bit installers)
Here is a list of questions I had a couple of weeks ago before I started working with WiX (Windows Installer XML). I hope that answers to these questions will help other WiX novices.

What is WiX?
WiX is a language (Windows Installer XML [eXtensible Markup Language]), or more specifically, a Windows Installer-specific XML syntax. You can use WiX syntax to author XML source files for your setup project, from which you can then build Windows Installer (MSI) packages with the help of WiX Toolset.

What is WiX Toolset?
WiX is distributed as a free (open-source) toolkit that includes several command-line tools (such as WiX compiler, linker, etc), documentation, and utilities. Once you create WiX source files defining your setup application (you can do it by hand in a text editor, such as Notepad), you can use WiX Toolset to compile these files into a Windows Installer (MSI) package.

Can I develop WiX projects in Visual Studio?
Yes, WiX Toolset's Visual Studio package, Votive, which is also free (and open-source), adds WiX-specific project templates to Visual Studio, so you can create and build WiX projects directly from Visual Studio. Votive also provides syntax highlighting and IntelliSense for WiX source files.

Which version of Votive do I need?
There are several versions of Votive (and WiX Toolset), each targeting specific versions of Visual Studio. At the time of writing, the latest version (v3.5 for Visual Studio 2010) was still in beta. The recommended version (v3.0) works with both Visual Studio 2008 and 2005. Earlier version(s) of the toolset target the earlier version(s) of Visual Studio.

How does Votive/WiX differ from Visual Studio Installer?
Visual Studio Installer (or Setup and Deployment Project Template) allowed you to build setup packages via drag-and-drop activities and automation. It automatically detected dependencies for your application files, generated GUIDs for components and features, and did a few other things in the background, so you may have not even realized that they were happening. When working with WiX projects you must perform all these tasks by hand.

So WiX is not as good as Visual Studio Installer, right?
Yes, and no. It's true that WiX requires more manual work. And it has a steep learning curve. But it's more flexible than Visual Studio Installer, it supports more features and customization, and gives you more control over the resulting setup package. And it produces a much cleaner MSI database.

Does WiX support all features of Windows Installer?
No, unfortunately not. WiX supports many common features of Windows Installer technology, but not all. The list of supported features includes (but is not limited to):
  • 32-bit, 64-bit, and mixed (32/64-bit) installers
  • Creation of shortcuts and registry entries
  • COM server registration
  • Windows service registration
  • Customization of setup dialog sequence (up to certain extent)
  • Creation of web sites
  • And much more
If you wonder about WiX support of a particular feature, check the web for articles and posts on the topic of your interest and you're most likely to find whether WiX support it or not.

Can I use WiX to create a bootstrapper program (setup.exe)?
No, WiX Toolset only allows you to build MSI and MSM (merge module) files.

What are other limitations of WiX?
See the answers posted on StackOverflow.

What are the differences between WiX project types?
In addition to regular installer projects, Votive allows you to build merge modules and WiX libraries. Merge modules let you share installable components among different products. For example, if you want to deploy a common COM component/ActiveX control with different applications, you can encapsulates its installer in a merge module and than use this merge module with regular WiX installer projects (the merge module will be absorbed in each product's MSI package). WiX libraries allow you to share identical sections of XML code between the WiX source files (this is similar to using include files in C/C++ projects).

What do I need to know before learning WiX?
In theory, you should understand Windows Installer (MSI) before you start learning WiX, but in practice you can learn both technologies concurrently. The abundant information available online can help you get started and achieve progress even if you have very limited understanding of Windows Installer.

Where do I find support if I get stuck?
You can start at StackOverflow (I found answer to most of my questions there). The "official" support site is at SourceForge.

I want to try WiX. Where do I start?
This will be the topic of my next post.

See also:
What about that WiX?
Dude, where is your installer?

What about that WiX?

Summary: Reflections from my first encounter with Windows Installer XML (WiX).
This is post #1 of the six-part Learning WiX series. For other topics, see:

Table of contents
  1. Background (why WiX?)
  2. Introduction (answers to common questions)
  3. Getting started (references and tutorials)
  4. How-to's and missing links
  5. Slides and demo projects
  6. Improved demo projects (32- and 64-bit installers)
There comes a time in every Windows programmer's life to face WiX (Windows Installer XML). For me this time came with the news of Microsoft's plan to retire Visual Studio Installer in favor of InstallShield Limited Edition. So I spent the last couple of weeks getting to know WiX and using it to implement installers for several production applications. This is what I learned.

Good news: (1) WiX Toolset let me create installers that were on par with installers I used to build in the good ol' pre-Windows Installer days. (2) I did not have a panic attack when I opened the WiX-generated MSI files in Orca (WiX seem to produce less garbage than say Visual Studio Installer). (3) It took relatively few lines of XML code to build an installer that handled deployment of a Windows service, COM object registration, desktop and shortcut menu creation, invocation of a configuration utility, and typical user interface (setup wizard).

Unfortunately, I cannot say that my transition to WiX was seamless. WiX Toolset has a few limitations. To be fair, some of these limitations are caused by idiosyncrasies imposed by Windows Installer (MSI), but some are native to WiX (e.g. it seems impossible to use the recommended type of custom action when invoking an executable from a merge module). WiX tools sometimes lack features (e.g. it's relatively easy to extract COM registration information from a COM DLL, but there is absolutely no way to do it from a COM executable). There are bugs (probably not as obnoxious as InstallShield bugs, but still). Project documentation and information is skimpy and somewhat confusing (why is the project split between SourceForge and CodePlex? how long should it take a WiX novice to figure out what and how to download the toolkit? why is it called Votive? and why is "i" in "WiX" lower case?) And the WiX learning curve is rather steep, especially for those who have not been intimate with Windows Installer (MSI).

One good -- and bad -- thing about WiX is that it's an open-source project. On the positive side, WiX has a momentum now both inside and outside of Microsoft. On the other hand, it's not clear if, or how long, Microsoft's backing of the project will continue (say, Microsoft strikes another back room deal [I'm speculating here] with Flexera [the InstallShield maker] and withdraws all support from WiX).

As long as you are looking for alternatives, here is a list of commercial products that can help you build MSI-based installers:
Some of these are more popular than others (popularity is often an indicator of the size of the marketing budget than product quality), but I haven't use them to extent of recommending one over the other. [I used to be a huge fan of InstallShield in the late 90's, but after the InstallShield 7 migration fiasco (3 months wasted on a failed attempt to convert a complex InstallShield 6.x project to InstallShield 7, mostly due to bugs in the product) I would not want to re-live the pain.] So for the time being I will stick with WiX.

If you are interested in WiX, read my subsequent posts. I will share (time permits) the things that helped me get started. Here is the outline of the upcoming WiX-related posts (I'll convert items to hyperlinks when the posts are ready):
  1. Introduction to WiX (FAQs for novices)
  2. Learning WiX from ground up (resources for WiX beginners)
  3. WiX how-tos and missing links (helpful how-tos and insights)
  4. Bonus: Presentation and demo projects
  5. Extra bonus: Build 32- and 64-bit installers using WiX (new and improved samples)
See also:
Choosing a Windows Installer Deployment Tool
Dude, where is your installer?
Rob Mensching Does Installations with the WiX Toolset (podcast, transcript)

Monday, July 26, 2010

Total 3D Home, Landscape & Deck software review

Summary: My trials and tribulations with the Total 3D Home, Landscape & Deck software package.
A few months ago, I moved to a new home. Expecting to make some changes -- pouring concrete around the house, installing a patio cover, painting the fence, landscaping, converting a bonus room into a bedroom, etc -- I wanted to try modeling design changes in software. I've never used home/landscape design software, nor did I have any experience with 3D modeling, so I looked for reviews of the popular consumer home/landscape design packages with the $100 or less price tag. Unfortunately, I did not find many in-depth reviews, and the few ones I read were often conflicting. So I went by the TopTenReviews recommendations and decided to try their choice #6: Total 3D Home, Landscape & Deck Premium Suite 11.0 by Individual Software.

I chose Total 3D software for two reasons. First, at least based on the feature summary, it seemed to cover more areas of my interest than other alternatives (I was more interested in landscape part, but interior design support was a plus). Second, the software was on sale at a local Fry's, which (after rebate) ended up costing me just the CA sales tax.

In short, Total 3D Home, Landscape & Deck Premium Suite 11.0 did not work that well for me. Here is a brief summary of my experience with the package.

Total 3D Home, Landscape & Deck Premium Suite 11.0 comes with two disks. The first one contains the program. I'm not sure what the purpose of the second disk is. I installed both disks on a laptop running Windows XP SP3, but once I upgraded it to Windows 7, the second disk failed to install. After working extensively in both the XP and Windows 7 environments, and I did not notice any advantage of having the second disk installed.

The online registration failed on both systems (XP and Win7), so I had to register the software manually (via a fax!).

The application desktop shortcut tried to check updates (on every program launch), but always failed. I contacted support and received instructions explaining how to change the shortcut to point to the main program instead of the update checker. It worked, but now the program does not check for updates.

Although I found the help articles and tutorials accompanying the software helpful, I still had a pretty vague idea of how the workflow should go, so it took me a few false starts and a couple of days to figured out the right approach.

I started my project by importing a blueprint of my home's floor plan (I had a hard copy of the blueprint, which I scanned to generate a PDF file, which I converted to a JPEG image). I then placed the home areas (garage, halls, rooms, kitchen, bathrooms) over the corresponding blueprint areas, which was rather easy. The software created the wall and roof, producing a reasonable 3-D mock-up (even the roof was done right). I then placed the home on a lot and defined the landscape/hardscape features: lawn, walkways, fence. I found the 3-D (aerial) and walk-through views impressive. They allow you to rotate the home and look at it (both from inside and outside) at different angles.

I added windows, doors, and openings, but with mixed success. For example, for some reason, adding a porch made the exterior door totally invisible. So did the patio. I assume that this is a bug in the software; the door looked fine (when I added it in the Design Plan tab). I then added a porch in the Space Plan tab, and it looked fine, too. I then switched to the Aerial tab, and once I clicked the Design Plan tab again, the door seemed to be covered by the wall. It also disappeared from the Aerial view. I raised this issue, but got no response from support (not even an acknowledgement of my message).

In addition to the disappearing doors, quite a few things did not work as promised or at all. Here is a brief list problems that I encountered.

The software promises to produce photo-like 3-D images assuming that you can apply photos to the design (which was one of the selling points for me; I wanted the software to produce real-life images). You are supposed to cut out an area from a digital photo and apply it to the corresponding area of your design. I tried many times, but could not make it work. The cut-out area from a photo did not stick to the right place.

I also had many issues with cabinets and other interior elements. While they worked okay in some areas, in other ares the cabinets kept moving from the positions I placed them causing overlapping. Sometimes they would appear normal, but once I switch the tabs and come back or make an unrelated change, I would find them stuck to the ceiling or on the top of each other. I raised this issue to support, too, but got no response either (at this point, I gave up on support; and I gave up on designing internal elements: cabinets, appliances, bath tubs, etc).

Total 3D allows you to import custom textures. I tried to import the texture of the external wall from a digital photo, but it ended up producing tile-like texture which looked worse than the built-in textures and colors. Textures and colors is a major pain area. First of all, it's next to impossible to find the right color or texture. Instead of using a standard and logical color palette, you have to navigate through several levels of screens. Many colors appear the same and some colors are missing. For example, I could not find the basic white color to paint the doors and window frames. The Favorites feature is a joke: instead of keeping your favorite colors and textures in a dedicated area for easy selection, it simply marks your favorites with labels, but you still have to remember how to find them in the maze of screens.

The software comes with extensive set of built-in objects, but it lacks the most basic options, such as popular patio covers (lattice or solid), sliding built-in closet doors, realistic gazebos, granite counter tops, and much more. With some creativity, you can mimic some objects (I used marble texture instead of granite, and a stair step to imitate the outside A/C unit), but for others, you're totally out of luck (there is no way you can produce a realistic lattice patio cover).

One of the major hassles is that the program seems arbitrary in allowing you to remove objects from the design. For example, you may not be able to remove a wall once you add it to the floor plan. I ended up creating a backup project after making a few changes to make sure, I do not have to start from scratch after making a change (I cannot count the number of times I had to revert to these backups).

Screen navigation is yet another hassle. It's often needed to zoom the plan in and out or move it around the screen. There is a dedicated tab for this, but using the specialized tab means that you need to switch between this tab and the working tab constantly. It would be much easier to allow zooming and repositioning the plan right in the Space and Design plans.

I also noticed that sometimes, when I keep the program open for some time, it stops working. I click the tabs (work areas) at the bottom, but the screen still displays the same view. I could only fix it by restarting the program.

The program crashes quite often resulting in lost work.

The TopTen review praises Total 3D's collection of plants, but I found them unrealistic looking and limiting (many plants looked the same to me).

I still found Total 3D Home, Landscape & Deck somewhat helpful in planning the hardscape/landscape elements (walkways, lawns, etc), but using it was too much hassle that produced very modest results. If I did not get it for less than $3 (after rebate), I probably would have returned the software, which is too bad, because the software has potential.

Here are some recommendations which would make Total 3D Home, Landscape & Deck Premium Suite a much better software package:
  • Fix the obvious bugs: object placement, disappearing elements (doors).
  • Make the photo import feature work as promised.
  • Redesign the favorites feature.
  • Redesign the color/texture selection tool.
  • Make it crash less often (and make the auto-save feature work).
  • Integrate zooming and panning functionality into existing tabs.
  • Add common design features: granite counter tops, more realistic tile roofs, stucco exteriors.
  • Add common structures: small garden tool sheds, A/C units, patio covers, realistic gazebos.
  • Create a moderated user forum for customers using the software.
Until then, I would not recommend Total 3D Home, Landscape & Deck Premium Suite to the general public.

Friday, July 2, 2010

ASUS RT-N13U wireless-N router quirks

Summary: Tips for new ASUS RT-N13U users.
After a long search for a decent 802.11n router (and not finding one that would satisfy my real and perceived needs), I decided to wait until the makers produce something that is feature-full and reliable. In the meantime, I needed something basic:
  • no dropped connections
  • decent signal
  • USB port
  • built-in print server
ASUS RT-N13U seemed to meet these requirements. Since Tim Higgins (the SmallNetBuilder guy) gave it pretty good marks, I thought I would give it a try.

I got a new ASUS RT-N13U from Amazon for about $35 (after $20 mail-in rebate). [And I would've had it for less - $25 after rebate - had I waited a bit longer.]

After using the router for a couple of months, I can say that I'm rather happy with it: the signal is stable (no dropped connections) and reasonably strong. However, the setup process took me much longer than it should've had. Here are several issues that I encountered.
  • Can't connect
    ASUS RT-N13U can act as a router, access point, or repeater. Which is a good thing. The bad thing is that it comes from the factory with the repeater mode turned on. It took me about an hour of frustration until I realized why my system could not see the router during initial setup. Once I switch it to the router mode, the setup process went fine.
  • Still slow
    Although, I set the router to work in mixed 802.11g/n mode, I noticed that the speed did not exceed 54 Mbps on my laptop and nettop, both of which have wireless-N cards. I played with various settings in the admin panel: all to no avail. Finally, I found an FAQ that explained the reason: the authentication method of my router had to be set to WPA2-AES (it wasn't); at other authentication settings, the speed will not get over 54 Mbps. It would be helpful if the router's admin panel somehow conveyed this limitation when detecting a wrong authentication method (it does not). Anyway, I changed authentication to WPA2-AES, and...
  • Can't connect (again)
    Once I changed authentication to WPA2-AES, my systems could not connect. I submitted the issue to tech support but the person handling my ticket was even more clueless than me (he suggested that my laptop's network card might have not supported 802.11n, even though I had mentioned that I could connect to 802.11n network at work just fine). After spending a few hours contemplating this problem, I finally figured out that I used the wrong variation of WPA2-AES: instead of Enterprise (which is how I connect to WiFi at work), I should've used WPA2-AES Personal. After changing authentication mode to Personal (and setting up the password), I was able to connect.
  • Software
    ASUS RT-N13U comes with a CD containing software and documentation. Although I successfully used the setup wizard (software) for initial configuration, the software stopped working (it cannot detect the router). This is not a big deal for now because I can access the admin panel via a browser.
Additional tips for new ASUS RT-N13U users:
  • Make sure you download and install the most recent firmware updates (see the Downloads page).
  • IP address of the admin panel:
  • Default admin credentials: admin/admin (it's recommended to change them).
So far, I've been using the router only for wireless networking (not for printing or file sharing, yet). I'm planning to update this post once I get to test its wireless print server and drive sharing capabilities. Stay tuned.

UPDATE (4/28/2010): Since the original post, newer routers have been released to marked. Among them, ASUS RT-N56U (featuring dual-band processor, hardware NAT, 5 internal antennas, fast gigabit ethernet and 128MB DDR2) seems to be getting pretty good reviews from professionals and users. Although, it's a bit more expensive, ASUS RT-N56U is much more capable, and it's still cheaper than comparable Cisco or Netgear routers (and seems to be less buggy).

Best wireless routers on the market

See also:
ASUS RT-N13U Wireless Router with All-in-one Print Server (product info by ASUS)
ASUS RT-N13U (review by Jeff)
Amazon product reviews (some good info there)

Monday, June 21, 2010

Technobrief #11

Summary: Recent findings of software, articles, and more.
  • Cloth Simulation
    Andrew Hoyer simulates effects of gravity on a hanging cloth in JavaScript (beautiful!).
  • Spider 3D
    Interactive tarantula by Tomas Eriksson (freaky!).
  • l10n.js: JS localization library
    Dion Almaer describes Eli Grey's JavaScript library that enables localization through the native JavaScript method intended for it (and gracefully degrading if the library is not present).
  • JavaScript sprintf
    JavaScript implementation of C-like sprintf function.
  • Boagworld
    A weekly podcast by Paul Boag and Marcus Lillington on building and running websites.
  • Fixing Internationalization in ASP.NET
    Jason Kester introduces a simmple way to add internationalization (i18n) support to your ASP.NET-based web site.
  • Solution Setup, Part Deux
    Hüseyin Tüfekçilerli covers such topics as versioning attributes, resource attributes, project naming convention, web project code and UI separation, and build output (see also part one).
Software (free)
  • Daniusoft Video Converter Free
    Somewhat limited version of the video converter that also allows you to crop and trim videos, merge two or more video clips, adjust video effects, etc.
  • Format Factory
    Multifunctional media converter that supports conversion of all media formats to compatible
    MP4/3GP/MPG/AVI/WMV/FLV/SWF (video), MP3/WMA/AMR/OGG/AAC/WAV (audio), and JPG/BMP/PNG/TIF/ICO/GIF/TGA (image). It can also rip video DVDs and music CDs to video and audio files. MP4 file support covers iPod/iPhone/PSP/BlackBerry format. (Note: This is my favorite free media conversion tool so far.)
  • HxD Hex Editor
    Very fast hex editor which can handle files of any size.
  • Komodo Edit
    Text/code editor that supports PHP, Python, Ruby, Perl Tcl, JavaScript, CSS, HTML and template languages like RHTML, Template-Toolkit, HTML-Smarty and Django (somewhat slow to start, but otherwise quite capable).
  • PicPick
    Screen capture tool that also comes with image editor, color picker, color palette, pixel ruler, protractor, crosshair and whiteboard.
  • SmillaEnlarger
    Small graphical tool for resizing, and especially magnifying bitmaps in high quality.
Tips and tricks
Web development
Web tools
  • Rebate Reminder
    Lets you keep track of your mail-in rebates.
  • Milo
    Lets you search for product availability at local stores.
  • NolaPro Free Accounting
    Free web-based accounting site (the tool is also available as a free Windows application).
  • Phonebooth Free
    Web-based inbound phone system that offers a local business phone number and sophisticated call routing, auto attendant, extensions, voicemail, and more. Free service allows 200 minutes of inbound calling per month (6 cents per minute thereafter).
  • Paper Rater
    Checks grammar, proof-reads, detects plagiarism, and does more.
  • SpeedTest
    Tests the speed of your Internet connection.
  • Terms of Service Generator
    Construct a sample Terms of Service based on your answers to the questionnaire.

Friday, June 18, 2010

How to encrypt a USB flash drive

Summary: Recommendations for protecting sensitive data on a USB drive.
I recently lost my primary USB flash drive (the key chain broke), so I had to go over the exercise of setting up a new one using my favorite drive encryption software: TrueCrypt. I don't do this very often, and every time it takes me some time to recall the correct procedure and reconstruct my basic USB flash drive setup, so I thought I'd outline these step here. Hope it will help someone else.
  1. Download and run TrueCrypt on your computer
    TrueCrypt can run in (semi-)portable mode, so you have an option of either installing it on your computer or simply downloading and executing the program.

  2. Create encrypted container on the USB drive
    This container is just a file with space allocated for the encrypted volume. TrueCrypt will use this file as a virtual drive (volume) that you can map as a regular drive letter. Follow these steps:
    • In the main TrueCrypt application window, click the Create Volume button:
    • In the TrueCrypt Volume Creation Wizard, select the Create an encrypted file container option, and click Next:
    • In the Volume Type dialog box, select the Standard TrueCrypt volume option:
    • In the Volume Location dialog box, use the Select File button and navigate to the drive mapped to your USB drive; then enter the name of the file you want to create (you can give any name and extension to this file):
    • In the Encryption Options dialog box, select AES for encryption algorithm and SHA-512 for hash algorithm (if you wish, you can use another combination of options):
    • In the Volume Size dialog box, specify the size of file that you will allocate for the encrypted volume. Make sure that you leave some space for regular (unencrypted) storage. You will need this space to store the TrueCrypt binaries and possibly other files (more on these later). If you are not sure how much space you need to allocate, just use ~75% for encrypted storage, i.e. for a 4 GB USB drive, use 3 GB for encrypted storage (75% of 4 GB = 3 GB):
    • In the Volume Password dialog box, enter the password that you will use to access the encrypted volume (make sure you can remember this password):
    • In the Volume Format dialog box, select the file system type (I prefer NTFS, but you can use another), and click Format:
    • Confirm the operation and wait until TrueCrypt creates and formats the encrypted container (file). When done, click the Exit button to close TrueCrypt Volume Creation Wizard.

  3. Install TrueCrypt software on the USB drive
    If you expect to use your encrypted drive on a system where TrueCrypt is not installed, you need to keep the necessary TrueCrypt files along with your encrypted container. Do the following:
    • Switch back to the main TrueCrypt application window and select the Tools-Traveler Disk Setup... menu option.
    • In the Traveler Disk Setup dialog box, specify the root location of the USB drive and uncheck the Include TrueCrypt Volume Creation Wizard option (since you have already created one). Select the Auto-mount TrueCrypt volume option and specify the encrypted container file you created in the previous step. You can adjust these and other options to your liking:

    • Click the Create button and once the operation completes, close the Traveler Disk Setup dialog box.
    • You can close the main TrueCrypt program window.
At this point your USB drive will have an encrypted container that you can mount as a drive, as well as all necessary TrueCrypt components (for use on systems where TrueCrypt is not installed).

Here are additional changes that improve my experience with TrueCrypt and your USB drive:
  • Autorun.inf file
    The default autorun.inf file created by TrueCrypt is fine, but I normally make a couple of changes. E.g. I like all TrueCrypt's Windows shell context menu items to be grouped together, so I rename them. Here is the contents of my autorun.inf file (if you decide to use it, make sure that you reference the correct location of the TrueCrypt.exe file, as well as the container file):

    action=TrueCrypt: Auto-mount volume
    open=TrueCrypt\TrueCrypt.exe /q background /e /m rm /v ""
    shell\start=TrueCrypt: Run from USB
    shell\dismount=TrueCrypt: Dismount all volumes
    shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d
    shell\mount=TrueCrypt: Mount volume
    shell\mount\command=TrueCrypt\TrueCrypt.exe /q background /e /m rm /v ""
  • Helper batch scripts
    The autorun.inf file works great on older versions of Windows, but unfortunately Windows 7 (and I expect later versions) only recognizes the label and icon settings. So, if you plug the USB drive into a USB port on a system running Windows 7, it will neither auto-mount the drive, nor will it show the TrueCrypt's shell context menu options. To make it easier to mount and unmount the volumes, I use the following batch scripts (I put them in the root folder of the USB drive):

    @echo off
    start %~dp0\TrueCrypt\TrueCrypt.exe /q background /e /m rm /v ""
    Notes: The start command hides the command-line window (without it, you will need to close the window manually). When using this script, make sure that it references the correct location of the TrueCrypt.exe file and your volume container.

    @echo off
    %~dp0\TrueCrypt\TrueCrypt.exe /q /d
  • Auto-runner
    As an alternative to the batch scripts I mentioned above, you may want to try the AutoRunner.exe program attached to the Windows 7 - Autorun on USB drives post on SevenForums. When you launch this program, it will auto-mount the TrueCrypt volume and create the shell context menus defined in the autorun.inf file on Windows 7. The main problem with this program is that once launched, it will continue running until you kill it in the TaskManager (there seems to be no other interactive way to close the program). And you will need to kill it when you need to remove the USB drive. If you want to use this program, copy the executable to the root folder of the USB drive.

  • Safely remove drive helper
    The built-in Windows' Safely Remove Hardware feature has been and still is (even in Windows 7) one of the most user-unfriendly interfaces. As an alternative, you can try Uwe Sieber's Remove Drive program. When you run this program from a USB drive, it will keep trying to safely remove the drive until it succeeds or you cancel it. The program will give you a chance to close all open files and perform other cleanup that you may need to do before unplugging the drive. Note: Even though you launch the program from the USB drive, it will actually clone itself in a temporary folder and run from there (sweet! I wish AutoRunner.exe were as smart). Assuming that you extract the Remove Drive files in RemoveDrive folder under the root of your USB drive, you can use the following batch script to launch it with appropriate command-line parameters (place this batch file in the root folder of the USB drive):

    @echo off
    if defined ProgramFiles(x86) (
    %~dp0\RemoveDrive\x64\RemoveDrive.exe %~d0 -L -i -b
    ) else (
    %~dp0\RemoveDrive\Win32\RemoveDrive.exe %~d0 -L -i -b
As the very last thing, I add a readme.txt file to the root folder with my phone number in case I lose it next time. I don't actually count that a person who finds it will return the drive to me, but you never know: there are some good people out there.