.NET Protection & Linking FAQ
Previous Top Next

Questions about Thinstall and .NET Linking

Q. What is portions of .NET are supported by Thinstall?

A. Thinstall supports just about all .NET applications, the exceptions include:

- Thinstall cannot be used to package ASP.NET DLL files. Thinstall can only be used to package .NET EXE files.
- Applications cannot use SetShadowCopyFiles
to update DLL files at runtime when linked with Thinstall. Instead, we suggest alternate methods up updating your DLLs.

Q. Can Thinstall be used to protect .NET service applications?

A. Yes

Q. I'm a middle-ware tool developer who wants to sell my .NET DLLs to other developers, can Thinstall protect my .NET DLLs?
A. Thinstall can be used to protect .NET DLLs, but only when they are packaged with a hosting EXE program. Thinstall cannot protect .NET DLLs individually because once a DLL has been packaged with Thinstall it will no longer be recognized by the .NET Framework as being a valid .NET assembly. If you are an application developer Thinstall is perfect for you, if you are a middle-ware tools developer who wants to resell .NET DLLs Thinstall will not be suited for this purpose. Thinstall can be used to protect native (unmanaged) DLLs and OCXs, but it cannot protect managed .NET DLLs as individual files. This means ASP.NET DLLs cannot be protected by Thinstall.

Q. Can Thinstall be used to protect ASP.NET DLLs?

A. No, see this discussion

Q. My program uses csc.exe to compile c-sharp/VB code into byte-code at runtime, is this supported?

A.Yes, Thinstall will automatically add csc.exe and dependency DLLs if your program uses the XmlSerializer class ( see discussion below).

Q. If I make a small change to my program, how can I avoid redistributing a huge EXE to my customers?

A. There are many ways to accomplish this, for more information see this page.

Q. Can I use Thinstall in conjunction with my obfuscator?

A. Yes, Thinstall can be applied to .NET programs after the obfuscation transform has been applied. Thinstall is compatable with all 3rd party obfuscators.

Q. If I'm distributing multiple applications, can I share the linked .NET Framework between them?

A. Yes, Thinstall allows you to link multiple EXE files into the same package. Each EXE file will have access to the internal version of the .NET Framework. In order to allow the user to execute the other programs you will need to create one "dispatcher" EXE which accepts a command line argument and then executes the desired EXE inside of the package. You can create different StartMenu shortcuts for each of the internal programs during install by supplying the desired icon and command-line parameter. In the case where you need actual EXE programs to reside on the hard drive rather than shortcuts, you can create a small c++ program which simply executes your dispatcher EXE with a specific command-line.

Q. Can I debug my .NET application after it has been packaged with Thinstall?

A. Yes, see the following page for information on debugging tips.

Q. Can I prevent someone else from debugging my .NET application?

A. Yes, see the following page anti-debugging options.


Troubleshooting Thinstall related problems for .NET Programs

Problem: My application crashes on Windows XYZ version of Thinstall

Reason 1: Running from network drive. Often developers run their .NET application from a network drive to test it. By default the .NET Framework provides limited execution and access permissions for .NET programs that are initially run from a network drive. Programs run in this environment are likely to throw an exception. If the exception is not caught by your program it may lead to a crash message display. To make sure this is not your problem, try copying your application to c:\ and running it from there.

Click here for instructions How to change the security policies for your .NET application:
If you edit the .NET security policies for your local machine by editing the security.config XML file (or using the control panel), these security settings will be "frozen" into your Thinstall packaged .NET application at the time of build. In the future your .NET application will always use these security settings even if the user's machine has different settings. This permits you to enable your application to run from LAN and internet download links without any security restrictions. Note: Internet Explorer will no longer recognize your application as being a .NET application after it is linked using Thinstall, so the user will still encounter a dialog box stating they are about to run an EXE program.

Reason 2: Renaming EXE after build. Some control licensing systems will crash if the final EXE is renamed after build. This problem is not related to Thinstall at all, but is commonly encountered by our customers. To see if this is your problem, rename your original EXE from ABC.EXE to XYZ.EXE and ensure it runs fine without Thinstall. If you do not enter an output EXE when creating a new Thinstall project, Thinstall selects the exe output name of "setup_PROGRAMNAME.exe". The prepended "setup_" could be causing a problem. Also, when Internet Explorer downloads files to the Temp directory it may append "[1]" and "[2]" to your EXE name if the user downloads the EXE more than once. For example PROGRAM.EXE becomes PROGRAM[1].EXE. If this is a problem for you, you should enable Thinstall's Installer so that your program is copied to c:\program files before it is run. In the installer options, you should change the "Installed EXE Name" option from "%ProgramName%" to MYPROGRAM.EXE (where myprogram.exe is the name of the EXE your program must be named or it crashes).

Reason 3: Using Destroy PE Header Option with programs that have unmanaged code. By default Thinstall enable's the feature "Destroy PE Header" found using Menu -> Link -> Program Security -> PE Header Security -> Destroy PE Header. When this box is checked Thinstall will erase selective portions of the EXE so that it is more difficult to contruct your executable from memory. This feature is not compatible with some programs that use unmanaged code. If you are using the Xheo Licensing System or obfuscator in conjunction with Thinstall, you will need to disable this option.


Problem: When I run my packaged .NET application on a clean install Windows NT or Windows 98/ME I get a startup error about createtoolhelp32snapshot

Reason: You have installed .NET Framework 2.0 on your development computer before building your EXE. .NET Framework 2.0 overwrites mscoree.dll with a newer version. The new version of mscoree.dll is not compatiable with Windows NT/98/ME and Microsoft (currently) will not support these platforms. To solve this problem, locate a copy of mscoree.dll as installed by .NET Framework 1.1 and replace the "local path" of mscoree.dll in your Thinstall project to point to that version of the DLL. All other files for the .NET Framework are seperated into framework version specific directories, so everything else will work properly.