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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no 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!news2.google.com!proxad.net!newsfeed.stueberl.de!blackbush.cw.net!cw.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Michael Bode Newsgroups: comp.lang.ada Subject: Re: How to detect OS type and version? Date: Thu, 13 Oct 2005 22:36:09 +0200 Organization: 1&1 Internet AG Message-ID: <87u0flf93a.fsf@code-hal.de> References: NNTP-Posting-Host: p54af125d.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: online.de 1129235769 29133 84.175.18.93 (13 Oct 2005 20:36:09 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 13 Oct 2005 20:36:09 +0000 (UTC) X-message-flag: IMPORTANT MESSAGE -- PLEASE READ IMMEDIATELY!!! X-Accepted-File-Formats: ASCII, .rtf, .ps, .pdf - *NO* MS Office files User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:6uB1fGaLsthMIUZ8slcSgqJh2ZM= Xref: g2news1.google.com comp.lang.ada:5610 Date: 2005-10-13T22:36:09+02:00 List-Id: Bernd.Specht@gmx.com (Bernd Specht) writes: > If you cannot determine a linux system as described above, then try to open > a file that is typically for windows (e.g. "c:\winnt\system32\command.com"). > If you get _no_ exception, then you are on a windows system. To find the > version, look for the file "prodspec.ini" (in c:\winnt\system32 and in c: > \system32). You can find the Window type (2000, XP) and the build number. > But - not on all Windows systems :-( (Win98 do not have this file). It has not to be "c:\winnt". The correct path is "%Systemroot%" and for that you must read the environment variable. -- Michael Bode