- Syntax 1:
-sfx -template - Syntax 2:
-sfx archive {options}
This command allows to create a self-extracting archive from an existing ZIP archive. This command has a wide set of options that are the same you can find in the SFX wizard of ZipGenius.
The first syntax of this command writes a template options file on the desktop, so you can easily modify that upon your requirements and use it through the "@" parameter (as explained below); on the contrary, the second syntax is the true command line syntax where you can directly specify which options should be used while converting the ZIP file to EXE.
An option file is a plain text file (with .SOF extension) that contains the following settings: it is useful when you need often to convert a ZIP file to EXE, because you can reuse it at anytime you need.
.SOF options file parameters |
|
The alternate way to convert a ZIP file to an executable one, is to use the second syntax of -SFX; in this case you can specify more options and you can still use an existing options file (.SOF). The parameters you can specify for -SFX command are similar to those you can specify for -ADD.
W(path) |
This parameter lets you specify the .BIN module you want to use to do the conversion. SFX modules (.BIN files) differ for the language used in the dialogs.
If you want to know which .BIN files are available, use the following parameter (all other switches will be ignored): W? If the specified .BIN file can't be found, the program will automatically use the english.bin installed by ZipGenius. |
N(text) |
If you want to show a message upon SFX startup, use "N" followed by your message (see example below); if you don't want any message to appear, just omit this parameter. Messages bust be inserted between quotes ("). See also the "M" parameter. Example: N"This is a very long message with spaces between. As you can see, it is written between quotes." |
M[ 0 | 1 | 2 ] |
If you have used the "N" parameter to show a message on SFX startup, you can also set which type of message to show by setting one of the following values for "M":
The default value is M0 and it will be automatically selected if "M" is not specified. Also, this parameter will have no effect if your command line misses the "N" parameter. |
T(title) |
This parameter lets you specify the title for your SFX dialog. If "T" is not specified, a generic title will appear on top of your SFX dialog. |
L[ 0 | 1 ] |
This parameter will allow end-user of the SFX to select which files to extract. Possible values for "L" are:
If not specified in the command line, the program will automatically set this parameter to L0. |
B[ 0 | 1 ] |
This parameter lets you set the visibility of the overwrite mode selector box in the SFX dialog. The end-user of your SFX won't be allowed to set the behaviour that the SFX must have when it is going to extract files already existing in the destination path. Possible values of "B" are:
If not specified, this parameter will be automatically set to B0. |
O[ 0 | 1 | 2 ] |
This parameter lets you set the overwrite mode that SFX must apply when it is going to extract files that already exists in the destination path. If it is used when "B1" is specified, the end-user won't be allowed to modify the overwrite mode. "O" may assume one of the following values:
If not specified, this parameter will be automatically set to O0.
|
D(path / registry key) |
This parameter lets you specify the default extraction path that will appear in SFX dialog window. The "D" parameter may be followed by a real path name, by a Windows Registry key that returns a path or by an environment variable in the "%...%" form.:
While the first form of path is quite simple to specify, it is just useful when your SFX is going to be used by yourself or by someone whose computer has a path structure that you already know. On the contrary, if you want to get your files extracted in specific paths that are common to every Windows but that may be "phisically" different, you can use the other two forms. These usually require a good knowledge of Windows® operating systems and its registry structure, but you can still find more details in "Creating a self-extracting archive" section. |
U(folder name) |
This parameter lets you specify the subfolder where your files will get extracted to. The folder will be created in the path specified through the "D" parameter. |
V[ 0 | 1 ] |
This parameter lets you specify whether your SFX archive should expand "%...%" environment variables written in the "D" parameter. Possible values of "V" are:
Default value of "V" V1 and it will be used if "V" won't be specified. |
H[ 0 | 1 | 2 ] |
This parameter lets you set the SFX files list visible or hidden or just initially hidden. Possible values of "H" are:
Default value is H0. |
A[ 0 | 1 ] |
This parameter lets you set the SFX to autorun files extraction without user interaction. Possible values are:
If not specified in the command line, the program will use the default value (A0). |
I(.ICO file path) |
This parameter lets you specify the path of the custom icon you may want to show in the SFX dialog window. The icon file must be an .ICO file. |
C(file) |
This parameter lets you specify which file must be executed after files extraction. |
K(command line parameters) |
This parameter lets you specify additional parameter to run the file specified in "C". You should used quotes (") to write long command lines. |
S[ 0 | 1 ] |
This parameter lets you set your SFX to show a "success message" after files extraction. Possible values are:
Default value is S1. |
R[ 0 | 1 ] |
This parameter lets you set your SFX archive to allow end-user to disable the autorun of a file after extraction (see parameter "C" ). Possible values are:
Default value is R0. |
E[ 0 | 1 ] |
This parameter lets you allow your SFX end-user to abort extraction. Possible values of "E" are:
The default value is E1. |
@(file .SOF) |
This parameter tells to the program to load SFX settings from a previously stored .SOF file (a ZipGenius SFX options file). Any other parameter will be ignored in this case. |
Examples:
1) zg -sfx test.zip
This is the minimum number of parameters required by -sfx: test.zip will be converted to test.exe and just using all the default parameters values.
2) zg -sfx test.zip W#italiano.bin T"This is my archive SFX" S0
Like example (1), but this time we are going to use the italian .BIN file installed by ZipGenius, a message will appear at SFX startup and no message will appear after files extraction.
Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation