Major feature release - include support files in encrypted package.

Apologies for the long line.

Get the small (20 Kb) executable kixcrypt.exe from here.
Get the small (20 Kb) console-less executable wkixcrpt.exe from here.

17 January 2003 Version 2.16b released
Phew, less than a month and another feature release. This release adds the second most requested feature - multiple file inclusion. This means that you can now bundle the KiXtart interpreter, ini files, registry dumps, additional scripts or whatever you fancy with the main script.
Changes
  • Bug fix: A variable scope error meant that files created in a temporary directory using the "-t" feature would not be deleted in some cases.
  • New feature: You may include any number of arbitrary files by using the "-f filename" option. You may repeat the "-f" option as many times as you like, up to a limit of 255 files.
  • New feature: Three environment variables are created when the script is decrypted. These are detailed below.
Additional Info
The "-f" option allows you to include arbitrary support files in the package. Note the following features and restrictions:
  • Support files will be unpacked into the same directory as the primary script file.
  • Path information is not kept - all unpacked files will be created in the same directory.
  • Support files are encrypted in the crypted.exe
  • Support files will be created with their original name. Only the primary script file will have a random name.
  • The primary script file is always the last file to be unpacked and the first to be deleted, to reduce the time it is visible in the file system.
  • Support files are not deleted until the primary file has finished executing, so may be visible in the file system for some time.
  • If there is already a file present with the name of the support file being unpacked the process will abort and remove all files unpacked so far. There is no option to overwrite existing files.
It is possible for the process decrypting the file to create them in a directory specified by the "-t" option.
This means that your own scripts may not know where to find the support files.
To get around this, the following environment variables are provided:
KIXCRYPTVER The version of KiXcrypt.
KIXCRYPTDIR The temporary directory that KiXcrypt is unpacking the files in.
KIXCRYPTFILE The full path name of the script being executed.
Note: Some of these values are now also provided by KiXtart macros in recent releases.
Example
The following example creates an encrypted version of the file "update.kix". There are two support files, "control.ini" and "update.gif" which are packaged with it.
code:
kixcrypt.exe update.kix -f control.ini -f splash.gif

When the crypted.exe is run, it will unpack the three files into the current directory (or the directory defined by "-t"). The files "control.ini" and "splash.gif" will be created with their originbal names. The primary script file "update.kix" will be created with a random file name.

Here is a more complicated example:
code:
kixcrypt.exe update.kix -f control.ini -f spash.gif -f c:\winnt\kix32.exe "%%%%KIXCRYPTDIR%%%%\kix32.exe ^s"

This example will add the KiXtart executable to the file. The path will be lost, so the executable will be unpacked in the same directory as the primary script.
To be sure that your are running your version of kix32.exe, the command is defined at the end of the line - the "^s" will be replaced with the primary scripts random file name.
You must use the four "%%%%" characters to represent a single "%" in the final command line.
If you now execute the encrypted file with the command:
code:
crypted.exe -t c:\temp

The four files will be unpacked into the c:\temp directory (assuming no file already exists with the same name).
Assuming the primary script is created with the random file name "WSSHGSMO.kix" the command which will be executed is:
quote:
%KIXCRYPTDIR%\kix32.exe c:\temp\WSSHGSMO.kix