<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Duncan Smart's Weblog</title>
	<atom:link href="http://blog.dotsmart.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dotsmart.net</link>
	<description>insert witty, geeky tagline here...</description>
	<lastBuildDate>Thu, 28 Jan 2010 22:21:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.dotsmart.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b1764b0fee8b6fef8b7e3a89aca10244?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Duncan Smart's Weblog</title>
		<link>http://blog.dotsmart.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.dotsmart.net/osd.xml" title="Duncan Smart&#8217;s Weblog" />
		<item>
		<title>Macro to Restart Visual Studio Elevated</title>
		<link>http://blog.dotsmart.net/2009/08/21/macro-to-restart-visual-studio-elevated/</link>
		<comments>http://blog.dotsmart.net/2009/08/21/macro-to-restart-visual-studio-elevated/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 08:56:03 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/?p=197</guid>
		<description><![CDATA[Kevin Dente ponders on Twitter:

This is something I’ve been meaning to do for a while, as often I’ll open a Web Application in Visual Studio configured to run under IIS and be met with the following:

Running anything elevated is easy, you just need to call ShellExecute (the .NET equivalent is System.Diagnostics.Process.Start) with the “RunAs” verb, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=197&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="http://weblogs.asp.net/kdente/">Kevin Dente</a> <a href="http://twitter.com/kevindente/statuses/3436797395">ponders</a> on Twitter:</p>
<p><a href="http://dotsmart.files.wordpress.com/2009/08/image.png"><img style="display:inline;border:0 initial initial;" title="@kevindente Wonder if it would be possible to create a Visual Studio add-in or macro that re-launches VS elevated, with the current project, then exits" src="http://dotsmart.files.wordpress.com/2009/08/image_thumb.png?w=416&#038;h=224" border="0" alt="Wonder if it would be possible to create a Visual Studio add-in or macro that re-launches VS elevated, with the current project, then exits" width="416" height="224" /></a></p>
<p>This is something I’ve been meaning to do for a while, as often I’ll open a Web Application in Visual Studio configured to run under IIS and be met with the following:</p>
<p><img style="display:inline;border-width:0;" title="The Web Application Project is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.." src="http://dotsmart.files.wordpress.com/2009/08/image1.png?w=408&#038;h=180" border="0" alt="The Web Application Project is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.." width="408" height="180" /></p>
<p>Running anything elevated is easy, you just need to call <a href="http://msdn.microsoft.com/en-us/library/bb762153.aspx">ShellExecute</a> (the .NET equivalent is <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx">System.Diagnostics.Process.Start</a>) with the “RunAs” verb, so it’s simply a matter of starting Visual Studio’s <kbd>devenv.exe</kbd> passing the path to the current solution.</p>
<p>So here goes: copy and paste this into a Macro Module (ALT+F11) then wire up to a toolbar button as appropriate:</p>
<pre class="brush: vb;">
Sub ElevateVisualStudio()

    Dim slnPath As String = DTE.Solution.FullName
    DTE.Solution.Close(True)

    Dim startInfo As New System.Diagnostics.ProcessStartInfo(DTE.FullName, slnPath)
    startInfo.Verb = &quot;RUNAS&quot;
    System.Diagnostics.Process.Start(startInfo)

    DTE.Quit()

End Sub
</pre>
<p>Works On My Machine™, etc and only tested on Visual Studio 2008.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=197&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/08/21/macro-to-restart-visual-studio-elevated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/08/image_thumb.png" medium="image">
			<media:title type="html">@kevindente Wonder if it would be possible to create a Visual Studio add-in or macro that re-launches VS elevated, with the current project, then exits</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/08/image1.png" medium="image">
			<media:title type="html">The Web Application Project is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account..</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Windows 7&#8217;s &#8220;XP Mode&#8221; to run IE 6, IE 7 and IE8 side-by-side</title>
		<link>http://blog.dotsmart.net/2009/06/24/using-windows-7s-xp-mode-to-run-ie-6-and-ie-7-side-by-side/</link>
		<comments>http://blog.dotsmart.net/2009/06/24/using-windows-7s-xp-mode-to-run-ie-6-and-ie-7-side-by-side/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 09:45:18 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2009/06/24/using-windows-7s-xp-mode-to-run-ie-6-and-ie-7-side-by-side/</guid>
		<description><![CDATA[Windows 7’s XP Mode is essentially a Windows XP virtual machine that runs in the new Windows 7 version of Virtual PC. This new edition of Virtual PC includes cool features such as seamless windows. The main reason I’m interested in this is to run older versions of Internet Explorer for testing purposes. IE8’s compatibility [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=175&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Windows 7’s XP Mode is essentially a Windows XP virtual machine that runs in the new Windows 7 version of Virtual PC. This new edition of Virtual PC includes cool features such as seamless windows. The main reason I’m interested in this is to run older versions of Internet Explorer for testing purposes. IE8’s compatibility mode does a pretty good job of emulating IE7 but <a href="http://blogs.msdn.com/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx">there are differences</a>, so I investigated how to get “real” IE7 running under Windows 7’s XP Mode, without losing IE6.</p>
<p>Out of the box, the Virtual PC image is Windows XP SP3 with IE6. The trick to getting IE6 to appear as a seamless window like this is to launch the Virtual Windows XP virtual machine and in the VM, create a shortcut in the “All Users” Start Menu or desktop:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image13.png?w=282&#038;h=300" border="0" alt="image" width="282" height="300" /></p>
<p>After a short delay, the shortcut will be duplicated into the Windows 7 host’s start menu:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image14.png?w=244&#038;h=234" border="0" alt="image" width="244" height="234" /></p>
<p>When you launch this shortcut in Windows 7, the main Virtual PC window will close and the application will be launched and projected onto your desktop.</p>
<h2>Creating a VM for IE7</h2>
<p>You can’t install IE7 side-by-side with IE6 on the same machine, so to run IE7 at the same time as IE6 we will need to create a new VM. Unfortunately, if you run the VirtualWindowsXP.msi setup again you’ll get a message saying “Setup has detected that Virtual Windows XP is already installed”:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image15.png?w=327&#038;h=252" border="0" alt="image" width="327" height="252" /></p>
<p>The workaround is to <em>create a new instance of the VM manually </em>using the supplied VHD as the base disk image. To do this do the following:</p>
<p>Open the <strong>Virtual Machines </strong>folder from the Start Menu and click <strong>Create virtual machine</strong>:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image16.png?w=445&#038;h=112" border="0" alt="image" width="445" height="112" /></p>
<p>Specify a name and location for the virtual machine:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image17.png?w=354&#038;h=274" border="0" alt="image" width="354" height="274" /></p>
<p>For memory I specified 256MB, which should me more than enough for just running IE7:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image18.png?w=354&#038;h=274" border="0" alt="image" width="354" height="274" /></p>
<p><strong>Here’s the important bit</strong>. Choose “Create a virtual hard disk using advanced options”</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image19.png?w=354&#038;h=274" border="0" alt="image" width="354" height="274" /></p>
<p>…and then choose a <strong>Differencing </strong>disk. This is the same way that the default Virtual Windows XP VM is set up:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image20.png?w=354&#038;h=274" border="0" alt="image" width="354" height="274" /></p>
<p>If you want, you can change the default name and location (I didn’t bother):</p>
<p>For the <strong>parent virtual hard disk </strong>choose the original Virtual Windows XP virtual disk, which on my machine was at <em>C:\Program Files\Virtual Windows XP\Virtual Windows XP.vhd</em>:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image21.png?w=354&#038;h=274" border="0" alt="image" width="354" height="274" /></p>
<p>Now start the new Virtual PC you just created from the Virtual Machines folder and complete Windows Setup as appropriate, choosing a computer name unique for your network and an Administrator password:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image22.png?w=363&#038;h=296" border="0" alt="image" width="363" height="296" /></p>
<p>When that’s done:</p>
<ul>
<li><strong>Enable Integration Features </strong>from the Tools menu of the Virtual PC window
<ul>
<li>For credentials enter <em>Administrator </em>and the password you entered during setup.</li>
<li>I chose to <strong>Remember my credentials </strong>for convenience</li>
</ul>
</li>
<li>download and install IE7 in the VM,</li>
</ul>
<p>When IE7 has installed and rebooted, create a shortcut to IE7 in the “All Users” start menu which, after a short delay, will create a corresponding shortcut in the Windows 7 start menu of the host.</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image23.png?w=401&#038;h=219" border="0" alt="image" width="401" height="219" /></p>
<p>So here’s the end result, IE6, IE7 and IE8 all running on Windows 7:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/06/image24.png?w=581&#038;h=521" border="0" alt="image" width="581" height="521" /></p>
<p>Ahhh, 3 generations, all together – don’t they look adorable?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=175&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/06/24/using-windows-7s-xp-mode-to-run-ie-6-and-ie-7-side-by-side/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image19.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image20.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image21.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image22.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image23.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/06/image24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing WebSVN &#8220;Unable to call svn command&#8221; error</title>
		<link>http://blog.dotsmart.net/2009/06/17/fixing-websvn-unable-to-call-svn-command-error/</link>
		<comments>http://blog.dotsmart.net/2009/06/17/fixing-websvn-unable-to-call-svn-command-error/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 13:15:47 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2009/06/17/fixing-websvn-unable-to-call-svn-command-error/</guid>
		<description><![CDATA[WebSVN is a great PHP web-based interface to Subversion that we run on our IIS build server. But, after updating to a more recent build we started getting errors like the following when viewing diffs:
Unable to call svn command &#34;svn --non-interactive --config-dir /tmp&#34;
The source of the error is in the getFileContents function in svnlook.php, where [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=147&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="http://www.websvn.info/">WebSVN</a> is a great PHP web-based interface to Subversion that we run on our IIS build server. But, after updating to a more recent build we started getting errors like the following when viewing diffs:</p>
<pre>Unable to call svn command &quot;svn --non-interactive --config-dir /tmp&quot;</pre>
<p>The source of the error is in the <code>getFileContents</code> function in svnlook.php, where it’s piping the output of <em>svn cat</em> to <a href="http://www.gnu.org/software/enscript">GNU Enscript</a> (for syntax highlighting) and then parsing the output of that using <em>sed</em>. I guessed that maybe the regex that sed is using isn’t being escaped properly for the Windows command line and therefore failing. </p>
<p>But I noticed that all of this code was in an <code>if($config-&gt;useEnscript)</code> block. Just before that is an <code>if($config-&gt;useGeshi)</code> block that looks a lot simpler. Simpler because <a href="http://sourceforge.net/projects/geshi">GeSHi</a> is PHP-based syntax highlighter, rather than an external command whose output requires special parsing. So I went to our <em>include/config.php</em> and added the <code>$config-&gt;useGeshi();</code> call (as detailed in the <em>distconfig.php </em>template config file), and it all started working happily again!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=147&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/06/17/fixing-websvn-unable-to-call-svn-command-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>
	</item>
		<item>
		<title>Unzipping/extracting MSI files</title>
		<link>http://blog.dotsmart.net/2009/05/13/unzipping-extracting-msi-files/</link>
		<comments>http://blog.dotsmart.net/2009/05/13/unzipping-extracting-msi-files/#comments</comments>
		<pubDate>Wed, 13 May 2009 14:55:13 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2009/05/13/unzippingextracting-msi-files/</guid>
		<description><![CDATA[If, like me, you are constantly wanting to just extract the files from a Windows Installer MSI file quickly, then this is for you.
My ZIP utility of choice 7-Zip appears to support extracting MSI files but in fact extracts all the various weird and wonderful binary streams in the MSI rather than simply just the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=141&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>If, like me, you are constantly wanting to just extract the files from a Windows Installer MSI file quickly, then this is for you.</p>
<p>My ZIP utility of choice <a href="http://www.7-zip.org/">7-Zip</a> <em>appears </em>to support extracting MSI files but in fact extracts all the various weird and wonderful binary streams in the MSI rather than simply just the actual files. Thankfully I stumbled across a Windows Installer switch today after typing <code>msiexec /?</code> that does the job perfectly: the <code>/a</code> “administrative install” switch, e.g.:</p>
<pre>msiexec /a foo.msi /qb TARGETDIR="C:\TEMP\Foo"</pre>
<p>So, what I’ve done is packaged this up as a little registry tweak that conveniently lets you do this by simply right clicking a file like so:</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://dotsmart.files.wordpress.com/2009/05/image.png?w=450&#038;h=112" border="0" alt="image" width="450" height="112" /></p>
<p>Copy and paste the following into a *.reg file and double-click it:</p>
<pre>Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Msi.Package\shell\Extract MSI\command]
@="msiexec.exe /a \"%1\" /qb TARGETDIR=\"%1 Extracted\""</pre>
<p>Hope that helps!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=141&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/05/13/unzipping-extracting-msi-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2009/05/image.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing &#8220;Provider: Unspecified error&#8221; when querying LDAP with the ADsDSOObject OLEDB Provider</title>
		<link>http://blog.dotsmart.net/2009/04/17/fixing-provider-unspecified-error-when-querying-ldap-with-adsdsoobject/</link>
		<comments>http://blog.dotsmart.net/2009/04/17/fixing-provider-unspecified-error-when-querying-ldap-with-adsdsoobject/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 09:43:00 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[ADSI]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/?p=130</guid>
		<description><![CDATA[As part of our logon script we have a Windows Script Host script that was failing with “Provider: Unspecified error” (mmn, helpful) but only on some Windows XP machines.
The offending line of code looked like this:
rs = con.Execute("&#60;LDAP://DC=example,DC=com&#62;; (sAMAccountName="+ username +"); ADsPath; subTree")
After some trial and error the fix was this (see if you can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=130&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>As part of our logon script we have a Windows Script Host script that was failing with “Provider: Unspecified error” (mmn, <em>helpful</em>) but only on some Windows XP machines.</p>
<p>The offending line of code looked like this:</p>
<pre>rs = con.Execute("&lt;LDAP://DC=example,DC=com&gt;; (sAMAccountName="+ username +"); ADsPath; subTree")</pre>
<p>After some trial and error the fix was this (see if you can spot the difference):</p>
<pre>rs = con.Execute("&lt;LDAP://DC=example,DC=com&gt;;(sAMAccountName="+ username +");ADsPath;subTree")</pre>
<p>Can you see what it is? <strong>No spaces after the semicolons</strong>!</p>
<p>Alternatively the SQL-like syntax also seems to be a bit more forgiving:</p>
<pre>rs = con.Execute("SELECT ADsPath FROM 'LDAP://DC=example,DC=com' WHERE sAMAccountName='"+ username +"'")</pre>
<p>It appears that with some later version of ADSI ADsDSOObject (or to give it its full title, the “OLE DB Provider for Microsoft Directory Services”) the query syntax strictness has been relaxed. In any case &#8220;Unspecifed error&#8221; appears to mean &#8220;Syntax error&#8221; in this case.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=130&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/04/17/fixing-provider-unspecified-error-when-querying-ldap-with-adsdsoobject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting a machine’s NetBIOS domain name in C#</title>
		<link>http://blog.dotsmart.net/2009/03/11/getting-a-machine%e2%80%99s-netbios-domain-name-in-csharp/</link>
		<comments>http://blog.dotsmart.net/2009/03/11/getting-a-machine%e2%80%99s-netbios-domain-name-in-csharp/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 14:46:06 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/?p=121</guid>
		<description><![CDATA[I tried to find some mechanism to get the current machine&#8217;s NetBIOS domain name (the machine domain, not user domain), but couldn’t find anything in the usual places (e.g. System.Environment). If you want the fancy-schmancy Active Directory DNS domain then you can use Domain.GetComputerDomain().Name from System.DirectoryServices.ActiveDirectory, or another one that I stumbled across in Reflector was IPGlobalProperties.GetIPGlobalProperties().DomainName [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=121&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>I tried to find some mechanism to get the current machine&#8217;s NetBIOS domain name (the <strong>machine domain</strong>, not user domain), but couldn’t find anything in the usual places (e.g. <strong>System.Environment</strong>). If you want the fancy-schmancy Active Directory DNS domain then you can use <strong>Domain.GetComputerDomain().Name</strong> from<strong> System.DirectoryServices.ActiveDirectory</strong>, or another one that I stumbled across in Reflector was <strong>IPGlobalProperties.GetIPGlobalProperties().DomainName</strong> that lives in <strong>System.Net.NetworkInformation</strong>. But a simple way of getting the old-skool NetBIOS/LanManager-style machine domain name proved elusive.</p>
<p>Some googling suggested that WMI would provide the answer but I find WMI a little heavyweight, and not always reliable. The information is also probably in the registry somewhere, although I couldn’t find it after a cursory scan. The proper, supported way it would appear is to use the <a href="http://msdn.microsoft.com/en-us/library/aa370672.aspx">Network Management API</a>. So my solution entailed P/Invoking to <em>netapi32.dll</em>.</p>
<p>If you’re after the same information I hope you find the code below useful. Once you&#8217;ve incorporated this in your project, just call the <strong>GetMachineNetBiosDomain</strong> method<strong>.</strong> It will return the machine&#8217;s Workgroup name if the machine is not domain-joined.</p>
<p style="border:dotted 1px #888;padding:5px;">
UPDATE: Now works on 64-bit thanks to update sent by Rp Brongers.
</p>
<pre class="brush: csharp;">
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;

class NetUtil
{
    [DllImport(&quot;netapi32.dll&quot;, CharSet = CharSet.Auto)]
    static extern int NetWkstaGetInfo(string server,
        int level,
        out IntPtr info);

    [DllImport(&quot;netapi32.dll&quot;)]
    static extern int NetApiBufferFree(IntPtr pBuf);

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    class WKSTA_INFO_100
    {
        public int wki100_platform_id;
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wki100_computername;
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wki100_langroup;
        public int wki100_ver_major;
        public int wki100_ver_minor;
    }

    public static string GetMachineNetBiosDomain()
    {
        IntPtr pBuffer = IntPtr.Zero;

        WKSTA_INFO_100 info;
        int retval = NetWkstaGetInfo(null, 100, out pBuffer);
        if (retval != 0)
            throw new Win32Exception(retval);

        info = (WKSTA_INFO_100)Marshal.PtrToStructure(pBuffer, typeof(WKSTA_INFO_100));
        string domainName = info.wki100_langroup;
        NetApiBufferFree(pBuffer);
        return domainName;
    }
}
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=121&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/03/11/getting-a-machine%e2%80%99s-netbios-domain-name-in-csharp/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>
	</item>
		<item>
		<title>Disabling direct PDF viewing/opening from the web</title>
		<link>http://blog.dotsmart.net/2009/02/23/disabling-direct-pdf-viewingopening-from-the-web/</link>
		<comments>http://blog.dotsmart.net/2009/02/23/disabling-direct-pdf-viewingopening-from-the-web/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 14:19:02 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2009/02/23/disabling-direct-pdf-viewingopening-from-the-web/</guid>
		<description><![CDATA[This worries me (more information). It would appear that you could craft PDFs that could hijack someone’s machine simply by their opening the PDF. This is especially pernicious because Adobe Reader is so intent on integrating PDF into Internet Explorer using various Browser Helper Objects and ActiveX Controls that a “drive-by” hijack would be simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=118&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="http://www.adobe.com/support/security/advisories/apsa09-01.html">This</a> worries me (<a href="http://www.avertlabs.com/research/blog/index.php/2009/02/19/new-backdoor-attacks-using-pdf-documents/">more information</a>). It would appear that you could craft PDFs that could hijack someone’s machine simply by their opening the PDF. This is especially pernicious because Adobe Reader is so intent on integrating PDF into Internet Explorer using various Browser Helper Objects and ActiveX Controls that a “drive-by” hijack would be simple to set up once you’ve crafted the malicious PDF file.</p>
<p>A quick fix (that Works On My Machine™) that prevents the automatic opening/viewing of PDF files from the web is to change the <code>HKEY_CLASSES_ROOT\.pdf\Content Type</code> registry key from <code>application/pdf</code> to something like <code>application/octet-stream</code>. This means that you have to save the files first before opening them.</p>
<p>Some possible scriptable ways of automating this:</p>
<h4>Method 1: A .REG file</h4>
<p>Save the following into a file with a “.reg” file extension and running using <code>regedit.exe /s filename.reg</code>.</p>
<pre>REGEDIT4
[HKEY_CLASSES_ROOT\.pdf]
&quot;Content Type&quot;=&quot;application/octet-stream&quot;</pre>
<h4>Method 2: The REG command</h4>
<p>Alternatively the following, using the reg.exe command will achieve the same result:</p>
<pre>reg add HKCR\.pdf /v &quot;Content Type&quot; /d &quot;application/octet-stream&quot; /f</pre>
<p>You obviously still need to be careful about PDFs, you just have the ability now to actively decide whether you want to open them.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=118&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2009/02/23/disabling-direct-pdf-viewingopening-from-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>
	</item>
		<item>
		<title>Cisco home page FAIL</title>
		<link>http://blog.dotsmart.net/2008/09/25/cisco-home-page-fail/</link>
		<comments>http://blog.dotsmart.net/2008/09/25/cisco-home-page-fail/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 09:23:30 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/09/25/cisco-home-page-fail/</guid>
		<description><![CDATA[UPDATE: it&#8217;s over 2 hours later now and they’ve finally fixed it :)
Cisco’s home page this morning: looks like they ran out of their allocation of lowercase letter ‘t’ (thanks to Chris Venus for pointing it out):
 
Or was it “Speak Like an Irishman” day and nobody told me?
Lowercase ‘t’s were being stripped from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=104&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p style="border-right:red 1px solid;border-top:red 1px solid;border-left:red 1px solid;border-bottom:red 1px solid;padding:.5em;"><b>UPDATE:</b> it&#8217;s over 2 hours later now and they’ve finally fixed it :)</p>
<p><a href="http://www.cisco.com/">Cisco’s home page</a> this morning: looks like they ran out of their allocation of lowercase letter ‘t’ (thanks to <a href="http://www.planetvenus.org.uk/">Chris Venus</a> for pointing it out):</p>
<p><img title="image" style="display:inline;border-width:0;" height="513" alt="image" src="http://dotsmart.files.wordpress.com/2008/09/image4.png?w=345&#038;h=513" width="345" border="0" /> </p>
<p>Or was it “Speak Like an Irishman” day and nobody told me?</p>
<p>Lowercase ‘t’s were being stripped from the source which explains why there were no styles, etc:</p>
<p><img title="image" style="display:inline;border-width:0;" height="471" alt="image" src="http://dotsmart.files.wordpress.com/2008/09/image5.png?w=422&#038;h=471" width="422" border="0" /> </p>
<p>Chris reckons it’s a possibly a whitespace-trimming RegEx gone wrong, WDYT?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=104&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2008/09/25/cisco-home-page-fail/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2008/09/image4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2008/09/image5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting Google Chrome as the default browser for Adobe AIR apps</title>
		<link>http://blog.dotsmart.net/2008/09/03/setting-google-chrome-as-the-default-browser-for-adobe-air-apps/</link>
		<comments>http://blog.dotsmart.net/2008/09/03/setting-google-chrome-as-the-default-browser-for-adobe-air-apps/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 20:44:23 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/?p=74</guid>
		<description><![CDATA[
UPDATE: Logan Buesching commented to say that Chrome apparently creates &#8220;ChromeHTML&#8221; shell\open keys except they&#8217;re in HKCR (which is why you get a UAC prompt, it&#8217;s the machine part of the registry), so you can actually just set HKCU\Software\Classes\.htm to ChromeHTML and you&#8217;re done. Logan also goes into more detail as to what&#8217;s going on so check out his post.
It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=74&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><div style="border:solid 1px #aaa;margin-bottom:1em;padding:.5em;">
<p><strong>UPDATE:</strong> <a href="http://agoln.net/">Logan Buesching</a> commented to say that Chrome apparently creates &#8220;ChromeHTML&#8221; shell\open keys except they&#8217;re in HKCR (which is why you get a UAC prompt, it&#8217;s the <em>machine</em> part of the registry), so you can actually just set <code>HKCU\Software\Classes\.htm</code> to ChromeHTML and you&#8217;re done. Logan also goes into more detail as to what&#8217;s going on so <a href="http://agoln.net/archives/149">check out his post</a>.</p>
<p>It seems odd that they end up creating a global HKCR key which ulitimately points to an app that&#8217;s installed in a user&#8217;s private profile. I&#8217;m sure this will cause issues if you have multiple people using your machine. Anyway, I guess this is all a bit moot: this is beta software kids, and I&#8217;m sure Google will fix this in due course by release and you may have to undo some of these registry shenanigans for it to work as expected.</p></div>
<p>Google Chrome was a big hit in the office today. To the extent that many of my colleagues were setting it as their default browser already, even though it&#8217;s a beta product. Cwazy.</p>
<p>Unfortunately even if you do click the &#8220;Make Google Chrome my default browser&#8221; button on the Options page, not all applications that launch hyperlinks comply. One of those is the Twitter client <a href="http://www.twhirl.org/">Twhirl</a>, which is an Adobe AIR application (I&#8217;m <em>assuming</em> this is an issue with AIR itself rather than Twhirl doing something silly). I deduced what AIR was doing when trying to locate the default browser by using <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Sysinternals&#8217; Process Monitor</a> (ProcMon). It was using the current user&#8217;s &#8220;.htm&#8221; file association preference: which on my machine was pointing to <em>FirefoxHTML</em>. So I created a new registry key for <em>GoogleChromeHTML</em> that specified the location of chrome.exe as the file opener and pointed the &#8220;.htm&#8221; setting there, which did the trick.</p>
<p>To make this easier to replicate, and to save having to write tedious explanatory steps detailing exactly what to do &#8211; I&#8217;ve created a short JScript Windows Script file.</p>
<p>Save the following with a &#8220;*.js&#8221; file extension (e.g. <em>ChromeDefaultForAIR.js</em>) and run it:</p>
<pre class="brush: jscript;">
var wshell = new ActiveXObject('WScript.Shell');
var chromePath = wshell.ExpandEnvironmentStrings('%USERPROFILE%\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe');
wshell.RegWrite('HKCU\\Software\\Classes\\.htm\\',
   'GoogleChromeHTML');
wshell.RegWrite('HKCU\\Software\\Classes\\GoogleChromeHTML\\shell\\open\\command\\',
    '&quot;' + chromePath + '&quot; &quot;%1&quot;');
</pre>
<p>Normal caveats for editing your registry and downloading and running random scripts from some idiot&#8217;s blog apply. To revert, set <code>HKCU\Software\Classes\.htm</code> back to FirefoxHTML.</p>
<p>If it helps leave a note in the comments!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dotsmart.wordpress.com/74/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dotsmart.wordpress.com/74/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=74&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2008/09/03/setting-google-chrome-as-the-default-browser-for-adobe-air-apps/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>
	</item>
		<item>
		<title>Identifying the unidentified problem with Windows Firewall</title>
		<link>http://blog.dotsmart.net/2008/07/30/identifying-the-unidentified-problem-with-windows-firewall/</link>
		<comments>http://blog.dotsmart.net/2008/07/30/identifying-the-unidentified-problem-with-windows-firewall/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 08:43:00 +0000</pubDate>
		<dc:creator>Duncan Smart</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/07/30/identifying-the-unidentified-problem-with-windows-firewall/</guid>
		<description><![CDATA[Recently Windows Vista has been refusing to show the Windows Firewall Settings dialog box and instead showing the ever so informative message: “Windows Firewall: Due to an unidentified problem, Windows cannot display Windows Firewall settings”.

No clues. Nothing in the Event Log. Nothing. Brilliant.
Well I had a brain wave this morning about what might be causing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=65&subd=dotsmart&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Recently Windows Vista has been refusing to show the <strong>Windows Firewall Settings</strong> dialog box and instead showing the ever so informative message: “<em>Windows Firewall: Due to an unidentified problem, Windows cannot display Windows Firewall settings</em>”.</p>
<p><img style="border-width:0;" height="195" alt="image" src="http://dotsmart.files.wordpress.com/2008/07/image.png?w=499&#038;h=195" width="499" border="0" /></p>
<p>No clues. Nothing in the Event Log. Nothing. Brilliant.</p>
<p>Well I had a brain wave this morning about what might be causing it. Thankfully it turned out to be right. I remembered that on our Windows Domain we have a few Group Policy settings that apply to Windows Firewall. </p>
<p><img style="border-width:0;" height="282" alt="image" src="http://dotsmart.files.wordpress.com/2008/07/image1.png?w=404&#038;h=282" width="404" border="0" /> </p>
<p>In this case the culprit was the “Define program exceptions” that had a few old entries for AVG 7.5 Network Edition. As we’d upgraded to AVG 8.0 recently the program paths were no longer valid, nor really necessary. So I removed them entirely and set the policy back to <em>Not configured</em>. To verify it worked I ran <code><strong>gpupdate /target:computer /force</strong></code> at a command prompt on my workstation and <em>voila: </em>the Windows Firewall Settings dialog box would now appear once more.</p>
<p>&#160;<img style="border-width:0;" height="368" alt="image" src="http://dotsmart.files.wordpress.com/2008/07/image2.png?w=312&#038;h=368" width="312" border="0" /> </p>
<p>Group Policy for Windows Firewall is stored on client machines in the the Registry at:</p>
<pre>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall</pre>
<p>So if you’re not on a domain and there are registry entries in this location that have been set for some reason, then adjusting them will have the same effect as changing the Group Policy. If you <em>are </em>on a domain then getting the Group Policy fixed is obviously the right approach.</p>
<p>Hope that helps you – leave a comment if it does.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dotsmart.wordpress.com/65/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dotsmart.wordpress.com/65/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotsmart.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotsmart.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotsmart.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotsmart.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotsmart.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotsmart.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotsmart.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotsmart.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotsmart.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotsmart.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.dotsmart.net&blog=2355202&post=65&subd=dotsmart&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.dotsmart.net/2008/07/30/identifying-the-unidentified-problem-with-windows-firewall/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13ead10356c893aead42be91b5cdcc01?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Duncan Smart</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2008/07/image.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2008/07/image1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dotsmart.files.wordpress.com/2008/07/image2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>