<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Habib Heydarian's Blog @ Microsoft : Technology</title><link>http://blogs.msdn.com/habibh/archive/tags/Technology/default.aspx</link><description>Tags: Technology</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Getting Windows Mobile Device Center to work on Windows Server 2008 R2</title><link>http://blogs.msdn.com/habibh/archive/2009/08/13/getting-windows-mobile-device-center-to-work-on-windows-server-2008-r2.aspx</link><pubDate>Thu, 13 Aug 2009 10:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9867834</guid><dc:creator>habibh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/habibh/comments/9867834.aspx</comments><wfw:commentRss>http://blogs.msdn.com/habibh/commentrss.aspx?PostID=9867834</wfw:commentRss><description>&lt;p&gt;When you try to install Windows Mobile Device Center 6.1 (drvupdate-amd64.exe) on Windows Server 2008 R2, you'll probably end up with the following cryptic error message which isn't very helpful:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Windows Mobile Device Center Driver Update     &lt;br /&gt;------------------------------------------ &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;The update could not be installed because at least one     &lt;br /&gt;Windows component required by Windows Mobile Device Center      &lt;br /&gt;is missing &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;[OK]&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The root cause of this problem is that on Windows Server 2008 R2, the &lt;strong&gt;Desktop Experience&lt;/strong&gt; server feature is disabled by default and Windows Mobile Device Center requires the Desktop Experience feature in order to work.&lt;/p&gt;  &lt;p&gt;To enable Desktop Experience, start &lt;em&gt;Server Manager&lt;/em&gt; and select the &lt;em&gt;Features&lt;/em&gt; node from the left hand side of the Server Manager. In the Features pane click the &amp;quot;Add Features&amp;quot; link which will display the &lt;em&gt;Select Features&lt;/em&gt; dialog, shown below. On the Select Features dialog, check the &amp;quot;Desktop Experience&amp;quot; node and click the [Install] button. After installing the feature, you'll be asked to restart your computer.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Select Features dialog." border="0" alt="Select Features dialog." src="http://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingWindowsMobileDeviceCentertoworkon_63E/image_3.png" width="783" height="576" /&gt; &lt;/p&gt;  &lt;p&gt;Habib Heydarian.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9867834" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/habibh/archive/tags/Announcements/default.aspx">Announcements</category><category domain="http://blogs.msdn.com/habibh/archive/tags/Technology/default.aspx">Technology</category></item><item><title>How to detect the .NET Framework directory using PowerShell</title><link>http://blogs.msdn.com/habibh/archive/2009/08/11/how-to-detect-the-net-framework-directory-using-powershell.aspx</link><pubDate>Wed, 12 Aug 2009 01:41:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9865098</guid><dc:creator>habibh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/habibh/comments/9865098.aspx</comments><wfw:commentRss>http://blogs.msdn.com/habibh/commentrss.aspx?PostID=9865098</wfw:commentRss><description>&lt;p&gt;As 64-bit machines become mainstream, one of the problems that developers run into is dealing with registry keys and directories. This is because many applications and runtimes are designed to run on both 64-bit and &lt;a href="http://en.wikipedia.org/wiki/WOW64"&gt;WOW64&lt;/a&gt;. The problem comes about because the same application or runtime is installed in two different directories or has two separate entries in the Windows Registry (both 32-bit version and 64-bit version).&lt;/p&gt;  &lt;p&gt;Take the .NET Framework for example. On a 64-bit operating system, the 32-bit version of the framework is installed in&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;while the 64-bit version of the framework on the same machine is installed in:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;C:\Windows\Microsoft.NET\&lt;font color="#ff0000"&gt;&lt;strong&gt;Framework64&lt;/strong&gt;&lt;/font&gt;\v2.0.50727&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;To take this example further, let's say that as part of your application's setup, you have hard-coded the location of the .NET Framework. There is a good chance now that when you migrate your application to 64-bit, your setup application is broken.&lt;/p&gt;  &lt;p&gt;If you are using PowerShell as part of your setup application, you can detect the directory of the .NET Framework, as shown below. The &lt;font face="Courier New"&gt;Get-FrameworkDirectory&lt;/font&gt; cmdlet returns the default .NET Framework directory regardless of whether you are running on 32-bit or 64-bit.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Get-FrameworkDirectory()&lt;br /&gt;{&lt;br /&gt;    $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;In the sample below, I'm using the &lt;font face="Courier New"&gt;Get-FrameworkDirectory&lt;/font&gt; cmdlet to find the location of aspnet_regsql.exe.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Create-SQLASPNETMembership&lt;br /&gt;{&lt;br /&gt;    Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Create the ASPNETDB SQL Server database for the membership system&amp;quot;&lt;/span&gt;&lt;br /&gt;    $frameworkDir = Get-FrameworkDirectory&lt;br /&gt;    Set-Alias aspnet_regsql (Join-Path $frameworkDir &lt;span style="color: #006080"&gt;&amp;quot;aspnet_regsql.exe&amp;quot;&lt;/span&gt;)&lt;br /&gt;    aspnet_regsql -S DinnerNow -E -A all    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Habib Heydarian.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9865098" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/habibh/archive/tags/Technology/default.aspx">Technology</category><category domain="http://blogs.msdn.com/habibh/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category></item><item><title>The Charles Babbage Difference Engine</title><link>http://blogs.msdn.com/habibh/archive/2009/06/04/the-charles-babbage-difference-engine.aspx</link><pubDate>Fri, 05 Jun 2009 08:12:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700791</guid><dc:creator>habibh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/habibh/comments/9700791.aspx</comments><wfw:commentRss>http://blogs.msdn.com/habibh/commentrss.aspx?PostID=9700791</wfw:commentRss><description>&lt;p&gt;This week, I was in Silicon Valley to talk to a number of ISV customers about what’s coming up in Visual Studio Team System 2010 for C++ developers. I’ve always wanted to go to the &lt;a href="http://www.computerhistory.org/" target="_blank"&gt;Computer History Museum&lt;/a&gt; and this time, I had a couple of hours before my flight back to Redmond so I got to finally see it. I was absolutely blown away by the experience! But the thing that really stood out for me was the &lt;a href="http://en.wikipedia.org/wiki/Charles_Babbage" target="_blank"&gt;Charles Babbage Difference Engine&lt;/a&gt;. The story behind how the Difference Engine got to the Computer History Museum is interesting on it’s own merit. There are only two of these in the world. The first one was built in 1991 and is at the &lt;a href="http://en.wikipedia.org/wiki/London_Science_Museum" target="_blank"&gt;London Science Museum&lt;/a&gt;. The story goes that one day, Nathan Myhrvold (former Microsoft executive) visited the London Science Museum and decided that he wanted a Difference Engine for himself to put in his own house (who wouldn’t want one of these!). So, that’s when the second Difference Engine was built and he loaned it to the Computer History Museum until the end of 2009 at which time it goes to Nathan’s house (never to be seen again). So, if you get an opportunity to go to Silicon Valley, you have to see this. Else, your only other option will be to fly to London. While I was at the Museum, they gave us a tour of the Difference Engine and even demonstrated how it works! I had my camera with me so I took a couple of photos and also a video of the demonstration. Yes, for a few short minutes, I felt like a kid in candy land.&lt;/p&gt;  &lt;p&gt;Habib Heydarian.&lt;/p&gt;  &lt;p&gt;Here is a video of the Difference Engine in action.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="preserve1d5772f20ecb4174a49198716eb44142" class="wlWriterPreserve" &gt;&lt;span ="&amp;lt;span"&gt;&lt;embed height="600" type="application/x-shockwave-flash" width="800" src="http://www.youtube.com/v/avEmla7krFk&amp;amp;fs=1&amp;amp;hd=1&amp;amp;border=1&amp;amp;rel=0" wmode="transparent" allowfullscreen="true" /&gt;&lt;/span&gt;&lt;/div&gt;  &lt;p&gt;The Difference Engine in all it’s glory.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Difference Engine" border="0" alt="Difference Engine" src="http://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/TheCharlesBabbageDifferenceEngine_133F5/Difference%20Engine_1.jpg" width="644" height="484" /&gt; &lt;/p&gt;  &lt;p&gt;Couple of examples showing how the Difference Engine works.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Difference Engine Formula" border="0" alt="Difference Engine Formula" src="http://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/TheCharlesBabbageDifferenceEngine_133F5/Difference%20Engine%20Formula_1.jpg" width="644" height="484" /&gt;&lt;/p&gt;  &lt;p&gt;And, one last photo.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Difference Engine Side View" border="0" alt="Difference Engine Side View" src="http://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/TheCharlesBabbageDifferenceEngine_133F5/Difference%20Engine%20Side%20View_1.jpg" width="644" height="484" /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700791" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/habibh/archive/tags/Technology/default.aspx">Technology</category></item></channel></rss>