<?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# Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:14:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: labate</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-8619</link>
		<dc:creator>labate</dc:creator>
		<pubDate>Thu, 01 Dec 2011 09:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-8619</guid>
		<description>The Professional edition of Windows 7 was not detected by the original code.

So I changed the following code:

In the PRODUCT region I added the constant:

private const int PRODUCT_PROFESSIONAL = 0x00000030;

In the Edition pproperty and &quot;VERSION 6&quot; region, I added the case:

case PRODUCT_PROFESSIONAL:
    edition = &quot;Professional&quot;;
    break;

I don&#039;t know whether it works on other &quot;Professional&quot; editions, I just debugged on my Windows 7 Professional 64-bit, and I found the value added in the code.</description>
		<content:encoded><![CDATA[<p>The Professional edition of Windows 7 was not detected by the original code.</p>
<p>So I changed the following code:</p>
<p>In the PRODUCT region I added the constant:</p>
<p>private const int PRODUCT_PROFESSIONAL = 0&#215;00000030;</p>
<p>In the Edition pproperty and &#8220;VERSION 6&#8243; region, I added the case:</p>
<p>case PRODUCT_PROFESSIONAL:<br />
    edition = &#8220;Professional&#8221;;<br />
    break;</p>
<p>I don&#8217;t know whether it works on other &#8220;Professional&#8221; editions, I just debugged on my Windows 7 Professional 64-bit, and I found the value added in the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IG</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-888</link>
		<dc:creator>IG</dc:creator>
		<pubDate>Mon, 24 Oct 2011 17:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-888</guid>
		<description>This is great! Thank you very much!</description>
		<content:encoded><![CDATA[<p>This is great! Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdb-blog</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-887</link>
		<dc:creator>mdb-blog</dc:creator>
		<pubDate>Tue, 23 Nov 2010 13:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-887</guid>
		<description>full c# code example:

http://mdb-blog.blogspot.com/2010/11/how-to-determine-windows-version-by.html</description>
		<content:encoded><![CDATA[<p>full c# code example:</p>
<p><a href="http://mdb-blog.blogspot.com/2010/11/how-to-determine-windows-version-by.html" rel="nofollow">http://mdb-blog.blogspot.com/2010/11/how-to-determine-windows-version-by.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Guy</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-886</link>
		<dc:creator>John Guy</dc:creator>
		<pubDate>Fri, 03 Sep 2010 18:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-886</guid>
		<description>It looks a little weird I do agree - but if I do not trap it like this the code returns Windows 2003 Server 64-bit. My XP SP2 64-bit reports the build as  5.2.3790.131072</description>
		<content:encoded><![CDATA[<p>It looks a little weird I do agree &#8211; but if I do not trap it like this the code returns Windows 2003 Server 64-bit. My XP SP2 64-bit reports the build as  5.2.3790.131072</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MZ</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-885</link>
		<dc:creator>MZ</dc:creator>
		<pubDate>Fri, 03 Sep 2010 12:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-885</guid>
		<description>this doesn&#039;t work. it tells u the platform (64/32 bit) of code that runs the context. not the undelying os.</description>
		<content:encoded><![CDATA[<p>this doesn&#8217;t work. it tells u the platform (64/32 bit) of code that runs the context. not the undelying os.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Guy</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-884</link>
		<dc:creator>John Guy</dc:creator>
		<pubDate>Fri, 23 Jul 2010 15:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-884</guid>
		<description>To cope with XP 64-bit I made this change in
#region 2000, XP, 2003 
case 5:
switch (minorVersion)
 
case 2: 
if (productType == VER_NT_WORKSTATION)
  name = &quot;Windows XP&quot;;  // handles XP 64-bit
else
  name = &quot;Windows Server 2003&quot;;
break;</description>
		<content:encoded><![CDATA[<p>To cope with XP 64-bit I made this change in<br />
#region 2000, XP, 2003<br />
case 5:<br />
switch (minorVersion)</p>
<p>case 2:<br />
if (productType == VER_NT_WORKSTATION)<br />
  name = &#8220;Windows XP&#8221;;  // handles XP 64-bit<br />
else<br />
  name = &#8220;Windows Server 2003&#8243;;<br />
break;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SP1K</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-883</link>
		<dc:creator>SP1K</dc:creator>
		<pubDate>Fri, 30 Apr 2010 17:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-883</guid>
		<description>Can you send me an email at the email I posted.  Thank you.</description>
		<content:encoded><![CDATA[<p>Can you send me an email at the email I posted.  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-882</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Fri, 30 Apr 2010 17:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-882</guid>
		<description>@SP1K: For some reason your program is lacking a Main method:

[STAThread]
static void Main()
{
   // start your program here
}</description>
		<content:encoded><![CDATA[<p>@SP1K: For some reason your program is lacking a Main method:</p>
<p>[STAThread]<br />
static void Main()<br />
{<br />
   // start your program here<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SP1K</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-881</link>
		<dc:creator>SP1K</dc:creator>
		<pubDate>Fri, 30 Apr 2010 16:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-881</guid>
		<description>+ I opened VS2010.
+ I Created new C# Console Project in .NF 2.0
+ I Copied the code above and pasted it into the Code after deleting the premade VS code.
+ Set it to Release mode.
+ Compiled and got this error:
------------------------------------------------------
Error	1	Program &#039;c:usersownerdocumentsvisual studio 2010ProjectsOSCheck-ConsoleOSCheck-Consoleobjx86ReleaseOSCheck-Console.exe&#039; does not contain a static &#039;Main&#039; method suitable for an entry point	OSCheck-Console
------------------------------------------------------

What did I do wrong?</description>
		<content:encoded><![CDATA[<p>+ I opened VS2010.<br />
+ I Created new C# Console Project in .NF 2.0<br />
+ I Copied the code above and pasted it into the Code after deleting the premade VS code.<br />
+ Set it to Release mode.<br />
+ Compiled and got this error:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Error	1	Program &#8216;c:usersownerdocumentsvisual studio 2010ProjectsOSCheck-ConsoleOSCheck-Consoleobjx86ReleaseOSCheck-Console.exe&#8217; does not contain a static &#8216;Main&#8217; method suitable for an entry point	OSCheck-Console<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>What did I do wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wierdbeard65</title>
		<link>http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-880</link>
		<dc:creator>Wierdbeard65</dc:creator>
		<pubDate>Sun, 11 Apr 2010 11:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/determine-windows-version-and-edition-with-c/#comment-880</guid>
		<description>Awsome!

Ok, I&#039;m devloping using W7 64-bit, but my app needs to run on both 32 and 64 bit. No problem so far, except I&#039;m using SQLite3. There are two different DLLs depending on the OS version. So, how can I use the detection code to dynamically select which version of the DLL to load?</description>
		<content:encoded><![CDATA[<p>Awsome!</p>
<p>Ok, I&#8217;m devloping using W7 64-bit, but my app needs to run on both 32 and 64 bit. No problem so far, except I&#8217;m using SQLite3. There are two different DLLs depending on the OS version. So, how can I use the detection code to dynamically select which version of the DLL to load?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

