CreateProcess / ShellExecute Options
Previous Top Next


Note: This documentation page has been phased out as of version 2.519. To achieve the same functionality, please see documentation on External Module Loading .

Menu Item "Options -> CreateProcess / ShellExecute"

· Thinstall loads all EXEs (internal and external)
Thinstall will load EXEs located in the real filesystem as well as EXEs located in the virtual filesystem. This is useful if you plan to use ShellExecute to launch pre-installed programs and allow them to access your virtual files without having to extract them to disk.

· Thinstall loads only internal (bundled) EXEs.
Thinstall will only load EXEs that you have included in your project. This is useful if you want to ensure your files are never visible outside of your program. It also ensures the highest level of compatibility because Thinstall may fail to load and run some EXEs properly. (These EXEs should be reported as a bug to jclark@thinstall.com)


Any process loaded by Thinstall will :

1. Be able to load and use your virtual files
2. Load any process it creates using Thinstall. For example: Process1.exe was built with Thinstall. It executes Process2.exe using CreateProcess or ShellExecute and Thinstall loads Process2.exe. Process2.exe executes Process3.exe, and again Thinstall loads Process3.exe so it can see your virtual files.

Forcing external process loading

Sometimes you may wish to hide your virtual files from programs you spawn. For example if you execute cmd.exe and it is able to see your virtual files then the user could browse your files and copy them to the real filesystem.

You can specifically tell Thinstall to use the normal system loader for a process by setting the environment variable TS_EXECUTE_EXTERNAL to "1" and removing this environment variable when you want Thinstall to resume loading. If this environment variable is set Thinstall will use the system loader even for internal EXEs you've included in your Thinstall project.

Environment Variable & Threads

Using the Win32 API function SetEnvironmentVariable causes the environment variable to set in all threads, so if your program has two or more threads that might call CreateProcess at the same time, you should place a thread-lock around the code section.