Tuesday, September 11, 2007

From real Steve to fake Bill

Summary: A few bits of entertainment and knowledge related to Apple and Microsoft, Steve Jobs and Bill Gates.

If you're following the buzz surrounding Steve Jobs and/or Apple (iPhone price cut, rebates, etc), you may enjoy the following articles:

The Puppet Master: Love Steve Jobs or hate him, just don't ignore him by Robert X. Cringely (interesting)
Dear early iPhone adopters: Yeah, we f****d you by "Fake Steve Jobs" (funny)
Larry's bold idea by "Fake Steve Jobs" (funny)

Not to be forgotten, here is your weekly dose of (well-deserved, yet good-natured) Microsoft mockery:

Channeling Microsoft Execs by John C. Dvorak (funny)

And a twist of iPod vs. Zune humor:

California by Joel Spolsky

Tuesday, September 4, 2007

Installing a Windows service on Vista

Summary (for developers): If your Windows service fails to install on Vista, these tips can help you correct the problem.

UPDATE: For information about implementing Windows services in Visual Studio 2008 (issues, solutions, and downloads), check my Implementing Windows Services in Visual Studio 2008 post.

A couple of years ago, I wrote an article* explaining how to simplify implementation, debugging, and installation of Windows services written in C#. The approach described in the article worked for me very well, but recently I ran into an issue related to Windows Vista. I'm not sure whether it's a problem with Windows Installer (AKA Microsoft Installer, or MSI) or Visual Studio, but for some reason, the installer cannot install Windows services from Visual Studio-built MSI files when User Account Control (UAC) is enabled. In this post, I'll explain how to correct this problem and build a Windows service installer, which works on Vista, as well as pre-Vista versions of Windows (XP, Windows Server 2003, etc).

[Disclaimer: To install a Windows service, I use a custom actions (CA) implemented in a ServiceInstaller-based class. Some MSI gurus do not recommend this approach; however, this seems to be the direction currently advocated by Microsoft. If you can suggest a better option, please submit it in a comment.]

UPDATE: A better alternative to using custom actions (CA) implemented in a ServiceInstaller-based class, would be to define the Windows Service-related entries directly in the MSI package. Although, I'm not sure how to do this using Visual Studio Installer, it is rather trivial to do in WiX. For more info on WiX read my three-part series.

Windows service installation is a privileged operation which is restricted to administrative accounts. To install a Windows service on Vista (with enabled UAC), you can use one of the following methods.

Option 1: Disable UAC (not recommended)
You will probably not want to do this; at least, not for the sole purpose of solving the installation problems.

Option 2: Execute msiexec.exe as Administrator (not recommended)
This option is rather inconvenient because there is no shortcut to launch msiexec.exe as Administrator. You must also enter all command-line parameters passed to msiexec.exe by hand.

Option 3: Launch the installer using a bootstrapper (not recommended)
According to Jonathan Wells, a product manager for Visual Studio,
"Windows Vista heuristically detects installation programs and requests administrator credentials or approval from the administrator user in order to run with access privileges. So applications called "setup.exe" and "install.exe" will prompt for administrator credentials (if running as standard user) or approval (if running as Administrator). If you do not desire this behaviour then include a manifest with your application."
This option is not recommended for a number of reasons. First, it requires a bootstrapper file to be deployed along with the MSI file. Second, the bootstrapper will need a manifest specifying the right requestedExecutionLevel (notice that you can embed manifest in the executable). Finally, depending on the policy configuration, installer detector responsible for determining whether a process is an installation program can be disabled (see the Installer Detection Technology section in
Understanding and Configuring User Account Control in Windows Vista).

Option 4: Fix the MSI file (recommended)
If I understand it correctly, the problem is caused by the wrong value defined by Visual Studio for the service installer's custom action type. If you open the MSI file in Orca and look at the contents of the CustomAction table, you will see (among other records) three entries corresponding to the Install, Uninstall, and Commit custom actions, which look similar to the following:

ActionTypeSourceTarget
_12345678_9ABC_DEF0_1234_56789ABCDEF1.uninstall1025InstallUtilManagedInstall
_FEDCBA98_7654_3210_FEDC_BA9876543210.install1025InstallUtilManagedInstall
_87654321_CBA9_0FED_4321_1FEDCBA98765.commit1537InstallUtilManagedInstall

The root of the issue is in the missing msidbCustomActionTypeNoImpersonate bit (2048) in the custom action types 1025 and 1537. You need to turn the msidbCustomActionTypeNoImpersonate bit on to let the custom actions run with a privileged token. You can manually change the type values using Orca, but a better option would be to integrate this modification in the build process.

There may be other techniques for changing MSI files programmatically, but I do it with the help of the WiRunSql.vbs script, which comes with the Windows Installer Software Development Kit (SDK). After installing the SDK, you can copy this script in the project folder and add a post-build step to update custom action types. To define a post-build step in the Visual Studio 2005 deployment (setup) project, do the following:
  1. Make sure that the Properties window is open (select the Properties Window option from the View menu if needed).
  2. Select the deployment project in Solution Explorer.
  3. In the Deployment Project Properties window, click the PostBuildEvent option, and click the ellipses button that appears on the right side of the post-build event value.
  4. In the Post-build Event Command Line dialog box, enter the following statements (make sure that each cscript statement remains on one line):

    echo Updating the MSI file...
    cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE CustomAction SET CustomAction.Type=3073 WHERE CustomAction.Type=1025 AND CustomAction.Source='InstallUtil' AND CustomAction.Target='ManagedInstall'"
    cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE CustomAction SET CustomAction.Type=3585 WHERE CustomAction.Type=1537 AND CustomAction.Source='InstallUtil' AND CustomAction.Target='ManagedInstall'"

    It would be better to use the bitwise OR operator to turn the msidbCustomActionTypeNoImpersonate bit on -- something like SET CustomAction.Type=CustomAction.Type|2048 -- but I could not make it work. Please be aware that if you use the hard-coded numbers shown in this example and Microsoft changes the generated values of the custom action types in future, you may need to update these queries.
  5. Click OK to close the dialog box.
Once you build the project, make sure that the post-build step succeeds. If you do not see any errors, the modified MSI file should work on Vista.

See also:
Custom Actions under UAC in Vista
How to design msi packages for Windows Vista?
Windows Vista User Account Control Step by Step Guide


*There was bug in the original code sample that came with the article. Once I discovered it (two years ago) I immediately submitted an update, but it does not seem like the publisher replaced the original sample. If you want to use it, make sure that the ParseTime24 method of the DateTimeHelper class (in the My.Utilities project) contains the following statement (notice negation):
if (!IsTime24(time))
    return false;
and not
if (IsTime24(time))
    return false;
Also, add the following line (in bold) to the WeeklyThread's Start method:
// If the execution time is in the past, increment the day.
if (nextExecutionTime < StartTime)     nextExecutionTime = nextExecutionTime.AddDays(1); // Set execution date depending on the day of the week.
NextExecutionTime = GetNextExecutionDay(nextExecutionTime, 0);


// Set default delay.
int delay = WakeUpInterval;
To get this and other updates to the code sample, download the modified project.

Monday, August 27, 2007

Repairing Windows Update

Summary: When your Windows Update stops working, try a few simple troubleshooting steps before calling Microsoft (which you can also do).

All of a sudden, Windows Update (AKA Microsoft Update) stopped working on my computer (Windows® XP SP 2). Every time I accessed the Microsoft Update Web site, I got the following error:
The site cannot continue because one or more of these Windows services is not running:
  • Automatic Updates (allows the site to find, download and install high-priority updates for your computer)
  • Background Intelligent Transfer Service (BITS) (helps updates download more quickly and without problems if the download process is interrupted)
  • Event Log (keeps a record of updating activities to help with troubleshooting, if needed)
The error message also included 11 steps to "make sure these services [were] running." I followed the instructions and restarted the services just in case. It did not help. Then I noticed the Microsoft Online Assisted Support (no-cost for Windows Update issues) link, which took me to the page showing an option to Contact a Support Professional by Email, Online, or Phone.

I signed in and submitted a support request. To my surprise, within 24 hours, I got a response with detailed troubleshooting instructions. After completing the first step, Windows Update started to work. Here are the instruction in case someone encounters the same problem.

Step 1: Register DLL files

By trying this step, we can check if the update engines are working properly.
  1. Close all instances of Internet Explorer.
  2. Select Run from the Start menu.
  3. In the Open box, type

    regsvr32 atl.dll

    and click OK (notice that there is a space between regsvr32 and atl.dll).
  4. Similarly, one by one, register the files listed below:

    regsvr32 msxml3.dll
    regsvr32 wuapi.dll
    regsvr32 wuaueng.dll
    regsvr32 wuaueng1.dll
    regsvr32 wups2.dll
    regsvr32 wucltui.dll
    regsvr32 wups.dll
    regsvr32 wuweb.dll
    regsvr32 qmgr.dll
    regsvr32 qmgrprxy.dll
    regsvr32 jscript.dll


    While registering each DLL file you should get the "succeeded" message. If you encounter any error message, you probably need to contact Microsoft.
If the issue persists, move on to step 2.

Step 2: Verify the relevant Windows Update services
  1. Select Run from the Start menu.
  2. In the Open box, type

    services.msc

    and click OK.
  3. Double-click the Automatic Updates service.
  4. Click on the Log On tab and make sure that the Local System account option is selected and the Allow service to interact with desktop option is unchecked.
  5. Check if this service has been enabled in the listed Hardware Profile; if not, click the Enable button to enable it.
  6. Click on the General tab; make sure that the Startup Type is set to Automatic. Click the Stop button under Service Status to stop the service.
  7. Click the Start button under Service Status to start the service.
  8. Please repeat the above steps with the following services:

    Background Intelligent Transfer Service
    Event Log


    The Event Log service is enabled on all of the hardware profiles. This service does not have an option to enable or disable on certain hardware profiles.
If the previous steps still do not help, proceed to step 3.

Step 3: Reload the Update temporary folders

One possible cause is that the temporary folder for Windows Update contains corrupted files. Let's erase all the files there to get the system clean.
  1. Select Run from the Start menu.
  2. In the Open box, type

    cmd

    and click OK.
  3. In the command-prompt window, enter the following command:

    net stop WuAuServ

  4. Select Run from the Start menu.
  5. In the Open box, type

    %windir%

    and click OK
  6. In the opened folder, rename the folder SoftwareDistribution to Sdold.
  7. Select Run from the Start menu.
  8. In the Open box, type

    cmd

    and click OK.
  9. In the command-prompt window, enter the following command:

    net start WuAuServ
If at this point Windows Update still does not work, you will probably need request support from Microsoft, but before you do, if you are technical enough, you may want to see if the WindowsUpdate.log file contains any suspicious errors. To open this log file in default text editor, enter its name in the Start-Run menu.

Additional references
Stealth Windows update prevents XP repair
Get the latest Windows updates securely

Thursday, August 23, 2007

Real men don't need PowerPoint

Summary: Steve Yegge explains the importance of branding at Open Source Convention 2007. And he ain't got no PowerPoint!

Imagine yourself invited to speak at a technical conference. You do your homework: pick a topic, build the slides, bring a laptop. You are ready to go, but once you get on stage, you realize that the projector does not work and tech support guys can't fix it. What do you do?

As Steve Yegge showed at OSCON 2007, you do not need PowerPoint to give an interesting speech. Sure, a couple of slides would be helpful, but they were not essential. If you want to hear Steve's perspective on the importance of branding (branding is not only relevant to major corporate brands, such as Coca-Cola, but equally applies to the work of your development team), or if you are interested in learning how other corporations handle justifiably bad brand perceptions (so that you know what to expect on the next screw-up), watch this 25-minute video (if the link does not work, try this one). As an introduction, you can also read Steve's How To Make a Funny Talk Title Without Using The Word "Weasel" post.

Additional references:
How I made my presentations a little better

Monday, August 20, 2007

Wait wait... fix this podcast!

Summary: See how you can fix unplayable or corrupted podcast files; learn how to split long podcasts into shorter segments.

Every Sunday, a local NPR station plays my favorite show Wait Wait... Don't Tell Me!. Because the 11:00 AM-12:00 PM broadcast time is rather inconvenient (for me), I subscribed to the show's podcasts. The podcasts play fine on computer, but my MP3 player cannot handle them: after playing several seconds of introduction, the player pauses briefly, then makes a loud screeching noise and moves to the next track. I tried these podcasts on other MP3 players with no luck (although the same players play podcasts of other shows just fine). After several weeks of troubleshooting, I finally determined the root cause of the problem: apparently, the MP3 player does not know how to handle a short (less than 2 seconds) silence gap that follows the introduction, so it jumps to the next track. Eventually, I figured out how to make podcasts playable on my MP3 player and more manageable. These are the steps I follow.

1. Subscribe to the podcast RSS feed (optional)
If you like a particular show, instead of looking for new podcasts yourself, you can get them via an RSS (or Atom) feed. If you computer is always turned on, you can use a desktop-based aggregator, such as Juice. The aggregator will check if any new podcasts are available for your subscriptions and download them automatically.


Alternatively, you can use an online aggregator, such as Bloglines, which will monitor your subscripions and display new podcasts when they become available. An online aggregator allows you to access podcast feeds from any computer, but you will need to download MP3 files yourself. When using Bloglines, click the Enclosure link to download the podcast (MP3) file.


To subscribe to a podcast show, you need to know the address of the podcast feed, which should be listed among the subscription links. For example, NPR provides a directory of available podcasts, where you can find links to such shows as NPR: Wait Wait... Don't Tell Me (http://www.npr.org/rss/podcast.php?id=35), NPR: Car Talk (http://www.npr.org/rss/podcast.php?id=510208), and others.

2. Remove silence gaps from the podcast
Once you download a podcast (MP3) file, you need to make sure that it does not contain excessive periods of silence. If you don't know any better, you can remove silence using the free Audacity tool. Notice that to use Audacity for MP3 editing (including silence removal), you have to install LAME (a popular MP3 encoder). [These instructions and screenshots apply to Audacity 1.3.2 (Beta); newer versions of the application may look differently and require different steps.]

After installing LAME, do the following (you need to do this only once):
  1. Start Audacity.
  2. Select the Edit - Preferences menu option.
  3. In the Audacity Preferences dialog box, select the File Formats option from the list box on the left side.
  4. In the MP3 Export Setup section, use the Find Library button to locate the lame_enc.dll file (this file must be in the same directory where you installed LAME, such as C:\Program Files\Lame).
  5. Make sure that the Bit Rate value in the MP3 Export Setup section is set to 64; a larger value (such as 128) will increase the size of the modified podcast files. Notice that while the 64 bit rate is good enough for podcasts, it is insufficient for music files; when using Audacity for music editing, increase the bit rate value to at least 128.

  6. Click OK, to close the Audacity Preferences dialog box.
Once you make sure that the Audacity's MP3 export settings are configured correctly, open the podcast, trim silence, and export results to an MP3 file following these steps:
  1. Open the podcast using the File - Open menu or by dragging and dropping the MP3 file onto the Audacity window (Audacity may take a minute or longer to open the file).
  2. After loading the podcast file, press CTRL+A keys to select the whole track.

  3. Select the Effect - Truncate Silence menu option.
  4. In the Truncate Silence dialog box, set the value of the Max Silent Duration (milliseconds) to 250 (you can use a slightly larger or smaller number) and click OK (truncating silence takes about one minute).

  5. If you find the volume of the podcast too low, you can increase it by selecting the Effect - Amplify menu option. Set the amplification level to the appropriate settings (use the Preview option if needed), check the Allow clipping box, and click OK (normally, you should avoid clipping in music files, but you will probably not notice its effects in podcasts). Amplification takes a couple of minutes.

  6. Once the track is ready, use the File - Export As - MP3 menu option to save the modified file. If you want, you can rename the file in the Save As dialog box or you can use the same name (I prefer to use the name of the show and the date of the broadcast in the file names, such as WaitWait_7_15_2007.mp3). Exporting to an MP3 file takes a few minutes.
At this point you will have an MP3 file which your MP3 player should be able to play. However, there is one additional step I recommend.

3. Split long podcast file into multiple MP3 files
If a podcast file is long (20 minutes or longer), you may find it more convenient to split it into shorter segments. After trying several applications which can split MP3 files, I would recommend mp3DirectCut written by Martin Pesch. [These instructions and screenshots apply to mp3DirectCut 5.02; newer versions of the application may look differently and require different steps.] To split an MP3 file using mp3DirectCut, do the following:
  1. Start mp3DirectCut.
  2. Open the podcast using the File - Open menu or by dragging and dropping the MP3 file onto the mp3DirectCut window.

  3. Select the Special - Auto Cue menu option.
  4. In the Auto Cue dialog box, define the length of the segments into which you want to split the podcast (10 minutes is a reasonable value) and click OK.

  5. Select the File - Save Split menu option.
  6. In the Split file dialog box, define the format of the names of the generated track files in the Filename creation field. I use the %F (%N) format to append sequence numbers to the original file name, but you can use a different naming convention. You may also want to change the destination folder where the files will be saved, e.g. directly to your MP3 player. Click OK to start splitting the file (splitting takes about one minute).

I realize that the process may seem a bit tedious, so if you have recommendations how to improve or simplify it, please submit them via comments.

Additional references:
MP3 encoding primer

UPDATE: Since switching to Zune, I have pretty much abandoned the process described in this post. Both the Zune device and software (after the latest update) have been excellent tools for subscribing, managing, and listening to podcasts. I'm not sure if other media players offer the same podcasting capabilities, but if not, I would highly recommend Zune for its excellent features. (Note: This is not a paid advertisement.)

Tuesday, July 17, 2007

Must-have tools for Windows application developers

Summary: A continuously updated list of free software applications recommended for Windows application developers.

If you find yourself in business of writing, deploying, or troubleshooting software for Windows, you may appreciate the following FREE tools and utilities:

AnVir Task Manager Free shows the detailed information about every running process, as well as applications running automatically on Windows startup (including all hidden applications). AnVir Task Manager is similar to System Explorer, but it offers several distinct features, such as alerts and ability to block auto-started programs, a view showing command-line parameters used by running processes, and more.
Altiris Software Virtualization Solution (SVS) allows you to install and run applications in a virtual sand box on your computer. If you often download and test new applications (especially alpha and beta versions), Altiris SVS can help prevent these applications from corrupting your Windows registry, files, system and user settings, and so on. For more information and review, read the Online Tech Tips review.
AutoHotKey can create hotkeys for keyboard, joystick, and mouse. It can expand abbreviations as you type them (for example, typing "btw" can automatically produce "by the way"). Use AutoHotKey to create custom data-entry forms, user interfaces, and menu bars, remap keys and buttons on your keyboard, joystick, and mouse. The program can convert any script into an executable file that can be run on computers that don't have AutoHotkey installed.
BareTail is a real-time log file monitoring tool, which can handle very large files (over 2 GB), highlight lines with errors, monitor changes in multiple files, and do more.
DiffMerge is an application to compare and merge files and folders. The program is compatible with 42 different character encodings.
Dropcloth allows you to cover inactive desktop windows with a solid background, so that you can focus on just one application without closing out or minimizing anything. This feature is especially helpful when you use multiple applications in a presentation.
Error Code Look-up is a command-line tool, which determines error values from decimal and hexadecimal error codes in Microsoft Windows® operating systems. The tool can look up one or more values at a time. All values on the command line will be looked up in Exchange’s internal tables and presented to you (errors do not need to be specific to Exchange). If available, informational data associated with the value(s) will also be shown.
Fiddler logs all HTTP traffic between your computer and the Internet allowing debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and more.
FileMon monitors and displays file system activity on a system in real-time. Its advanced capabilities make it a powerful tool for exploring the way Windows works, seeing how applications use the files and DLLs, or tracking down problems in system or application file configurations.
Imagicon can convert image files to icons (as well as other image formats). When converting images to icons, you can enable alpha transparency. Supported icon sizes include: 16x16, 32x32, 48x48, 64x64, and 128x128.
Intype is a powerful and intuitive code editor, which is easily extensible and customizable, thanks in part to its support for scripting and native plug-ins. At the time of writing, Intype was still in alpha version, but it looked quite promising. I wish it had a toolbar, though.
InUse (File-In-Use Replace Utility) is a command-line tool, which can replace files in use by the operating system.
NDoc is a code documentation generator, which builds help files from .NET assemblies and the XML documentation files generated by the C# and VB.NET compilers (VB.NET requires the VBCommenter add-in, which I could not find). Unfortunately, the last official release of NDoc was written for .NET Framework 1.1 (let's say thanks to Microsoft for Sandcastle [sarcasm intended], which promised a lot and delivered little), but a reasonably stable alpha build of NDoc 2.0 (targeting .NET Framework 2.0) is still available.
Pixelformer is an advanced icon editor which offers support for different color depths up to 32-bit RGB with alpha channel, lossless target color depth switchin, semi-transparent colors, free-form masking, multiple layer support, in-place supersampling, icon extraction capability, PNG size optimization, Vista icon optimization, and more.
Process Explorer shows which file handles and DLLs processes have opened or loaded.
Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. It combines the features of Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more.
Reflector for .NET is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector can decompile .NET assemblies back to C# or Visual Basic code. See also .NET Reflector Add-Ins.
RegMon is a utility that monitors changes in Windows Registry. It shows which applications are accessing Registry, which keys they are accessing, and the Registry data that they are reading and writing - all in real-time.
Screen2Exe creates highly compressed screen demos.
SideSlide is a desktop extension which can be used to group related items, such as shortcuts to files and folders, URLs, notes, and more.
SmartClose simplifies and automates the process of closing running applications, which is often required during software installations. It stores the running program information as a system snapshot and restarts/restores them later. The program allows you to exclude programs from being closed and automatically skips applications that are required for the Windows system to run.
SnippetCompiler offers a fast and easy way to compile code snippets written in C# or VB.NET, so that you do not have to create a new Visual Studio project every time you need to test a small code block.
SweptAway is a simple system tray utility that automatically minimizes applications that you aren't using.
SysAngel DVD Generator can be used to create Windows installation DVDs, which include new drivers, service packs, and hot fixes; this will make subsequent OS installations much faster.
SysExporter allows you to copy data displayed in standard list view, tree view, list box, combo box, text box, and WebBrowser/HTML controls from almost any application running on your system. Not many people would need this functionality, but when you need it, it's really handy.
System Explorer is a much better version of the lame built-in Windows Task Manager. It can show additional information about running processes, such as full path to the application executable network connections, and open files. Using System Explorer, you can easily check for suspicious files, search details about files and processes via online databases, and quickly access system utilities. If you like System Explorer, you can configure it so that it gets invoked instead of Task Manager (as I do). Note: To add a column to the Processes view (such as a User Name, which is not visible by default), you need to right-click a column header, and make sure the column is checked.
TopStyle Lite is a simple Cascading Style Sheet (CSS) editor. The tool includes a multi-browser style checker and validator, which alerts you about invalid entries and highlights styles that may be affected by bugs in different Web browsers. TopStyle Lite can create a basic style sheet from an existing HTML file, and all you need to do is simply apply styles to all the relevant tags in this document. Properties can be altered using the drop-down menus, or through manual entry. Any property that isn't supported by the current CSS definition will be highlighted in red, enabling easy location of errors later on. The interface enables you to preview the current style sheet from within the editor itself and locate elements within the style sheet easily and quickly.
Unlocker can help you find who (or what) locks a file and unlock it.
VirtuaWin creates virtual desktops, which can be used to better organize applications. For example, you can use a dedicated virtual desktop when sharing a presentation.
Who's Locking? finds which process is locking a DLL (you can also use this tool to terminate this process).
Windows Grep combines the power and flexibility of traditional command line grep utilities available on DOS, UNIX and other platforms with the ease of use of Microsoft Windows. In addition to searching, Windows Grep also performs global replacing in your files, with complete safety. Windows Grep is designed for searching plain-ASCII text files, such as program source, HTML, RTF and batch files, but it can also search binary files such as word processor documents, databases, spreadsheets and executables.
Windows Installer Cleanup Utility can help resolve installation problems for programs that use Microsoft Windows Installer (MSI). It provides a dialog box in which you can select one or more programs that were installed by Windows Installer and removes the files and registry settings that make up the Windows Installer configuration information for programs that you select. The tool does not remove the application files.
Windows SteadyState offers the ability to revert a computer to a previously stored state every time it reboots (or when an administrator sets it to). Useful for testing new applications from untrusted sources.
Windows SysInternals offer system utilities to manage, troubleshoot, and diagnose the Windows operating system and applications (you can run most of the GUI-based tools directly from the SysInternals Live site).
Windows System Control Center (WSCC) makes it easier to use system utilities offered by SysInternals and NirSoft.
WinMerge is a visual text file differencing and merging tool. I find it easier to use and more comprehensive than WinDiff that comes with Visual Studio SDK.
ZoomIt is a screen zoom and annotation tool for technical presentations.

For more (free) tools, see these sites:

Essential Developer Productivity Tools
Free .NET Refactoring Tools
Scott Hanselman's 2006 Ultimate Developer and Power Users Tool List for Windows
Windows 2000 Resource Kit Tools for administrative tasks

Wednesday, July 11, 2007

Searching beyond Google

Summary: While Google may offer the ultimate search engine and tools, you should not ignore other desktop and Internet search options.

In the world of Web search, there are more than 11 Ways to Search Without Google, although few of them offer compelling alternatives. The main problem with all these general-purpose Web search engines is that they are no better than Google, and a few are probably worse. Take Ms. Dewey for example (figuratively speaking).

I guess, Ms. Dewey can amuse a few male users for a few minutes (until it becomes clear that she ain't gonna get naked), but when it comes to finding information, most of us would rather google.*

Google is likely to remain a Web search leader for a while, but check out AllTheWeb Livesearch (brought to you by Yahoo!). Unlike the maker of the other Live Search (AKA Microsoft), Yahoo! offers a couple of noteworthy innovations:
"Livesearch [...] analyzes your search in real-time and instantly provides Web results with alternate search queries as you type. These suggested queries are based on what other people have searched for. [...] Livesearch makes searching the Web faster and easier by: predicting what you are searching for, suggesting alternate search queries as you type that help you focus your search, and providing relevant results in real-time. It is a big improvement on having to type one search after another to get the results you want."
LiveSearch is still in beta, so it has a few quirks. For example, search results for queries that use international characters (such as Cyrillic letters) sometimes display strings of Unicode values (e.g. u0438\u043e\u0433\u0440\u0430) instead of text. I assume these problems will be fixed.

.NET developers out there: try Dan Appleman's SearchDotNet.com. SearchDotNet is based on the Google's custom search engine. Dan claims that it returns more relevant results about .NET programming. (Since I mentioned Dan Appleman, read his Microsoft + Yahoo = Microhoo? article; it's funny.)

Now, what about desktop search? I was never a fan of desktop search utilities built by Microsoft or Google. From my limited experience, they do more harm than good: the original Goggle Desktop Search was a resource hog, while Widows desktop search caused my Windows XP Explorer to crash, so I had to disable its advanced features. If I need to find something on my desktop, I use either the basic Windows Explorer search or the Windows shell find command. Both options are quite limited, so I was really thrilled to find a free Windows Grep tool:
"[Windows Grep] combines the power and flexibility of traditional command line grep utilities available on DOS, UNIX and other platforms with the ease of use of Microsoft Windows. In addition to searching, Windows Grep also performs global replacing in your files, with complete safety. Windows Grep is designed for searching plain-ASCII text files, such as program source, HTML, RTF and batch files, but it can also search binary files such as word processor documents, databases, spreadsheets and executables."
While not exactly a search tool, Launchy (freeware) is joining the list of my favorite utilities. After installing and making sure Launchy is running, press ALT+SPACE (you can change this shortcut to something else) and enter a few letters of the name of the application or document you want to launch in the dialog box (e.g. enter "Pain" if you want to start Paint); then just pick the desired item from the list of matches found in the indexed directories (you may need to add your custom folders to the predefined search locations).
In addition to launching applications via a couple of keyboard strokes, you can use Launchy to perform basic calculations. Scott Hanselman suggests a few similar tools, but I haven't tried those, yet.

UPDATE (Nov-29-2007): It looks like Google is catching up with Yahoo!'s LiveSearch. To see the Google's implementation of keyword suggestion, enable the Keyword Suggestion option by clicking the Join this experiment button of the corresponding section on the Google Experimental Search Labs page.

Additional references:
Special Search Engines That Are Not Google or Yahoo
Ten Search Engines You've Never Heard of (And Can't Live Without)


*In case you did not know, on June 15, 2006, google became a verb.