byte 0 (1byte):		General Flags
     bits 0-3:	Window position
		0= top left
		1= top centre
		2= top right
		3= middle left
		4= centre
		5= middle right
		6= bottom left
		7= bottom centre
		8= bottom right

     bit 4:	Max. compression
     bit 5:	Control install speed
     bit 6:	no install log
     bit 7:	Centre all dialogs over progress dialog

byte 2 (4byte?):       ??
byte 6 (3byte?):       ??
byte 9 (4byte):	       floppy split size in bytes
byte 13 (4byte):       version number of compiler etc?
byte 17 (4byte):       time in seconds when script compiled
byte 21 (4byte):       extra flags
byte 25 (4byte):       password start
byte 29 (4byte):       password end
byte 33 (4byte):       password total
byte 37 (Xbytes):      encrypted (XORed with 255) password (NULLterminated)
byte ? (Xbytes):       Webdeploy URL (NULLterminated)
byte ? (Xbytes):       Installation log filename (NULLterminated)
byte ? (Xbytes):       Font name to use (NULLterminated)
byte ? (1byte):	       Point size
byte ? (1byte):	       Message charset
byte ? (4byte):	       ?
byte ? (1byte):	       Number of languages to choose from
(Xbytes)	       install MIF filename (NULLterminated)
(Xbytes)	       install MIF file (NULLterminated)
(Xbytes)	       manufacturer (NULLterminated)
(Xbytes)	       product (NULLterminated)
(Xbytes)	       version (NULLterminated)
(Xbytes)	       serial number (NULLterminated)
(Xbytes)	       uninstall MIF filename (NULLterminated)

if (number of languages > 1)
   (Xbytes)	       Language dialog title (NULLterminated)
   (Xbytes)	       Text of dialog box (NULLterminated)

(Xbytes)	       List of languages to choose from
		       repeat:
			    humanName(NULL)
			    internalCode(NULL)

(Xbytes)	       several tables of strings in different languages
		       to use in installer.

		       each table consists of a set of null terminated strings,
		       (52 entries). There is an extra NULL preceding each
		       table.

		       (NULL token = string table?)

..... the rest of the script

(NOTE: compiler variables are like preprocessor commands in C, so they
       don't appear in the script)

opcodes:

0x0		Install File
		     SHORT		= Flags
		     LONG		= offset to compressed data start (form where?)
		     LONG		= Compressed Length
		     LONG		= Date
		     LONG		= Uncompressed Length
		     
		     LONG	?
		     LONG	?
		     LONG	?
		     LONG	?
		     LONG	?
		     
		     LONG		= Something to do with WebDeploy
		     
		     STRING00		= Destination
		     STRING00		= Description
		     STRING00		= Existing File to patch

		     		     (need to make up Source)
				     (warn if file uses patching!)
		     

0x3		Display Message
		     BYTE		= Flags
		     STRING00		= Title
		     STRING00		= Text (split into seperate lines)

0x5		Edit INI File
		     STRING00		= Pathname
		     STRING00		= Settings (Section in file) (need to put [] around this)
		     STRING00		= Settings (one per line (i.e. line0D0A sequence))
						   (Several occurences of the "Settings" field here)

0x6             Custom Graphic
		     6BYTE		= ?
		     LONG		= start of compressed data
		     LONG		= size of compressed data
		     LONG		= uncompressed size    

0x7             Execute Program
		     BYTE		= Flags
		     STRING00		= Pathname
		     STRING00		= Command Line
		     STRING00		= Default Directory

0x8		End Block
		    BYTE		= ??

0x9		Create Shortcut
		    BYTE		= 1 (not used)
		    STRING00		= destination path (not used)
		    STRING00		= "ShellLink" type of file to create (not used)
		    BYTE		= ?? (not used)
		    BYTE		= ?? (not used)
		    STRING7f		= Flags
		    STRING7f		= Source
		    STRING7f		= Destination
		    STRING7f		= Command Options
		    STRING7f		= Working Directory
		    STRING7f		= Icon Number
		    STRING7f		= Icon Pathname
		    STRING7f		= Description
		    STRING00		= Key Type

0x9		Create Service
		    BYTE		= 1 (not used)
		    STRING00		= destination path (not used)
		    STRING00		= "DoService" type of file to create (not used)
		    BYTE		= ?? (not used)
		    BYTE		= ?? (not used)
		    STRING7f		= Service Name
		    STRING7f		= Executable Path
		    STRING7f		= Login User
		    STRING7f		= Login Password
		    STRING7f		= Service Type
		    STRING7f		= Boot Type
		    STRING7f		= Error type
		    STRING00		= Display Name

0x9		Call DLL Function 
		     (Single parameter - bit 5 =0)
		    BYTE		= Flags
		    STRING0		= Pathname
		    STRING0		= Function Name
		    STRING0		= Return Variable
		    STRING0		= Parameter

0x9		Call DLL Function 
		     (multiple parameters - bit 5 =1)
		    BYTE		= Flags
		    STRING0		= Pathname
		    STRING0		= Function Name
		    STRING0		= Argument List
						(one per line - seperate out)
		    STRING0		= Return Variable
		    BYTE		= ??


0x09090066	"Other function"	
		    Xbytes		= text number of "other function".
					  NULL terminated.
					  There are ALWAYS TWO EXTRA NULLS
					  after the string-terminating one

0xa		Edit Registry
		    BYTE		= Root			(need to put "Total Keys=1" as well)
		    BYTE		= Data Type
		    STRING00		= Key
		    STRING00		= New Value
		    STRING00		= Value Name

0xb		Delete File
		    BYTE		= Flags
		    STRING00		= Pathname

0xc		If/While Statement	
		    BYTE		= Flags
		    STRING00		= Variable
		    STRING00		= Value

0xd		Else Statement

0xf		Add ProgMan Icon
		    Right, this is a list of actions to be taken.
		    
		    Each has a BYTE, then a STRING0		    
			 the BYTE is 0x04 when there is another thing coming (followed by another BYTE)
			 and 0x10 when there isn't 
		    STRING
		    [DeleteGroup(Group				=> Flags = bit 1 set
								   byte preceding has bit 0 clear => Personal flag
		    [DeleteItem(Icon Name)]			=> Flags = bit 0 set
								   Group = last group reference in ShowGroup
		    [AddItem(Command Line,Icon Name,Icon Pathname,Icon Number,?,?,Default Directory [[,,X]]
								   Group = last group reference in CreateGroup
								   Icon Name = last icon reference in ReplaceItem
								   need to add 128 onto Icon number for some reason

								   byte preceding has bits 0&1 clear => 
									seperate Space set

								   if ,,1 is present,then run minimised 
									is selected, so Icon Number has 128 has 
									added to it (leave it this way)

								   Flags:
									bit 0 => deleteGroup
									bit 1 => deleteItem
									    (neither => addItem)
									    
									bit 6 => personal group
									bit 7 => seperate space

									(run minimized => icon num has top bit set)
					
		    [CreateGroup(Group				=> keep note of Groupname
								   byte preceding has bit 0 clear => Personal flag
		    [ShowGroup(Group,SOMENUMBER			=> keep note of Groupname
								   byte preceding has bit 0 clear => Personal flag
		    [ReplaceItem(Icon Name)]			=> keep note of IconName


0x11		Create Directory	
		    STRING0		= Pathname

0x12		Copy Local File
		    SHORT		= Flags
		    40BYTES		= Version information of local file (ignore)
		    STRING0		= Destination
		    STRING0		= Description
		    BYTE		= ??
		    STRING0		= Source

0x14		Custom Dialog Set
 		    LONG		= offset to compressed data start (form where?)
		    LONG		= (compressed length of dialogue resource) 
		    LONG		= (uncompressed length of dialogue resource)
		    STRING00		= Display Variable
		    STRING00		= Name

0x15		Get System Information
		    BYTE		= Flags
		    STRING00		= Variable (remove %'s)
		    STRING00		= Pathname 

0x16		Get Temporary Filename
		    STRING00		= Variable

0x17		Play Wave File
		    BYTE		= Flags
		    SHORT		= X Position
		    SHORT		= Y Position
		    STRING00		= Pathname

0x18		Exit Installation

0x19		Install ODBC Driver
		    BYTE		= Flags
		    STRING00		= Manager Variable (remove %'s)
		    STRING00		= Driver Variable
		    STRING7F		= Attributes (seperate line each)
		    ...
		    STRING00

0x1a		Configure ODBC Data Source
		    BYTE		= Flags
		    STRING0		= Driver Variable (remove %'s)
		    STRING0		= "DSN=" + Manager Variable + "." +
					  Attributes

0x1c		Add Text to INSTALL.LOG	
		    STRING0		= Text

0x1d		Rename File/Directory
		    STRING0		= Old Pathname
		    STRING0		= New Pathname

0x1e		Open/Close INSTALL.LOG
		    BYTE		= Flags
		    STRING00		= Pathname


Other functions:
0		Add Directory to Path
		    STRING0		= Directory

1		Add to AUTOEXEC.BAT
		    STRING7f		= Flags
		    STRING7f		= dunno. never used. (file to edit?)
		    STRING7f		= New Text
		    STRING7f		= Search Text
		    STRING7f		= Comment Text
		    STRING00		= Line Number

2		Add to CONFIG.SYS
		    STRING7f		= Flags
		    STRING7f		= dunno. never used. (file to edit?)
		    STRING7f		= New Text
		    STRING7f		= Search Text
		    STRING7f		= Comment Text
		    STRING00		= Line Number

3		Add to SYSTEM.INI	
		    STRING00		= Device

8		Read INI Value
		    STRING7f		= Flags
		    STRING7f		= Variable
		    STRING7f		= Pathname
		    STRING7f		= Section
		    STRING7f		= Item
		    STRING00		= Default

9		Get Registry Key Value
		    STRING7f		= Flags
		    STRING7f		= Variable
		    STRING7f		= Key
		    STRING7f		= Default
		    STRING00		= Value Name

10		Register Font
		    STRING7f		= Filename
		    STRING00		= Font name

11		Win32 System Directory
		    STRING00		= Variable

12		Check Configuration
		    STRING7f		= Flags
		    STRING7f		= Message
		    STRING00		= Title

13		Search for File
		    STRING7f		= Flags
		    STRING7f		= Variable
		    STRING7f		= Pathname List
		    STRING7f		= Default
		    STRING00		= Description

15		Read/Write File Data
		    STRING7f		= Flags
		    STRING7f		= Pathname
		    STRING7f		= Offset
		    STRING00		= Max Length

16		Set Variable		
		    STRING7f		= Flags
		    STRING7f		= Variable (remove %'s)
		    STRING0		= Value

17		Get Environment Variable
		    STRING7f		= Flags
		    STRING7f		= Variable
		    STRING7f		= Environment
		    STRING00		= Default

19		Check if File/Dir Exists
		    STRING7f		= Flags
		    STRING7f		= Pathname
		    STRING7f		= Message
		    STRING00		= Title

20		Set File Attributes
		    STRING7f		= Flags
		    STRING00		= Pathname

21		Set Files/Buffers
		    STRING7F		= Minimum Files
		    STRING00		= Minimum Buffers

22		Find File in Path
		    STRING7F		= Flags
		    STRING7F		= Variable (remove %'s)
		    STRING7F		= Pathname List
		    STRING7f		= Default
		    STRING7F		= Search Directories
		    STRING00		= Description

23		Check Free Disk Space
		    STRING7f		= Flags
		    STRING7f		= Total space required (not used)
		    STRING7f		= Status
		    STRING7f		= Variable1SPACEVariable2SPACEVariable3
		    STRING00		= VARIABLENUMBER SPACE SIZEINBYTES,comma seperated list of crap SPACE
					  VARIABLENUMBER SPACE SIZEINBYTES,....

					(where is the "Component" section?)

25		Insert Line into Text File
		    STRING7f	        = Flags
		    STRING7f		= Pathname
		    STRING7f		= New Text
		    STRING7f		= Search Text
		    STRING7f		= Comment Text
		    STRING00		= Line Number

27		Parse String
		    STRING7f		= Flags
		    STRING7f		= Source
		    STRING7f		= Pattern
		    STRING7f		= Variable1
		    STRING00		= Variable2

28		Allow Floppy Disk Change

29		Self-Register OCXs/DLLs
		    STRING7f		= Flags
		    STRING00		= Description

30		Install DirectX
		    STRING7f		= Flags
		    STRING7f		= DirectX Pathname
		    STRING7f		= Setup Pathname
		    STRING00		= Extra Flags

33		Read/Update Text File
		    STRING7F		= Flags
		    STRING7f		= Variable (remove %'s)
		    STRING7f		= Pathname
		    STRING00		= ??? (not used)

34		Post to HTTP Server
		    STRING7f		= Flags
		    STRING7f		= URL
		    STRING00		= Text (seperate into seperate "Text" fields for each line)







