HFS: Command line parameters: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This is a list of command line parameters you can use in HFS.
This is a list of command line parameters you can use in HFS.<br>
This is a quite advanced topic, so don't worry if you don't even know what a command line is.


This is a quite advanced topic, don't worry if you don't even know what a command line is.
; -a <FILENAME>
: Load an additional ini file, which will eventually overwrite settings in the main ini file.
: This file doesn't have to be a full ini, it can also be a single line.
: By using this feature you can change almost anything in HFS configuration at startup, because almost everything is saved in the ini file.
: Notice that you may not have a main ini file in the HFS folder. This is because the settings are saved in the registry; it's exactly the same mechanism.
: If the ''only one instance'' option is enabled, you can use -a to change run-time options.
: From version 2.1, there is an additional ini-command to be used combined with the -a parameter:
:*;load-tpl-from=FULLPATH:loads a template from the specified path.
: Please notice this is an ini-command, not a command line parameter. The parameter we are discussing is always '''-a'''.
: Here is an example of how to use the -a parameter. HFS is already running, the ''only one instance'' is enabled, and your goal is to switch the server off. All you have to do is to create a ''C:\foo.ini'' file with this content:
: <pre>HFS 2.0 - Build #032</pre>
: <pre>active=no</pre>
: Then you will execute
: <pre>hfs -a C:\foo.ini</pre>
: It should work.
: It is '''not''' necessary to match the exe version inside the ini. The version string is there to tell HFS how to interpret the commands, since some changes may go through different versions. Usually a newer HFS knows how to interpret old version ini commands.
: Since version 2.3 the first line with the version string will not be mandatory.


; -a <FILENAME>
; -c <INI COMMANDS>
: Load an additional ini file, that will eventually overwrite settings in the main ini file.
: Warning: this feature is available only since version 2.3
: This file has not to be a full ini, it can also be a single line.
: You can pass ini commands directly from the command line. If ''only one instance'' is enabled, this is the easy way to command HFS from the command line.
: Using this feature you can change almost anything on HFS configuration at startup, because almost anything is saved in the ini file.
: This is an example to switch off the server:
:
: <pre>hfs -c active=no</pre>
: Notice you may not have a main ini file just because it is saved in the registry: it's the same.
: To specify many commands, separate them by '''\n'''. Example:
: <pre>hfs -c active=yes\nport=8080</pre>


; -d <X>
; -d <X>
: Waits at start for <X> tenth of second.
: Waits at start for <X> tenths of second.


; -q
; -q
: Just quit. It is useful with "only 1 instance", because if HFS is already running, a call to hfs -q will cause the running HFS to quit.
: Just quit. This is useful combined with ''only one instance'' , because if HFS is already running, a call to hfs -q causes the running HFS to quit.


; -i <PATH>
; -i <PATH>
: load/save hfs.ini in folder <PATH>
: load/save hfs.ini in folder <PATH>

Latest revision as of 15:56, 26 January 2010

This is a list of command line parameters you can use in HFS.
This is a quite advanced topic, so don't worry if you don't even know what a command line is.

-a <FILENAME>
Load an additional ini file, which will eventually overwrite settings in the main ini file.
This file doesn't have to be a full ini, it can also be a single line.
By using this feature you can change almost anything in HFS configuration at startup, because almost everything is saved in the ini file.
Notice that you may not have a main ini file in the HFS folder. This is because the settings are saved in the registry; it's exactly the same mechanism.
If the only one instance option is enabled, you can use -a to change run-time options.
From version 2.1, there is an additional ini-command to be used combined with the -a parameter:
  • load-tpl-from=FULLPATH
    loads a template from the specified path.
Please notice this is an ini-command, not a command line parameter. The parameter we are discussing is always -a.
Here is an example of how to use the -a parameter. HFS is already running, the only one instance is enabled, and your goal is to switch the server off. All you have to do is to create a C:\foo.ini file with this content:
HFS 2.0 - Build #032
active=no
Then you will execute
hfs -a C:\foo.ini
It should work.
It is not necessary to match the exe version inside the ini. The version string is there to tell HFS how to interpret the commands, since some changes may go through different versions. Usually a newer HFS knows how to interpret old version ini commands.
Since version 2.3 the first line with the version string will not be mandatory.
-c <INI COMMANDS>
Warning: this feature is available only since version 2.3
You can pass ini commands directly from the command line. If only one instance is enabled, this is the easy way to command HFS from the command line.
This is an example to switch off the server:
hfs -c active=no
To specify many commands, separate them by \n. Example:
hfs -c active=yes\nport=8080
-d <X>
Waits at start for <X> tenths of second.
-q
Just quit. This is useful combined with only one instance , because if HFS is already running, a call to hfs -q causes the running HFS to quit.
-i <PATH>
load/save hfs.ini in folder <PATH>