<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how do I determine the O/S version from a .bat script in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358715#M5202</link>
    <description>Hi there.&lt;BR /&gt;Just use the good old 'ver' in the .bat file.&lt;BR /&gt;On the newer win systems the ending is more like .cmd instead of .bat, isn't it ?&lt;BR /&gt;Rgds&lt;BR /&gt;Alexander M. Ermes</description>
    <pubDate>Tue, 17 Aug 2004 06:33:20 GMT</pubDate>
    <dc:creator>Alexander M. Ermes</dc:creator>
    <dc:date>2004-08-17T06:33:20Z</dc:date>
    <item>
      <title>how do I determine the O/S version from a .bat script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358714#M5201</link>
      <description>I have a .bat script which can run on Windows 2000 or Windows 2003.  How can I tell which version of the operating system the script is running on?</description>
      <pubDate>Tue, 17 Aug 2004 05:28:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358714#M5201</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2004-08-17T05:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: how do I determine the O/S version from a .bat script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358715#M5202</link>
      <description>Hi there.&lt;BR /&gt;Just use the good old 'ver' in the .bat file.&lt;BR /&gt;On the newer win systems the ending is more like .cmd instead of .bat, isn't it ?&lt;BR /&gt;Rgds&lt;BR /&gt;Alexander M. Ermes</description>
      <pubDate>Tue, 17 Aug 2004 06:33:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358715#M5202</guid>
      <dc:creator>Alexander M. Ermes</dc:creator>
      <dc:date>2004-08-17T06:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: how do I determine the O/S version from a .bat script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358716#M5203</link>
      <description>Well.... yes, use the VER command, but at least parse it out so that you can do some testing with it from within your batch file.&lt;BR /&gt;&lt;BR /&gt;Note:  I didn't have 2000 running, so could only supply the VER values for XP and 2003.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;FOR /F "tokens=5 delims= " %%i in ('ver') do set my_ver=%%i&lt;BR /&gt;if %my_ver%==5.1.2600] set my_os=XP&lt;BR /&gt;if %my_ver%==5.2.3790] set my_os=2003&lt;BR /&gt;&lt;BR /&gt;echo My OS is: %my_os%&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rather than echo out the OS, you could have your batch file skip to different areas based on the OS (my_os in this example).&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Thu, 19 Aug 2004 01:05:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358716#M5203</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2004-08-19T01:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: how do I determine the O/S version from a .bat script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358717#M5204</link>
      <description>A .bat file usualy is a text file, with some command, it is hard to know for what os (or better for what dos version) it was written.&lt;BR /&gt;You can try to analyse the commands inside and the path of these command, changing windows version have changed the path of the dos (or emulated dos) commands.&lt;BR /&gt;&lt;BR /&gt;the ver command may apply to the envoronment, I mean if you boot a floppy disk with the file system, you can run this command to know which version you booted from, but usualy at the end of the boot, the version already appear&lt;BR /&gt;&lt;BR /&gt;marino</description>
      <pubDate>Thu, 19 Aug 2004 16:10:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358717#M5204</guid>
      <dc:creator>Marino Meloni_1</dc:creator>
      <dc:date>2004-08-19T16:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: how do I determine the O/S version from a .bat script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358718#M5205</link>
      <description>I was only really interested to see if I was on Windows 2000 or something else so I used "ver" and checked the output for the string "Windows 2000".&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Fri, 20 Aug 2004 03:01:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-do-i-determine-the-o-s-version-from-a-bat-script/m-p/3358718#M5205</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2004-08-20T03:01:59Z</dc:date>
    </item>
  </channel>
</rss>

