Applications using Thinstall's installer can perform additional steps needed during installation by checking for the presence of the Environment Variable " TS_INSTALL=1" during execution. To install an additional 3
rdparty setup.exe program, for example:
WaitForSingleObject(pinfo.hProcess, INFINITE);
GetExitCodeProcess(pinfo.hProcess, &ecode);
If (ecode!=0)
show_error();
}
When your application is run the 1sttime after installation, the Environment variable TS_INSTALL will be set. This environment variable will be missing from subsequent runs of your application. Since Thinstall can execute EXE files bundled inside your archive, there is no need to extract the 3rd_party_setup.exe program to disk before executing it.
If your application is copied to a new computer and run, the installer will be invoked again, TS_INSTALL will be set on the first run - and you can be assured the 3rd_party_setup.exe program will be available because it is built into your EXE.