[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: OpSys query in XPL
- Subject: Re: OpSys query in XPL
- From: cld@xxxxxxxx
- Date: Tue, 13 Jun 2006 20:53:41 +0000
-------------- Original message ----------------------
From: "Fred Weiner"
> clear so clear; even more than I asked for. I had examined GETXYOS and was
> unable to understand *how* that code "queries" for which OPSYS is there. I
> want that intellectual nugget . . .
Fred:
Basically, GetXyOS "shells" to the OS (XyWrite's DOS command); issues the VER command, redirecting the output of that command to a file (VER>filename); loads the contents of the file to Save/Get 652 (so that it can be inspected in memory, without CAlling the file into a window); tests 652 for containment of the telltale string ("NT", "XP", etc.); and, finally, reconfigures S/G 652 so that it contains the appropriate 3-char OS identifier (along with a prefix, "XyOS=", which earmarks the contents of 652 as GetXyOS data, i.e., eliminates the possibility that the string was put there by another program that has nothing to do with ID'ing the OS). That's it, in a nutshell.
--
Carl Distefano
cld@xxxxxxxx