GN4 applications command line parameters

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 12:56

When creating shortcuts for GN4 applications, you may want to use command line parameters for specific options.

EXAMPLE

C:\tera\GN4\main\bin64\Fred4.exe /srvname:"main daily" /showexceptions /noaddinsautoupdate /nocheck

PARAMETERS

/srvname: connection_name or /srvname: "connection_name"

Runs the application and connects to the connection_name. The connection_name must exist in the UserConfig.xml. If it is multi-word, enclose it in double quotes.

Ensure there is NO SPACE between /srvname: and connection name. Ensure that there is A SPACE between the second double quote in the connection name and the next parameter.

/noaddinsautoupdate

Prevents updating of local add-ins with the ones in database.

Note: locally installed add-ins will be updated only if the database ones are newer, and if the database contains add-ins.

/showexceptions

Enables automatic display of exceptions in a modal dialog box. It is recommended

exception2

/logexceptions

Enables local logging of exceptions. See Logging GN4 system exceptions in a local file.

/safe

Runs the application in safe mode, in particular do not attempt to load add-ins. This will seriously restrict the functionality available.

/nosplash

No splash screen is show on startup.

/nocheck

No check for fonts/color profiles is performed.

/showcontextid

Show in a message box the help context id for dialogs (this is to be used only by Miles 33 staff).

Examples

These examples show the content to enter in the Target box on the Shortcut tab of the Shortcut property sheet:

Use this shortcut string to connect to the GN4 connection selected as default, hiding exceptions:

C:\TERA\GN4\main\bin\Fred4.exe

Use this shortcut string to connect to the GN4 connection named "main daily", independently of that was selected as the default connection, hiding exceptions:

C:\TERA\GN4\main\bin\Fred4.exe /srvname:"main daily"

Use this shortcut string to connect to the GN4 connection named "main daily", independently of that was selected as the default connection, forcing to show exceptions:

C:\TERA\GN4\main\bin\Fred4.exe /srvname:"main daily" /showexceptions

Use this shortcut string to connect to the GN4 connection named "main daily", independently of that was selected as the default connection, forcing to show exceptions, and using locally compiled add-ins (this is useful for super users who compile add-ins on their local machine and want to test them before loading them in database:

C:\TERA\GN4\main\bin\Fred4.exe /srvname:"main daily" /showexceptions /noaddinsautoupdate

Examples for ClickOnce (version 2.0 or newer)

Add the switch, replacing the slash with the interrogation mark, to the shortcut string of the ClickOnce call, e.g. for the Fred ClickOnce call http://main.teradp.com/GN4clickonce/Fred4.application add
?showexceptions=true to show the exceptions.

Example:

http://main.teradp.com/GN4clickonce/Fred4.application?showexceptions=true