OS and Software Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > OS and Software >

 OS and Software Operations

GOS. - Get OS Information

Previous Top Next


MiniRobotLanguage (MRL)

 

GOS. Command

Get Operation System Information

 

 

Intention

 

Get numerical and textual information about the Operating System on which the script is actually running.

 

GOS.

STS.DUMP

MBX.Ready

 

will leave the following Information on the TOS if it runs on Windows XP:

 

graphic

 

If the same script runs on Windows 7/x64 the stack will look like this:

 

graphic

 

 

You can specify variables as parameters. In that case some of the information will be placed in these variables instead. Here is an example script:

 

GOS.$$NUM

STS.DUMP

MBX.$$NUM

 

Again for windows XP, SP3 the stack will look just like before. However you get a value of 9 into the variable $$NUM. Now lets run the same script under Windows 7/x64. Again the stack is the same as before but you get a value of 12 (see right picture below)  as numeric OS information.

 

graphic                             graphic

 

Lets see the last mode of operation, this is when we give two variables to GOS.

 

GOS.$$NUM|$$TXT

STS.DUMP

MBX.$$NUM$crlf$$$TXT

 

 

This is what we get for windows XP.  And the picture on the right shows the result for Windows 7.

graphic                             graphic

 

As we can see, the second variable contains the textual name of the operating system.

 

 

 

Syntax

 

 

GOS.[P1][|P2]

 

 

Parameter Explanation

 

P1 - Variable to take numeric OS-Information

 

You get these Numbers on the Stack/Var or in P1:

 

1  - Windows 3.1

2  - Windows 95

3  - Windows 98

4  - Windows ME

5  - Windows NT 3

6  - Windows NT 3.1

7  - Windows NT 4

8  - Windows 2000

9  - Windows XP

10 - Windows 2003

11 - Windows Vista

12 - Windows 7

13 - Windows 8

14 - Windows 9

15 - Windows 10

 

P2  - Variable to take textual OS-Information

 

 

 

Example

 

'**********************************************

' GOS-Example

'**********************************************

'

GOS.

PRT. OS-Version: $$000

 

GOS.$$NUM

PRT.numeric OS-information: $$NUM

 

GOS.-|$$TXT

PRT.Textual OS-information:$crlf$$$TXT

 

GOS.$$NUM|-

PRT.Textual OS-information:$crlf$$$000

PRT. Numerical Info: $$NUM

 

MBX.Klick me.

'-------------------------

END.

 

 

 

Remarks

 

To test if your script runs under a 64-bit OS, you can use the IOS.x64 statement.

 

 

 

Limitations:

 

-

 

 

See also:

 

    1.6.1. Program Flow Control

    IOS. / NOS. - If-Operating System