From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f890526de6a8a218 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 13 Oct 2005 19:24:04 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <87u0flf93a.fsf@code-hal.de> <20051013225800.4e50bfa0@pscube.informatik.uni-stuttgart.de> Subject: Re: How to detect OS type and version? Date: Thu, 13 Oct 2005 19:27:47 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-cymvWciIu9PK7S4mhftHlOY+jjtK8N35O1eB+d7rEZOgVSoPNDqnrgVNg67oetkGMmoglVMmsFUEL1R!vpcm5ohMPy4ZPL/tFg7hXPEPRwQWWfvXoCxh60HKGaQytRgs1DXGRjVYgrmzOvqvfoi/LveJi3fk X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5622 Date: 2005-10-13T19:27:47-05:00 List-Id: "Stefan Bellon" wrote in message news:20051013225800.4e50bfa0@pscube.informatik.uni-stuttgart.de... Bernd Specht wrote: >>But as he doesn't know the os, he cannot read an environment variable. Why not? Use Ada.Environment_Variables (Ada 200Y) or the implementation-defined version that comes with your compiler. (Pretty much every Ada compiler I know of has one.) >> Personally I've never seen a Windows system on a different drive >> (older versions of Windows required C: which often gave problems with >> OS/2 on same drive). Beside this you can try C:, D: ... >And I have never seen a Windows installed inside a directory called >"winnt". That was the standard for Windows NT and at least some Windows 2000 systems. All of the systems here are that way. (OTOH, none of them are on drive C:) As I said before, once you figure out that you are running on Windows (some version), then dynamically load the GetVersionEx API function and get all of the version details. Randy.