This was a request from a customer, the feature that does not exist in protection. I will show how it can be implemented via plugins system.
Enigma Protector has an option that allows to run external file when trial has expired. The option names "TRIAL CONTROL - Common - Open file if trial is expired". Customer asked for a way to run the file when the trial is active. This feature is well suitable for plugins.
To create a plugin, do the following:
- - To create a plugin dll I recommend to use freeware Lazarus (for x86 or for x64), this is a pascal compiler that allows us to compile a dll file. Download it and install https://www.lazarus-ide.org/
- Download the sources of plugin attached to this post, open it in Lazarus, change if needed, compile a plugin dll
- Put the compiled dll to the "plugins" folder of installed Enigma protector and restart it. If everything is well, the plugin should be shown at Miscellaneous - Plugins panel. Enable it.
- Then protect the file. The plugin functions will be called by protection while the file is running
Code: Select all
procedure Enigma_Plugin_OnInit;
begin
// This function is calling when the protected file is being initialized
// when main program is not initialized yet
// Check if application is registered.
// If it is not registered then the trial period is going,
// So run the file.
if not EP_RegLoadAndCheckKey then
begin
ShellExecuteW(0, 'open', 'myexe.exe', nil, nil, SW_SHOW);
end;
end;
You could change the sources to use any custom file name (it could be not only exe, but any other kind of documents too).