<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Determine Windows Version and Edition with C#</title>
	<atom:link href="http://www.csharp411.com/determine-windows-version-and-edition-with-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/</link>
	<description>C# Information, Code, Tips and News</description>
	<lastBuildDate>Fri, 05 Mar 2010 13:44:45 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: John Guy</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/comment-page-1/#comment-5374</link>
		<dc:creator>John Guy</dc:creator>
		<pubDate>Tue, 02 Feb 2010 19:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-5374</guid>
		<description>Ok I have found it!!  
To discriminate if you have a Tablet PC running XP

Inside #region EDITION I added

[DLLImport(&quot;user32&quot;)]
public static extern int GetSystemMetrics(int nIndex);

and 

in #region 5 made this change

if ((suitMask &amp; VER_SUITE_PERSONAL) != 0)
{
  edition = &quot;Home&quot;;
}
else
{
   if (GetSystemMetrics(86) == 0) // 86 == SM_TABLETPC
     edition = &quot;Professional&quot;;        
   else
     edition = &quot;Tablet Edition&quot;;
}

I was able to test only on an XP Tablet and an XP Professional laptops.
Thanks for a terrific article and Jonney Tiney fb.</description>
		<content:encoded><![CDATA[<p>Ok I have found it!!<br />
To discriminate if you have a Tablet PC running XP</p>
<p>Inside #region EDITION I added</p>
<p>[DLLImport("user32")]<br />
public static extern int GetSystemMetrics(int nIndex);</p>
<p>and </p>
<p>in #region 5 made this change</p>
<p>if ((suitMask &amp; VER_SUITE_PERSONAL) != 0)<br />
{<br />
  edition = "Home";<br />
}<br />
else<br />
{<br />
   if (GetSystemMetrics(86) == 0) // 86 == SM_TABLETPC<br />
     edition = "Professional";<br />
   else<br />
     edition = "Tablet Edition";<br />
}</p>
<p>I was able to test only on an XP Tablet and an XP Professional laptops.<br />
Thanks for a terrific article and Jonney Tiney fb.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/comment-page-1/#comment-5373</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 02 Feb 2010 18:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-5373</guid>
		<description>Have you a way of discriminating between XP Professional and XP Tablet?</description>
		<content:encoded><![CDATA[<p>Have you a way of discriminating between XP Professional and XP Tablet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonny Tiney</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/comment-page-1/#comment-5347</link>
		<dc:creator>Jonny Tiney</dc:creator>
		<pubDate>Wed, 23 Dec 2009 14:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-5347</guid>
		<description>Hi, thanks for this - Works a treat for Operating System&#039;s up to Vista. For it to detect Windows 7, I amended the Windows Vista Detection to look like this:

case 6:
switch (minorVersion)
{
   case 0:
   name = &quot;Windows Vista&quot;;
   break;

   case 1:
   name = &quot;Windows 7&quot;;
   break;

   case 3:
   name = &quot;Windows Server 2008&quot;;
   break;
}
break;

Seems to work a treat, but haven&#039;t tested on Windows Vista. I now want to know how I would go about fixing the Product part, so it will show &#039;Professional&#039; etc. (I think Home Premium, Basic and Ultimate should still be working).

Any help is appreciated :-D</description>
		<content:encoded><![CDATA[<p>Hi, thanks for this &#8211; Works a treat for Operating System's up to Vista. For it to detect Windows 7, I amended the Windows Vista Detection to look like this:</p>
<p>case 6:<br />
switch (minorVersion)<br />
{<br />
   case 0:<br />
   name = "Windows Vista";<br />
   break;</p>
<p>   case 1:<br />
   name = "Windows 7&#8243;;<br />
   break;</p>
<p>   case 3:<br />
   name = "Windows Server 2008&#8243;;<br />
   break;<br />
}<br />
break;</p>
<p>Seems to work a treat, but haven't tested on Windows Vista. I now want to know how I would go about fixing the Product part, so it will show 'Professional' etc. (I think Home Premium, Basic and Ultimate should still be working).</p>
<p>Any help is appreciated <img src='http://www.csharp411.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudheer kumar singh</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/comment-page-1/#comment-5323</link>
		<dc:creator>Sudheer kumar singh</dc:creator>
		<pubDate>Tue, 03 Nov 2009 10:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-5323</guid>
		<description>wonderful!thanks this code is very helpful.</description>
		<content:encoded><![CDATA[<p>wonderful!thanks this code is very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Eschweiler</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/comment-page-1/#comment-4772</link>
		<dc:creator>Steve Eschweiler</dc:creator>
		<pubDate>Thu, 21 May 2009 18:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-4772</guid>
		<description>Awesome! Plugged it right in and it worked. Thanks for providing it.</description>
		<content:encoded><![CDATA[<p>Awesome! Plugged it right in and it worked. Thanks for providing it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
