Did you know there are command-line interface options available for applications protected by PC Guard? These options provide a powerful mechanism for managing licensing, activation, and configuration externally without direct user interaction with the application's GUI. All command-line options are case-sensitive and are enabled by default, though their parameters can be customized.
Key capabilities include invoking the activation dialog, overriding default file paths for logs and licenses, setting serial numbers, and automating the entire activation process. The -PCG_CL_AUTO_ACTIVATE option is central to automation, especially when used in conjunction with -PCG_CL_SN for web licenses or with -PCG_CL_CLIENT_ID and -PCG_CL_ORDER_ID for standard licenses. Other functionalities include retrieving machine-specific codes, setting the user interface language, and removing existing licenses. Certain options are context-dependent; for example, some are only effective on locked applications, while others require specific protection methods (like REMOTE protection) or enabled features (like license removal).
Command-Line Option Management
The command-line interface options for a protected application are managed within the PC Guard software. Users can select an option from a list to edit its default parameter name or to enable/disable it. By default, all options are enabled.
- "Restore all" button: Resets all command-line options to their default values.
- "Restore" button: Resets only the currently selected option to its default value.
IMPORTANT: All command line options are case-sensitive.
Command-Line Option Reference
The following table provides a summary of the available command-line options for protected applications. Each option is described in detail in the subsequent sections.
| Option | Description |
| -PCG_CL_SHOW | Invokes the activation dialog from the command line. |
| -PCG_CL_LOGFILE | Overrides the default log filename and location. |
| -PCG_CL_ACTFILE | Overrides the default activation filename and location. |
| -PCG_CL_SRVFILE | Overrides the default server configuration filename and location. |
| -PCG_CL_SN | Sets the serial number from the command line. |
| -PCG_CL_AUTO_ACTIVATE | Automatically activates or reactivates a web license. |
| -PCG_CL_GET_SITEMID | Gets site and mid codes from the command line. |
| -PCG_CL_LANGUAGE | Sets the default user interface language. |
| -PCG_CL_REMOVE_LICENSE | Removes the license for a previously activated application. |
| -PCG_CL_CLIENT_ID | Sets the ACEN (Activation Center) client ID from the command line. |
| -PCG_CL_ORDER_ID | Sets the ACEN Order ID from the command line. |
| -PCG_CL_LICENSE_NOTE | Sets the ACEN license note from the command line. |
-PCG_CL_SHOW
This option is used to invoke the activation dialog from the command line, applicable during the application's demo mode or after it has been activated.
- Behavior: When this option is used, the "Special key pop-up" setting is ignored, and the activation dialog is displayed regardless of the special key's status.
- Restrictions: This option will be ignored under specific advanced protection interface configurations. If the "Application will handle expired demo," "Application will handle expired license," or "Application will handle license management" options are enabled, the activation dialog will not be displayed in the corresponding scenarios (e.g., after a demo or license expires).
-PCG_CL_LOGFILE
Overrides the default log filename and location.
- Usage:
-PCG_CL_LOGFILE [Full path to log file] - Examples:
-PCG_CL_LOGFILE C:\test\test.log-PCG_CL_LOGFILE “D:\my application data\test.log”
- Notes:
- The full path must be enclosed in quotes if it contains space characters.
- The target directory for the log file must exist on the remote machine.
- The protected application must have appropriate access rights to write to the specified log file.
-PCG_CL_ACTFILE
Overrides the default activation filename defined in the project settings.
- Usage:
-PCG_CL_ACTFILE [Full path to activation file] - Examples:
-PCG_CL_ACTFILE C:\test\license.dat-PCG_CL_ACTFILE “D:\my application data\activate.dat”
- Note: The full path must be enclosed in quotes if it contains space characters.
-PCG_CL_SRVFILE
Overrides the default server configuration filename and its location. By default, the protection code looks for this file in the same directory as the protected application.
- Usage:
-PCG_CL_SRVFILE [Full path to server configuration file] - Examples:
-PCG_CL_SRVFILE C:\test\server.dat-PCG_CL_SRVFILE “D:\my application data\server.dat”
- Notes:
- The full path must be enclosed in quotes if it contains space characters.
- The directory containing the server configuration file must exist on the remote machine.
- Appropriate read access rights must be set for the file.
-PCG_CL_SN
Sets the serial number from the command line.
- Usage:
-PCG_CL_SN [serial number] - Example:
-PCG_CL_SN 1234-1234-12-1234-1234 - Notes:
- This can be used for both locked and already activated applications. If the application is already activated, the existing serial number will be replaced with the new one.
- If an invalid serial number is provided, it will be silently ignored without displaying an error message.
-PCG_CL_AUTO_ACTIVATE
Instructs the protected application to automatically attempt to activate or reactivate an ACEN standard/web license without displaying the activation dialog.
- WEB Licensing Automation: This option can be used with
-PCG_CL_SN [serial number]to fully automate the activation process from the command line. The serial number is set, and the protection code immediately attempts activation. - Reactivation: It can also be used to reactivate a license that was locked after being reset. The protection code will automatically connect to ACEN to reactivate. If the original serial number needs to be changed, it can be provided via the
-PCG_CL_SNoption, and the application will attempt to get a new license with the new serial.
-PCG_CL_GET_SITEMID
Obtains the current site and mid codes from the command line without displaying the activation dialog.
- Example:
-PCG_CL_GET_SITEMID > output.txt - Restrictions: This option is only valid for applications using the REMOTE protection method.
- Notes:
- Redirection to an output file is mandatory.
- The site and mid codes are written to the output file in the format
sitecode:midcode. - The protected application will automatically close after writing the codes to the file.
-PCG_CL_LANGUAGE
Sets the default language for the user interface.
- Usage:
-PCG_CL_LANGUAGE [Language name] - Example:
-PCG_CL_LANGUAGE German - Note: The "Language name" must exactly match the name of the language as defined in the language editor.
-PCG_CL_REMOVE_LICENSE
Removes the license for a previously activated application from the command line.
- Note: This option will only function if the license removal feature has been enabled for the protected application.
ACEN Activation Options
The following options are used specifically for the activation process with the ACEN (Activation Center).
- -PCG_CL_CLIENT_ID: Sets the ACEN Client ID.
- Usage:
-PCG_CL_CLIENT_ID [Client ID]
- Usage:
- -PCG_CL_ORDER_ID: Sets the ACEN Order ID.
- Usage:
-PCG_CL_ORDER_ID [Order ID]
- Usage:
- -PCG_CL_LICENSE_NOTE: Sets an ACEN license note.
- Usage:
-PCG_CL_LICENSE_NOTE [License note]
- Usage:
Combined Usage for ACEN Activation
- Context: These three options are only valid for a locked application, as their purpose is to provide data for the initial activation process. They have no effect if used on an application that is already activated.
- Automation Tip: These options can be used in conjunction with
-PCG_CL_AUTO_ACTIVATEto automate the activation of licenses using the standard licensing model. - Requirements: For automation, both the Client ID (
-PCG_CL_CLIENT_ID) and the Order ID (-PCG_CL_ORDER_ID) must be provided. The license note is not mandatory for this process.