Licensing Multiple Programs
Previous Top Next


Senerio: You have 3 programs which you want to sell to a user as a single package.

Consider three programs which you would like to sell as a single purchase with a single license key to authorize all 3.

a.exe
b.exe
c.exe


Option 1: Link all programs into a single EXE which provides a license "gateway" to the sub-programs.

For this strategy, you must create a 4rth program, let's call it master.exe

The job of master.exe is simply to execute any command passed to it on the command line. For example in C++, the main function would look like this:

void main(int argc, char **argv)
{
if (argc>1) // if command-line supplied
system(argv[1]); // execute command-line program name
}

Now build a Thinstall project, where master.exe is the "input EXE" and a.exe, b.exe, and c.exe are virtual files. You should enable " License System 2" for this project so that master.exe is protected using licensing conditions. Because a.exe, b.exe, and c.exe are virtual files, they cannot be run except through master.exe. master.exe will not run unless licensed so they are protected by the same license conditions as master.

Because this scenario could potentially allow the user to execute other commands not in your package, you should either:
1. Make sure argv[1] is "a.exe", "b.exe", or "c.exe"
or
2. Make sure Thinstall does not load external EXEs (default is "do not load" for all Thinstall projects). If Thinstall loads external EXEs the user might replace them with a program that copies your virtual files outside of the package. See this page for more details.


To allow the user to have access to programs a.exe, b.exe, and c.exe you should add 3 StartMenu Shortcuts during installation. The shortcuts will have a target that looks like this:

"%InstallPath%\master.exe" a.exe
"%InstallPath%\master.exe" b.exe
"%InstallPath%\master.exe" c.exe

(note the quotes are recommended because %installpath% may expand to a path with spaces in it)

Advantages to this method:
Any shared DLLs or virtual data files can be shared among all 3 programs without extraction or duplication.
Future updates of your program only requires replacing a single EXE
Installation is not required - all programs can potentially be accessed through master without installation.

Disadvantages to this method:
The user cannot run a,b, or c directly from the command-line unless he/she knows to pass the correct parameters to master.exe



Option 2: Create 3 Thinstall project files for a.exe, b.exe, and c.exe

For this strategy, you protect a.exe, b.exe, and c.exe separately. By using the same password for "License System 2", all programs will share the same "current license key". If a license key is entered for a.exe, then b.exe and c.exe will see and use this new license key the next time they are run. For example:

1. You distribute a.exe, b.exe, c.exe separately using a ZIP file, 3rd party installer, or by:
> build a.exe with Thinstall's Installer enabled
> add b.exe and c.exe to your project for a.exe (at this point b.exe and c.exe should be protected separately using Thinstall License System 2)
> set b.exe and c.exe to " Extract on Install" - This allows the user to run the files directly from the hard drive or StartMenu shortcut.

When the user runs any of the 3 programs, he / she will be prompted for a license key. Once the license key has been entered for one program, the other programs will automatically use this license key and not prompt the user. By changing the password for b.exe or c.exe you can require more than one license key.

Advantages to this method:
The user can run programs a,b, and c directly from the command-line

Disadvantages to this method:
If a,b, and c share common DLLs or virtual data files - there will be wasted space with 3 copies of these DLLs.
3 programs must be maintained on the user's machine for future updates.
Installation is required so that b.exe and c.exe can be extracted.
Build and setup procedure is more complex because you must compile 3 Thinstall EXEs instead of one.