COMMAND LINE SYNTAX:

<full path to PC Guard main application> <options> <project filename>

COMMAND LINE OPTIONS:

-PROCESS
Automatically process project file submitted from command line.
 
-SILENT
Don't show any messages and prompts.
 
-SAVE 
ave 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
 
-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 2
 
-UINFO3 [User info 3] 
Custom user information 3
 
-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


NOTES:

- You can automate protection process by submitting project filename and -process (and -silent) options from command line.

- PC Guard will return errorlevel code to the 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. 

- Be sure to test protection process without -silent switch before enabling it.


EXAMPLE BATCH FILE:

@echo off

set PCGUARD="C:\Program Files\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:\program files\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:\program files\my projects\example2.prj"

if errorlevel 1 goto protection_error

echo Protection OK!
goto end

:protection_error
echo Problems detected!

:end

Knowledge base