5.1
Table Of Contents
- ThinApp User’s Guide
- Contents
- About This Book
- Installing ThinApp
- Capturing Applications
- Phases of the Capture Process
- Preparing to Capture Applications
- Capturing Applications with the Setup Capture Wizard
- Create a System Image Before the Application Installation
- Rescan the System with the Installed Application
- Defining Entry Points as Shortcuts into the Virtual Environment
- Set Entry Points
- Manage with VMware Horizon Application Manager
- Set User Groups
- Defining Isolation Modes for the Physical File System
- Set File System Isolation Modes
- Storing Application Changes in the Sandbox
- Customize the Sandbox Location
- Send Anonymous Statistics to VMware
- Customize ThinApp Project Settings
- Defining Package Settings
- Customize Package Settings
- Opening Project and Parameter Files
- Build Virtual Applications
- Advanced Package Configuration
- Capturing Internet Explorer 6 on Windows XP
- Capturing Multiple Application Installers with ThinApp Converter
- ThinApp Package Management
- Deploying Applications
- ThinApp Deployment Options
- Establishing File Type Associations with the thinreg.exe Utility
- Building an MSI Database
- Controlling Application Access with Active Directory
- Starting and Stopping Virtual Services
- Using ThinApp Packages Streamed from the Network
- Using Captured Applications with Other System Components
- Performing Paste Operations
- Accessing Printers
- Accessing Drivers
- Accessing the Local Disk, the Removable Disk, and Network Shares
- Accessing the System Registry
- Accessing Networking and Sockets
- Using Shared Memory and Named Pipes
- Using COM, DCOM, and Out-of-Process COM Components
- Starting Services
- Using File Type Associations
- Sample Isolation Mode Configuration Depending on Deployment Context
- Updating and Linking Applications
- Application Updates That the End User Triggers
- Application Sync Updates
- Using Application Sync in a Managed or Unmanaged Environment
- Update Firefox 2.0.0.3 to Firefox 3 with Application Sync
- Fix an Incorrect Update with Application Sync
- Application Sync Effect on Entry Point Executable Files
- Updating thinreg.exe Registrations with Application Sync
- Maintaining the Primary Data Container Name with Application Sync
- Completing the Application Sync Process When Applications Create Child Processes
- Application Link Updates
- View of the Application using Application Link
- Link a Base Application to the Microsoft .NET Framework
- Set Up Nested Links with Application Link
- Affecting Isolation Modes with Application Link
- PermittedGroups Effect on Linked Packages
- Sandbox Changes for Standalone and Linked Packages
- Import Order for Linked Packages
- File and Registry Collisions in Linked Packages
- VBScript Collisions in Linked Packages
- VBScript Function Order in Linked Packages
- Storing Multiple Versions of a Linked Application in the Same Directory
- Using Application Sync for a Base Application and Linked Packages
- Application Sync Updates
- Application Updates That the Administrator Triggers
- Automatic Application Updates
- Upgrading Running Applications on a Network Share
- Application Synchronization Using Group Policy Object
- Sandbox Considerations for Upgraded Applications
- Updating the ThinApp Version of Packages
- Application Updates That the End User Triggers
- Locating the ThinApp Sandbox
- Creating ThinApp Snapshots and Projects from the Command Line
- ThinApp File System Formats and Macros
- Creating ThinApp Scripts
- Callback Functions
- Implement Scripts in a ThinApp Environment
- API Functions
- Monitoring and Troubleshooting ThinApp
- Glossary
- Index
VMware, Inc. 81
8
Scripts modify the behavior of virtual applications dynamically. You can create custom code before starting an
application packaged with ThinApp or after an application exits. You can use scripts to authenticate users and
load configuration files from a physical to virtual environment.
Callback functions run code during specific events. If applications create child processes, use callback
functions to run code only in the main parent process.
API functions run ThinApp functions and interact with the ThinApp runtime. API functions can authenticate
users and prevent the start of applications for unauthorized users.
Adding scripts to your application involves creating an ANSI text file with the .vbs file extension in the root
application project directory. The root project directory is the same directory that contains the Package.ini
file. During the build process, ThinApp adds the script files to the executable file and runs each of the script
files at runtime.
ThinApp uses VBScript to run script files. For information about VBScript, see the Microsoft VBScript
documentation. You can use VBScript to access COM controls registered on the host system or within the
virtual package.
This information includes the following topics:
“Callback Functions” on page 81
“Implement Scripts in a ThinApp Environment” on page 82
“A P I F u n c t i o n s ” on page 85
Callback Functions
Callback functions can run under certain conditions. For example, callback functions run script code only
when an application starts or quits.
Callback function names include the following names:
OnFirstSandboxOwner – Called only when an application first locks the sandbox. This callback is not
called if a second copy of the same application uses the same sandbox while the first copy runs. If the first
application spawns a subprocess and quits, the second subprocess locks the sandbox and prevents this
callback from running until all subprocesses quit and the application runs again.
OnFirstParentStart – Called before running a ThinApp executable file regardless of whether the
sandbox is simultaneously owned by another captured executable file.
OnFirstParentExit – Called when the first parent process exits. If a parent process runs a child process
and quits, this callback is called even if the child process continues to run.
OnLastProcessExit – Called when the last process owning the sandbox exits. If a parent process runs a
child process and quits, this callback is called when the last child process exits.
Creating ThinApp Scripts
8










