Smart Package Robot 's "Script to Executable" Compiler

<< Click to Display Table of Contents >>

Navigation:  2. Components > 2. EXE-Compiler >

Smart Package Robot 's "Script to Executable" Compiler

'#AOS: - choose Allowed OS

Previous Top Next


Compiler-Directives

 

'#AOS: - Allowed OS

Used to prevent unpacking of a package under the wrong OS

 

 

Intention

 

Compiler-Directives start with the Sequence:

'#

Which is a comment-sign on the left and then the #.

 

Because of the comment sign, the running script ignores these commands at Runtime (at time of script execution). The '#AOS. takes place immediately after the Executable is been started on the Target PC.

It will check the OS on the Target PC against a list of valid OS'es that you can specify.

 

In case the OS-check fails and the actual OS does not match the List of allowed OS, per default an File "SPR-Unpack-Error.txt" is been created at the place where the executable was started.

 

The Executable-Unpack behavior that will occur, when an error happens or when the OS-check fail, can be set using the

'#SPI:silent=0/1/2

Compiler-Directive. For example:

'#SPI:silent=0

will make the Executable to show a Error-Message instead of the default behavior, that is to create an Error-Textfile.

Using

'#SPI:silent=2

will switch into complete silent mode. In case of an error, nothing will happen, the executable will just end itself.

 

 

'#AOS= Specify the allowed Operating System for the Package. You can use any of the following OS-Shortcuts. You can also use multiple of these shortcuts (left side), separated by comma.

 

Win95 - Windows 95

Win98 - Windows 98

WinMe - Windows Me

Win2k - Windows 2000

WinXP - Windows XP

WinVi - Windows Vista

Win7  - Windows 7

Win8  - Windows 8

Win9  - Windows 9  (expected a this time)

 

' and for Servers

WinS3  - Windows Server 2003

WinS8  - Windows Server 2008

WinS82 - Windows Server 2008 R2

WinS13 - Windows Server for Win8 (expected)

WinS14 - Windows Server for Win9 (expected)

 

You can add multiple "allowed OS" separated by comma, like this:

 

'#AOS:WinXP,Win2K,Win7

 

or you can use the ">" or the "<" (optional together with the "=") Operator to specify that any OS below or above a specified OS is valid. Like this:

 

'#AOS:=>Win2K

 

If you specify multiple OS, all of these are OR'ed, means ANY of the given OS is valid. For example:

 

'#AOS:>WinVi,<Win7

 

will include ALL possible OS'es, as if you would not have used the '#AOS:-directive.

 

You can use the following Operators with #AOS:

 

>  - OS must be newer then specified OS

=> - OS must be newer or equal then the specified OS

>  - OS must be older then specified OS

=< - OS must be older or equal then the specified OS

A-B - specify a valid Range of OS, including A and B

 

You can only specify one #AOS: directive per Script.

You can add as many comma separated conditions to that instruction as you want. This way you can exactly specify under which OS the packet should run or not,

 

To specify a Range of OS's, use the "-" Operator, like this:

 

'#AOS:WinXP-Win8,Win2k

 

In this case all OS between WinXP and Windows 8 are valid.

 

 

 

 

Syntax:

 

'#AOS:[>,<,=>,<=,OS-]OS[,OS]

 

 

 

Parameter Explanation:

 

OS - a keyword out of the following. This will specify the allowed OS.

 

Win95 - Windows 95

Win98 - Windows 98

WinMe - Windows Me

Win2k - Windows 2000

WinXP - Windows XP

WinVi - Windows Vista

Win7 - Windows 7

Win8 - Windows 8

Win9 - Windows 9  (expected a this time)

 

' and for Servers

WinS3 - Windows Server 2003

WinS8 - Windows Server 2008

WinS82 - Windows Server 2008 R2

WinS13 - Windows Server for Win8 (expected)

WinS14 - Windows Server for Win9 (expected)

 

You can specify as man OS'es as you want, separated by a comma.

You can add one of these Operators below before the OS to select all newer or all older OS.

 

>  - OS must be newer then specified OS

=> - OS must be newer or equal then the specified OS

>  - OS must be older then specified OS

=< - OS must be older or equal then the specified OS

A-B - specify a valid Range of OS, including A and B

 

You can only specify one #AOS: directive per Script.

You can add as many comma separated conditions to that instruction as you want. This way you can exactly specify under which OS the packet should run or not,

 

To specify a Range of OS's, use the "-" Operator, like this:

 

'#AOS:WinXP-Win8,Win2k

 

In this case all OS between Windows XP and Windows 8 are valid.

 

 

 

Example:

 

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

' Compile-Time Commands

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

' Special Instructions

'#SPI:silent|0

'#AOS:>Win2k

EXO.?path\

MBX.!

END.

 

 

Remarks:

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.3 '#SPI: - Special Instructions

    #ONCE / # OEND - Multiple Include Protection

    1.6 #INC: - Pre-Processor File-Include