Specifying Parameters on the Command Line

Return to Introduction  Previous page  Next page

TN3270 Plus supports the following command line switches. Use the command line switches to control what TN3270 Plus does at startup when you start it from a batch file or shortcut.

 

/Session session_namespecifies the session to connect. Where session_name is the session name. If session_name contains embedded spaces it must be enclosed in double quotes.

 

/Host xx.xx.xx.xx[:port]is the IP address and optionally the port number of the host. If the port number is not specified it defaults to 23.

 

/Script script_name specifies a script to run after the session specified in "/Session" or /Host is connected. Where script_name is the name of the script. If script_name contains embedded spaces it must be enclosed in double quotes.
 
/Hidden start TN3270 Plus in a hidden window. This option is useful if you are starting TN3270 Plus from a WinHLLAPI application and do not want users to be able to see the TN3270 Plus window. 

Session Switch Example:

When the "/Session" switch is included, TN3270 Plus connects to the specified session when it starts.

 

Windows 10 (32-bit), 8 (32-bit), 7 (32-bit), XP and Windows Server 2008(32-bit), 2003 and 2000.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" /Session "P/390 27x132"

 

Windows 11, 10 (64-bit), 8 (64-bit), Windows Server 2022, 2019, 2016, 2012, Server 2008 (64-bit), 7 (64-bit) and Vista (64-bit).

 

"C:\Program Files (x86)\SDI\TN3270 Plus\tn3270.exe" /Session "P/390 27x132"

 

 

Where:        

P/390 27x132        is the session name.

Tips:

The session name is case sensitive.
If the session name contains any spaces, it must be enclosed in double quotes as in the example above.

 

Host Switch Example:

When "/Host" switch is included, TN3270 Plus connects to the specified IP address on the specified port number.

 

Windows 10 (32-bit), 8 (32-bit), 7 (32-bit), XP and Windows Server 2008(32-bit), 2003 and 2000.

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" /Host 192.168.1.5:23

 

Windows 11, 10 (64-bit), 8 (64-bit), Windows Server 2022, 2019, 2016, 2012, Server 2008 (64-bit), 7 (64-bit) and Vista (64-bit).
 

"C:\Program Files (x86)\SDI\TN3270 Plus\tn3270.exe" /Host 192.168.1.5:23

 

Script Switch Example:

When "/Script" switch is included, TN3270 Plus runs the specified script.
 

Windows 10 (32-bit), 8 (32-bit), 7 (32-bit), XP and Windows Server 2008(32-bit), 2003 and 2000.

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" /Session "P/390 27x132" /Script logon.txt

 

Windows 11, 10 (64-bit), 8 (64-bit), Windows Server 2022, 2019, 2016, 2012, Server 2008 (64-bit), 7 (64-bit) and Vista (64-bit).
 

"C:\Program Files (x86)\SDI\TN3270 Plus\tn3270.exe" /Session "P/390 27x132" /Script logon.txt

 

 

Where:        

 

P/390 27x132        is the session name.

logon.txt        is the script name.

 

Releases Earlier Than 2.4.0

TN3270 Plus releases earlier than 2.4.0 did not support command line switches. however, you could include a session name, script filename, web browser TN3270 command, web browser telnet command, domain name and port number or an IP address and port number on the command line. TN3270 Plus 2.4.0 still supports the older command line processing. For example:

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" "session_name"

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" "script_filename"

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" TN3270://hostname:port

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" TELNET://hostname:port

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" hostname:port

 

If a command line parameter is found, TN3270 Plus checks the parameter for a match in the following order:

 

1.Saved session name
2.Script filename
3.Web browser TN3270 command (TN3270://hostname:port/)
4.Web browser telnet command (TELNET://hostname:port)
5.If it's none of the above, then it's assumed to be a hostname:port.

 

Session Name Example:

When the session name is included, TN3270 Plus connects to that session when it starts.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" "P/390 27x132"

 

Where:        

P/390 27x132        is the session name.

 

Tips:

The session name is case sensitive.
If the session name contains any spaces, it must be enclosed in double quotes as in the example above.

 

Script Name Example:

When the script name is included, TN3270 Plus runs the specified script.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" "script.txt"

 

Where:        

 

script.txt        is the script filename.

 

Tips:

If the script filename contains any spaces, it must be enclosed in double quotes.

 

Web Browser TN3270 Command Example

This format is used when TN3270 Plus is specified as the default TN3270 application in your web browser options. When your web browser is pointed to a TN3270 URL, it starts TN3270 Plus with the URL on the command line. TN3270 Plus starts a TN3270 session for that URL.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" TN3270://TN3270site:23/

 

Web Browser Telnet Command Example

This format is used when TN3270 Plus is specified as the default telnet application in your web browser options. When your web browser is pointed to a telnet URL, it starts TN3270 Plus with the URL on the command line. TN3270 Plus starts a VT100 session for that URL.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" TELNET://TelnetSite:23/

 

Domain Name and Port Example:

When the domain name or IP address and port number are included, TN3270 Plus connects to the specified domain name or IP address on the specified port number.

 

"C:\Program Files\SDI\TN3270 Plus\tn3270.exe" domain.name:23

 


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.