Home Page
        Orders     Downloads     Support     Contact     Deutsch
ZOC Terminal is a professional SSH Client and Terminal Emulator for Windows and macOS.
ZOC Online Help Topic:

Starting ZOC (Command Line Parameters and Environment) → Command Line Parameters

There is a wealth of parameters that can be specified in the command line, in the icon's parameter field (Windows only) or via one of the Command Line Files (Windows and macOS). These parameters are mostly intended to make ZOC perform tasks automatically after starting.

Note: In addition to calling ZOC with the command line parameters below, you can also use the command line conversion tools ssh.exe and telnet.exe which are located in the ZOC program folder and which accept command line parameters compatible with OpenSSH and Windows Telnet. For more information, please start these tools with a -? parameter.
 

ZOC [/CALL:<host name>] [/CONNECT=<connection-type>!<host>]
[/DEV:<connection-type>] [/EMU:<emulation>]
[/FI:<fontname>] [/FX:<fontname>]
[/FORCEASIANFONTS] [/FORCENOASIANFONTS]
[/KEY:<file>]
[/LANG:<language>]
[/MIN] [/MAX] [/NUMLOCK:<n>]
[/MOUSEPOS:<x>,<y>]
[/O:<seesion profile>]
[/HOSTDIR:<host directory file>]
[/PROGCFG:<program settings file>]
[/RESTRICT:n]
[/RUN:<scriptfile>] [/RUNARG:<text>]
[/RLOGIN:<host>[:<port>]]
[/SSH:[<login>@]<host>[:<port>]] [/SSHKEY:<private keyfile>]
[/STANDALONE]
[/TABBED]
[/TELNET:<host>[:<port>]]
[/TT:<file>] [/U] [/WD:<workdir>]
[/WINPOS:<x>,<y>,<width>,<height>]

Parameters can be entered from a Windows command prompt or added to the target field of a Windows desktop shortcut icon. For example, if you wanted to create an icon that starts a ZOC connection, right click the desktop, choose New→Shortcut and enter something like:
"c:\program files\zoc8\zoc.exe" /TELNET:hogwarts.edu

Please note the quote characters which are necessary because of the space character in "Program Files". Parameters themselves need also to be enclosed by quotes if they contain space characters, e.g.
"c:\program files\zoc8\zoc.exe" "/CALL:New Mail Server" or
zoc "/EMU:Ansi BBS"

Normally the current working directory is ignored by ZOC (see Working Directory), but in command line parameters you can use the directory which was the working directory at startup, by using the placeholder %CURDIR%, e.g. /O:%CURDIR%\test.zoc

As an alternative to the Windows command line parameter format (as indicated above), it is also possible to specify command line parameters in Unix style, parameters starting with dash rather than the Windows typical slash and providing parameter values separated by a space character rather than using the colon. Thus the following command line calls are equivalent:

ZOC /MIN /RUN:test.zrx or ZOC /MIN "/CALL:Office Router"
ZOC -min -run test.zrx or ZOC /MIN -call "Office Router"

 

 

Description of Commandline Parameters

       
/CALL:hostentry
 

This is a name of a host from the host directory to be called after startup, e.g. ZOC /CALL:CoolServer

/CONNECT=<connection-type>!<host>
 

This option allows the caller to connect to an arbitrary host via an arbitrary connection method (device) from the command line.

The connection type parameter specifies the name of a connection method as listed in ZOC's connection dialogs. The host parameter is a destination in the context of the connection method, e.g. an internet host name, ip-address or telephone number (host names can have a port number appended to them after a colon).

If the connection type is SSH (Secure Shell), you can specify an username and password in the form <username>:<password>@<host>,e.g.
ZOC /CONNECT=SSH!joedoe:secret@myhost.secure.com
(For authentication with key files from the command line, please see the SSH and SSHKEY parameters below.)

For the RLOGIN communication you can use <username>@<host>.

/DEV:connection-type
 

You can use this option to tell ZOC to activate a specific connection method at startup. Supply the name of the connection type as shown in Options→Session Profile→Connection Type, e.g. ZOC /DEV:TELNET

If necessary, you can append connection type sub-options (as described in the ZocSetDevParm REXX command) to the connection type name, separated by an @ character:

ZOC "/DEV:SERIAL/MODEM@COM3:57600-8N1|9|350" (please be aware that strings which contain the vertical bar character must be enclosed in quotes).

/EMU:emulation
 

This command line parameter activates the given terminal emulation, e.g. ZOC /EMU:VT220

/FI
 

Normally ZOC checks the whole list of fonts to see which fonts it can use. This list might include fonts that you do not want to use. When started with the /FI (Font-Inclusion) option, ZOC will only use fonts, who's names match the name given with /FI, for example if you start ZOC as ZOC "/FI:Courier New", ZOC will only offer the Courier New font in its font list. You can select multiple fonts this way.

Important: You should make sure that at least one of these fonts is available and suitable for use with ZOC, otherwise ZOC will exit with a Panic message.

/FX
 

The /FX option is similar to /FI, except that ZOC will use all suitable fonts, except the ones listed with /FX, for example to use all fonts except the Terminal fonts, start ZOC as ZOC /FX:Terminal.

/FORCE[NO]ASIANFONTS
 

Under Windows ZOC excludes specific Asian fonts (like SimSun or BatangChe) from the font list if the system language is English or German. With these options, the Asian fonts are forced to be included or excluded.

/KEY:file
 

This option tells ZOC to load a specific key mapping file at startup, for example ZOC /KEY:Alternate.zky

/LANG:language
 

This option can be used to switch the program language between German (/LANG:GER) and English (/LANG:ENGL).

/MIN
 

Start ZOC with the window minimized.

/MAX
 

Start ZOC with the window maximized.

/MOUSEPOS:x,y
 

Moves the mouse to the given pixel position, e.g. /MOUSEPOS:1024,768 (Windows only)

/NUMLOCK:n
 

You can use this option if you want to start ZOC with the NumLock key set to on (n=1) or off (n=0). (Windows only)

/O:file
 

With this option, you can tell ZOC to load a specific session profile instead of the normal Standard.zoc file: ZOC /O:BlackGlass.zoc

/HOSTDIR:file
 

This is the name of an alternate host directory to load. The startup default is HostDirectory.zhd

/PROGCFG:file
 

Using this option allows you to specify an alternate name for the file that contains the program settings (default is Standard.zfg).

/RESTRICT:n
 

This option allows you to restrict access to certain parts of ZOC (for example if you use ZOC in an pre customized environment).

This option is provided for backward compatibility only, please use the Admin.ini file instead (see the ZOC program directory for an example).

/RUN:scriptname
 

With this option, you provide a REXX program to be executed after start, e.g. ZOC /RUN:PROCESS.ZRX. ZOC will look for the file in the designated scripts folder (Options→Program Settings→Folders), ZOC configuration folder (ZOC8 Files) or program installation folder.

Alternately a path can be specified, for example ZOC /RUN:C:\SCRIPTS\NIGHTCALL.ZRX. Please note that in case of paths that contain space characters, you will need to enclose the whole expression in quotes: ZOC "/RUN:C:\My Scripts\AutoCall.zrx".

If the REXX program expects a parameter which accessed inside the script as parm= ARG(1), the argument can be provided via /RUNARG like this: ZOC /RUN:DOIT.ZRX "/RUNARG:HELLO WORLD"

Note: This /RUN parameter can not be used together with other parameters that initiate a connection (e.g. /TELNET, /CONNECT, …). In these cases please use the /RUN parameter and initiate the connection from within the script via ZocConnect or similar commands.

Note: Please also check the /U parameter below.

/RLOGIN:dest
 

Short form for /CONNECT=RLOGIN!<username>@<host>:<port> (see above), e.g. ZOC /RLOGIN:harry@hogwarts.edu

/STANDALONE
 

Under the Windows operating system, the parameter will cause the ZOC window to separate itself from other ZOC windows. Technically this means that the window and its sessions will run in their own process space (e.g. in the task manager you will see one zoc.exe per window). This means that a crash in one window will not affect others, but this also limits some functions, e.g. tabs can not be dragged/dropped between windows.

Note: In order to affect all instances of ZOC, this parameter should typically be provided through the commandline.ini file.

/TABBED
 

When this parameter is provided on the command line together with a parameter that initiates a connection (e.g. /CONNECT, /TELNET, /SSH, etc.) or together with the /RUN parameter, it will attempt to open a new tab in an existing ZOC window. Otherwise (without /TABBED) a new window for each call. Also, you can use the /TITLE:<name> parameter in conjunction with /TABBED to set a name for the new tab.

/SSH:dest
 

This is a short form for /CONNECT=SSH![<username>[:<password>]]@<host>:<port> (see above). Syntax variants are
ZOC /SSH:sshsrv.hogwarts.edu or
ZOC /SSH:harry@secure.hogwarts.edu
ZOC /SSH:harry:secret@ssh.hogwarts.edu:10022
zoc -ssh harry@secure.hogwarts.edu
zoc -ssh harry@secure.hogwarts.edu 10022

/SSHKEY:file
 

In conjunction with the /SSH parameter, it is possible to provide the name of a private key file by using the /SSHKEY parameter. The value can be either the name of a private key file in the ZOC SSH directory or a fully qualified path:
ZOC /SSH:harry@secure.hogwarts.edu /SSHKEY:id_dsa

Alternately the key file can be provided into the /SSH parameter directly, by appending it to the password with an extra colon:
ZOC /SSH:harry:secret:id_dsa@secure.hogwarts.edu or
ZOC /SSH:harry::id_dsa@secure.hogwarts.edu

/TELNET:dest
 

This option is a short form of /CONNECT=TELNET!@<host>:<port> nd tells ZOC to connect to a Telnet host after starting up, e.g. ZOC /TELNET:docsrv.hogwarts.edu
ZOC /TELNET:192.168.0.5:110
ZOC -telnet login.hogwarts.edu smtp.

/TT:file
 

This option tells ZOC load another character translation table at startup, for example ZOC /TT:SCAND.ZTR.

/U
 

This option specifies unattended mode. In unattended mode ZOC suppresses request boxes like "Are you sure" and uses their default answers instead.

This way the program will not hang if something unforeseen happens when you run it in the middle of the night to fetch your mail.

/WD:folder
 

This option specifies the working directory where data files are expected (options, etc.). See also Data Folder Selection.

/WINPOS:x,y[,width,height]
 

The /WINPOS parameter allows to control where and how large the ZOC window will open. x/y are screen pixels from the upper left corner, optional width/height are the width and height of the window.

Upon startup, ZOC can modify the width/height values according to the layout options in the session profile (e.g. to match the required matching font size).

 

 
← Back to Starting ZOC (Command Line Parameters and Environment)

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel