PECompact Documentation

Graphical User Interface (pec2gui.exe)


The PECompact 2 GUI provides essential functionality in a point-and-click environment.
  1. The Main Window
  2. Settings Dialog
  3. CODEC Plug-In Selection Dialog
  4. API Hook Plug-in Selection Dialog
  5. Command Line Arguments

The Main Window

The main window has a list view that contains the current batch of files.



Right clicking  anywhere in the files list cause a popup menu to appear that duplicates much of the functionality of the buttons on the left. In addition, it contains the 'Remove' action that removes all selected items from the list. Items may also be removed by pressing the DELETE key when desired items are selected.



The Settings Window

Each item in the listview can have individual settings. Therefore, one must be aware that when they choose to modify the settings, they are doing so for the item(s) that are currently selected.

When an checkbox is checked and grayed, it means that PECompact2 should automatically determine the appropriate settings based on the file it is compressing.

Actions:

  • Compress

Compress modules with PECompact2.
 
 
  • Trim

Simply trim and realign modules.
 
 
  • Watermark

Must be used in combination with trim or compress. See PEWatermark.exe console mode application for more functionality.

This option causes a watermark to be embedded into the module. This watermark can later be retrieved for identification of the executable. The watermark is meant to persist through modifications to the module.
 


Documentation of configuration options is here.



Checkbox Settings

Automatic = Yes or No = Gray and checked.
On = Yes = Checked.
Off = No = Unchecked.

The CODEC Selection Dialog

The CODEC Selection Dialog allows for specification of which CODECs should be used on the target file(s) and in what order they should be used.

In the above example, files will be compressed with LZMA, then have a CRC32 test performed on them. At runtime, the decoding order is reversed so that the CRC32 check is performed, then the data is decompressed by LZMA.

See the CODEC plug-ins page for more information on the available CODECs.

Ordering is very important because it can affect compressibility and/or the desired output. See the CODEC Ordering section of the CODEC plug-ins page for more information.

API Hook Plug-in Selection Dialog

The API Hook Plug-in Selection Dialog allows for configuration of which API Hook Plug-ins should be attached to compressed modules. Any number of API Hook plug-ins may be used on a single compressed module.

Command Line Arguments for the GUI (pec2gui)

PLEASE READ: Console mode application command line parameters are listed here instead. The parameters listed here are compatible only with the GUI application.

The command line application is intended for use in win32 console mode, but the GUI itself supports a number of command line parameters to do things such load projects and files, auto begin compression, and initiate a check for updates.

The command line parameter specification for PEC2GUI is:

PEC2GUI [/Project=pathname] [/Auto] [/AutoStart] [/AutoExit] [/Update] [file1] [file2] [file3] [fileX] ...

You may specify on the PEC2GUI command line one or more files that you would like added to the files list view (the list of files to be compressed). In addition, the following parameters are supported:

GUI Parameter Default Example Description
/Project=file No project is loaded by default. /Project=c:\pec2\mysolution.pec2prj The project file whose pathname is provided is loaded into the GUI.
/Auto Disabled by default. /Auto
Indicates both /AutoStart and /AutoExit. See descriptions of those parameters.
 
/AutoExit
Auto exit is disabled by default.
 
/AutoExit When supplied, the GUI automatically exits after compression has finished.
/AutoStart
Auto start is not enabled by default.
 
/AutoStart When supplied, the GUI will automatically begin compression (or other designated operations) on the project file supplied by the /Project parameter, and/or on files provided on the command line.
/SetLang
Not set.
 
/SetLang
When supplied, the user is presented with a list of supported languages to choose from.
 
/Update Not set. /Update
Initiates a PECompact2 product update and exits when complete.
 

Examples:

PEC2GUI myfile.exe mydll.dll mydll2.dll
Starts the GUI and loads myfile.exe, mydll.dll, and mydll2.dll into the list view.

PEC2GUI /project=myproj.pec2prj
Starts the GUI and loads the project 'myproj.pec2prj'

PEC2GUI /project=myproj.pec2prj /Auto
Starts the GUI, loads the project 'myproj.pec2prj', automatically begins compression, and exits when complete. /Auto is the same as /AutoStart and /AutoExit combined.

PEC2GUI /project=myproj.pec2prj /AutoStart
Starts the GUI, loads the project 'myproj.pec2prj', automatically begins compression. It does not automatically exit when compression is complete because /AutoExit is not supplied.