Scripting
Previous Top Next


Scripting allows you to execute custom code while an application packaged with Thinstall is running. Scripting can be used to perform custom actions during installation, uninstall, program start, termination, and license key changes.
clip0357

Scripting Index

· Callback functions - Called by Thinstall at various stages of program execution
· Thinstall Script Extensions - Functions provided by Thinstall to your applicaiton
· Example Scripts - Samples of how scripting can be used


Thinstall supports 3 types of scripts:

1. Runtime scripts - Executed when your program is run on an end-user's computer, by writing various callback functions, you can execute script code at specific points of execution.

· Run once


2. Build-time scripts - Executed when your program is being packaged into an EXE file by Thinstall. Build-time scripts have the ability to add/remove files to your project and modify your project settings on the fly.

How to add scripts to your project

1. Create a .vbs file using a text editor (Example Scripts)
2. Add the .vbs file to your Thinstall project. ( How to add files)
3. Right-click on the .vbs file and select one of the following option:

clip0354

Runtime Scripts

Runtime Scripts will execute when your program is first loaded by Thinstall before and portion of the EXE or virtual DLLs are loaded. Runtime scripts may define a number of callback functions which will be execute at various points in a program.

Build Scripts

Build scripts are scripts that will be executed when your project is being compiled by Thinstall. Currently build-time script functionality is reserved for future use and does nothing.
In the future, you will be able to use this to selectively add / remove files at build time and modify your project settings on the fly.


Namespace / Scoping

Each .vbs has its own private namespace for variables and functions. It is not possible to call functions or access variables defined in a different .vbs file. If multiple .vbs files have the same callback function defined, each .vbs will receive a sperate callback invocation.

How to write scripts

The following references will assist you in writing scripts for Thinstall

Microsoft: VB Script User's Guide

Microsoft: VB Script Language Reference

Microsoft: VB Script Functions