Use command line interface to automate protection process
SYNTAX: <full path to PC Guard> <options> <project filename>
Option Description
-PROCESS Automatically process project file submitted from command line
-SILENT Don't show any messages and prompts
-SAVE Save project settings after protection process
-PROGID [Program ID] Program ID value
-APPNAME [Application name] Application name
-APPSIGN [Application signature] Application signature
-FILE [Application filename] Application filename
-OUTPUT [Output filename] Output filename
-BACKUP [Backup filename] Backup filename
-REPORT [Report filename] Report filename
-PASSWORD [Password] Password value (password protection feature)
-LANG [Language] Project language
-UNAME [User name] User name
-UADDRESS [User address] User address
-UCOMPANY [User company] User company
-UINFO1 [User info 1] Custom user information 1
-UINFO2 [User info 2] Custom user information 1
-UINFO3 [User info 3] Custom user information 1
-CC1 [Counter] -CC10 [Counter] Custom counters 1 - 10
-SNSEED [Seed] Serial numbers seed value
-SNFILE [Output filename] Serial numbers output filename
-SNFIRST [ID] First serial number to generate
-SNLAST [ID] Last serial number to generate
-SNGEN Generate serial numbers from command line
-UPDATEID Application update id value
-SKIPAP Skip already protected applications
-ACENPWD [Password] ACEN server password (web licensing)
 

Notes

- Protection process can be automated by submitting project filename and -PROCESS options from command line. Once protection process is tested you can use -SILENT option to prevent displaying of information and confirmation messages by PC Guard.

- PC Guard will return errorlevel code to command processor. In case of successful protection zero (0) will be returned. Standard Windows error code will be returned otherwise.

- All parameters with spaces should be enclosed in double quotes (").

- Each parameter from command line will overwrite appropriate parameter from project file. 

Important: Be sure to test protection process before using -SILENT switch.

Using batch files

Batch files can be used for automating protection for a group of applications.

Here is an example batch file which will protect main application (test.exe) and its module (test.dll ) with appropriate project files (example1.prj for test.exe and example2.prj for test.dll) :

@echo off

set PCGUARD="C:\Program Files (x86)\PC Guard for Win32\pcguard.exe"

rem c:\test\test.exe is protected and output file c:\output\test.exe is created

%PCGUARD% -process -file c:\test\test.exe -output c:\output\test.exe "c:\my projects\example1.prj"

rem c:\test\test.dll is protected and output file c:\output\test.dll is created

%PCGUARD% -process -file c:\test\test.dll -output c:\output\test.dll "c:\my projects\example2.prj"

if errorlevel 1 goto protection_error

echo Protection OK!

goto end

:protection_error

echo Problems detected!

:end