<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Betriebsystem vergleichen]]></title><description><![CDATA[<p>Wie kann ich überprüfen, ob auf dem PC Windows 2000 oder Windows XP läuft!?<br />
Ok, das mit GetVersion ist mir eigentlich klar.<br />
Jedoch komme ich leider nicht weiter...<br />
Möchte nur eine Sequenz programmieren, welche überprüfen soll,</p>
<p>if( Betriebsystem == „Windows XP“){</p>
<p>ShowMessage(„Windows XP“);</p>
<p>}</p>
<p>if( Betriebsystem == „Windows 2000“){</p>
<p>ShowMessage(„Windows 2000“);</p>
<p>}</p>
<p>Wie mach ich das?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/128319/betriebsystem-vergleichen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 10:22:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/128319.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Dec 2005 14:33:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Betriebsystem vergleichen on Fri, 02 Dec 2005 14:33:14 GMT]]></title><description><![CDATA[<p>Wie kann ich überprüfen, ob auf dem PC Windows 2000 oder Windows XP läuft!?<br />
Ok, das mit GetVersion ist mir eigentlich klar.<br />
Jedoch komme ich leider nicht weiter...<br />
Möchte nur eine Sequenz programmieren, welche überprüfen soll,</p>
<p>if( Betriebsystem == „Windows XP“){</p>
<p>ShowMessage(„Windows XP“);</p>
<p>}</p>
<p>if( Betriebsystem == „Windows 2000“){</p>
<p>ShowMessage(„Windows 2000“);</p>
<p>}</p>
<p>Wie mach ich das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/932404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/932404</guid><dc:creator><![CDATA[tobgo]]></dc:creator><pubDate>Fri, 02 Dec 2005 14:33:14 GMT</pubDate></item><item><title><![CDATA[Reply to Betriebsystem vergleichen on Fri, 02 Dec 2005 14:57:01 GMT]]></title><description><![CDATA[<p>Versuch's mal mit <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getversionex.asp" rel="nofollow">GetVersionEx</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx (&amp;osvi);
switch(osvi.dwMinorVersion)
{
case 0:
  switch(osvi.dwMajorVersion)
  {
  case 4:cout&lt;&lt;&quot;Win NT, Win 2k or Win 95&quot;;break;
  case 6:cout&lt;&lt;&quot;Longhorn or Vista&quot;;break;
  }
  break;
case 1:  cout&lt;&lt;&quot;Win XP&quot;;break;
case 2:  cout&lt;&lt;&quot;Windows Server 2003&quot;;break;
case 10: cout&lt;&lt;&quot;Win 98&quot;;break;
case 90: cout&lt;&lt;&quot;Win ME&quot;;break;
default: cout&lt;&lt;&quot;something other&quot;;
}
</code></pre>
<p>PS: Schau dir auch die Übrigen Member von OSVERSIONINFO an (oder bei &quot;besseren&quot; Systemen OSVERSIONINFOEX).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/932433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/932433</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 02 Dec 2005 14:57:01 GMT</pubDate></item><item><title><![CDATA[Reply to Betriebsystem vergleichen on Fri, 02 Dec 2005 16:13:31 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>Versuch's mal mit <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getversionex.asp" rel="nofollow">GetVersionEx</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx (&amp;osvi);
switch(osvi.dwMinorVersion)
{
case 0:
  switch(osvi.dwMajorVersion)
  {
  case 4:cout&lt;&lt;&quot;Win NT, Win 2k or Win 95&quot;;break;
  case 6:cout&lt;&lt;&quot;Longhorn or Vista&quot;;break;
  }
  break;
case 1:  cout&lt;&lt;&quot;Win XP&quot;;break;
case 2:  cout&lt;&lt;&quot;Windows Server 2003&quot;;break;
case 10: cout&lt;&lt;&quot;Win 98&quot;;break;
case 90: cout&lt;&lt;&quot;Win ME&quot;;break;
default: cout&lt;&lt;&quot;something other&quot;;
}
</code></pre>
<p>PS: Schau dir auch die Übrigen Member von OSVERSIONINFO an (oder bei &quot;besseren&quot; Systemen OSVERSIONINFOEX).</p>
</blockquote>
<p>Hat das einen besonderen Grund, dass du die Minor-Abfrage um die Major-Abfrage geschachtelt hast und nicht umgekehrt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/932479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/932479</guid><dc:creator><![CDATA[masterofx32]]></dc:creator><pubDate>Fri, 02 Dec 2005 16:13:31 GMT</pubDate></item><item><title><![CDATA[Reply to Betriebsystem vergleichen on Fri, 02 Dec 2005 15:51:29 GMT]]></title><description><![CDATA[<p>masterofx32 schrieb:</p>
<blockquote>
<p>Hat das einen besonderen Grund, dass du die Minor-Abfrage um die Major-Abfrage geschachtelt hast und nicht umgekehrt?</p>
</blockquote>
<p>Ja, die Verteilung der Major- und Minor-Versionen auf die einzelnen Betriebssysteme (schau dir die Tabellen zur OSVERSIONINFO im MSDN an, dann verstehst du es).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/932495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/932495</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 02 Dec 2005 15:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to Betriebsystem vergleichen on Fri, 02 Dec 2005 16:12:44 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>masterofx32 schrieb:</p>
<blockquote>
<p>Hat das einen besonderen Grund, dass du die Minor-Abfrage um die Major-Abfrage geschachtelt hast und nicht umgekehrt?</p>
</blockquote>
<p>Ja, die Verteilung der Major- und Minor-Versionen auf die einzelnen Betriebssysteme (schau dir die Tabellen zur OSVERSIONINFO im MSDN an, dann verstehst du es).</p>
</blockquote>
<pre><code>Windows 3.1 - 3.10
Windows 95/NT  - 4.0 (Unterscheidbar durch PlatformID)
Windows 98  - 4.10
Windows ME  - 4.90
Windows 2000- 5.0
Windows XP  - 5.1
2003 Server - 5.2
Vista       - 6.0
</code></pre>
<p>In deinem Code wird Windows 2000 mit bei 95 eingereiht und alle zukünftigen Major-Versionen mit bereits vorhandener Minor-Version werden nicht eindeutig voneinander unterschieden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/932511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/932511</guid><dc:creator><![CDATA[masterofx32]]></dc:creator><pubDate>Fri, 02 Dec 2005 16:12:44 GMT</pubDate></item><item><title><![CDATA[Reply to Betriebsystem vergleichen on Sun, 04 Dec 2005 19:48:00 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/934252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/934252</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 04 Dec 2005 19:48:00 GMT</pubDate></item></channel></rss>