ThinApp User’s Guide ThinApp 4.5 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
ThinApp User’s Guide You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.
Contents About This Book 9 1 Installing ThinApp 11 ThinApp Requirements 11 Operating Systems, Applications, and Systems That ThinApp Supports 11 Applications That ThinApp Cannot Virtualize 12 Recommendations for Installing ThinApp 12 Using a Clean Computer 12 Using the Earliest Operating System Required For Users 13 Install ThinApp 13 Checking ThinApp Installation Files 13 2 Capturing Applications 15 Phases of the Capture Process 15 Preparing to Capture Applications 15 Capturing Applications with the Se
ThinApp User’s Guide Run the thinreg.exe Utility 31 Optional thinreg.exe Parameters 31 Building an MSI Database 33 Customizing MSI Files with Package.ini Parameters 33 Modify the Package.ini File to Create MSI Files 33 Controlling Application Access with Active Directory 35 Package.
Contents Configuring File and Protocol Associations 60 FileTypes 60 Protocols 60 Configuring Build Output 60 ExcludePattern 60 Icon 61 OutDir 61 RetainAllIcons 62 Configuring Permissions 62 AccessDeniedMsg 62 AddPageExecutePermission 62 PermittedGroups 63 UACRequestedPrivilegesLevel 63 UACRequestedPrivilegesUIAccess 64 Configuring Objects and DLL Files 64 ExternalCOMObjects 64 ExternalDLLs 64 ForcedVirtualLoadPaths 65 IsolatedMemoryObjects 65 IsolatedSynchronizationObjects 66 NotificationDLLs 66 Notificati
ThinApp User’s Guide ReadOnlyData 79 ReserveExtraAddressSpace 79 Shortcut 79 Shortcuts 80 Source 80 WorkingDirectory 80 Configuring Dependent Applications with Application Link 81 Application Link Path Name Formats 81 RequiredAppLinks 82 OptionalAppLinks 83 Configuring Application Updates with Application Sync 83 AppSyncClearSandboxOnUpdate 83 AppSyncExpireMessage 84 AppSyncExpirePeriod 84 AppSyncURL 84 AppSyncUpdateFrequency 85 AppSyncUpdatedMessage 85 AppSyncWarningFrequency 85 AppSyncWarningMessage 85 A
Contents Create a Project Without the Setup Capture Wizard Customizing the snapshot.ini File 100 99 8 ThinApp File System Formats and Macros 101 Virtual File System Formats 101 ThinApp Folder Macros 101 List of ThinApp Macros 102 Processing %SystemRoot% in a Terminal Services Environment 103 9 Creating ThinApp Scripts 105 Callback Functions 105 Implement Scripts in a ThinApp Environment 106 .bat Example 106 Timeout Example 106 Modify the Virtual Registry 107 .
ThinApp User’s Guide 8 VMware, Inc.
About This Book The ThinApp User’s Guide provides information about how to install ThinApp™, capture applications, deploy applications, and upgrade applications. You can refer to this guide to customize parameters and perform scripting. Intended Audience This book is intended for anyone who installs ThinApp and deploys captured applications. Typical users are system administrators responsible for the distribution and maintenance of corporate software packages.
ThinApp User’s Guide 10 VMware, Inc.
1 Installing ThinApp 1 You can install ThinApp to isolate applications, simplify application customization, deploy applications to different operating systems, and eliminate application conflict.
ThinApp User’s Guide Applications That ThinApp Cannot Virtualize ThinApp cannot convert some applications into virtual applications and might block certain application functions. You must use traditional installation technologies to deploy the following types of applications: Applications requiring installation of kernel‐mode device drivers ODBC drivers work because they are user mode drivers.
Chapter 1 Installing ThinApp Using Virtual Machines for Clean Computers The easiest way to set up a clean computer is to create a virtual machine. You can install Windows on the virtual machine and take a snapshot of the entire virtual machine in its clean state. After you capture an application, you can restore the snapshot and revert it to a clean virtual machine state that is ready for the next application capture. You can use VMware Workstation or other VMware products to create virtual machines.
ThinApp User’s Guide snapshot.ini – Stores entries for the virtual registry and virtual file system that ThinApp ignores during the process of capturing an application. The snapshot.exe file references the snapshot.ini file. Advanced users might modify the snapshot.ini file to ensure that ThinApp does not capture certain entries when creating an application package. template.msi – Builds the MSI files. You can customize this template to ensure that the .
2 Capturing Applications 2 You can capture applications to package an application into a virtual environment. The Setup Capture wizard is the main method to capture applications and set initial application parameters. Advanced users who must capture applications from the command line can use the snapshot.exe utility instead of the Setup Capture wizard.
ThinApp User’s Guide Capturing Applications with the Setup Capture Wizard The capture process packages an application and sets initial application parameters. If you use a virtual machine, consider taking a snapshot before you run the wizard. A snapshot of the original clean state allows you to revert to the snapshot when you want to capture another application. This information uses Mozilla Firefox as a key example for application capture.
Chapter 2 Capturing Applications 4 Close the application. 5 Maximize the Setup Capture wizard, click Postscan to proceed with another scan of the computer, and click OK to confirm the postscan operation. ThinApp stores the differences between the first baseline image and this image in a virtual file system and virtual registry.
ThinApp User’s Guide To set user groups in the Setup Capture wizard 1 2 On the Groups page, limit the user access to the application. a Select Only the following Active Directory groups. b Click Add to specify Active Directory object and location information. Option Description Object Types Specifies objects. Locations Specifies a location in the forest. Check Names Verify object names. Advanced Locates user names in the Active Directory forest.
Chapter 2 Capturing Applications %SystemRoot% %SystemSystem% ThinApp retains Merged isolation mode for the %SystemSytem%\spool subdirectory by creating an exception to the %SystemSystem% parent directory isolation mode. Between the prescan and postscan capture operations, assigns Full isolation mode to any directories that the application creates during the installation. This process is unrelated to the isolation mode of any new directories that the running virtual application creates.
ThinApp User’s Guide Storing Application Changes in the Sandbox The sandbox is the directory where all changes that the captured application makes are stored. The sandbox is runtime modification storage and is not a cache. The next time you open the application, those changes are incorporated from the sandbox. When you delete the sandbox directory, the application reverts to its captured state.
Chapter 2 Capturing Applications Defining Package Settings A package is the executable file or MSI file with executable files that you use to run or deploy a captured application. You build a package from the project files. Setting up the package during the capture process involves specifying information about the main virtual application file that serves as the primary data container, MSI generation, and compression.
ThinApp User’s Guide 3 (Optional) If you cannot select a primary data container, type a primary data container name to generate a .dat file. If you plan to use the Application Sync utility to update a captured application, ThinApp uses the primary data container name during the process. You must use the same name across multiple versions of the application. You might not be able to select the same primary data container name from the list.
Chapter 2 Capturing Applications Advanced Package Configuration Advanced users might modify configuration files, such as the Package.ini or ##Attributes.ini files, before building the package during the capture or after the initial build of the package. Modifying Settings in the Package.ini File You can modify the Package.ini file to update the overall package. The file resides in the captured application folder. A Firefox 2.0.0.3 path might be C:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firef
ThinApp User’s Guide For example, you can set the isolation mode at the directory or application level to determine which files and registry keys are visible and written by the virtual application you create. The detailed setting in the ##Attributes.ini file overrides the overall Package.ini setting. The Package.ini setting determines the isolation mode only when ThinApp does not have ##Attributes.ini information. The ##Attributes.ini file appears in most folders for the captured application.
Chapter 2 Capturing Applications Customize Microsoft Office 2007 Installation Options Starting the capture process for Microsoft Office 2007 involves customizing the Microsoft Office installation. To customize the installation of Microsoft Office 2007 1 Copy Microsoft .NET 2.0, Windows Installer 4.5, and ThinApp installation files to the virtual machine. 2 Copy the Microsoft Office 2007 installation files to the virtual machine or load the Microsoft Office 2007 ISO to the virtual machine.
ThinApp User’s Guide 2 3 d From the desktop, select Start > Run and run the Regsvr32.exe /u msimtf.dll command. e From the desktop, select Start > Run and run the Regsvr32.exe /u Msctf.dll command. Disable the mdm.exe process to prevent an issue with child processes that prevent you from closing the sandbox. a In Internet Explorer, select Tools > Internet Options.
Chapter 2 Capturing Applications (Optional) In the HKEY_CURRENT_USER.txt file in the project files, add the isolation_full HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security entry anywhere in the file if it does not exist. (Optional) Add the following entries below the isolation_full HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security entry. Value=OutlookSecureTempFolder REG_SZ~%Profile%\Local Settings\OutlookTemp#2300 (Optional) If you activate any Application Sync
ThinApp User’s Guide 28 VMware, Inc.
3 Deploying Applications 3 Deploying captured applications involves working with deployment tools, the thinreg.exe utility, MSI files, and Active Directory. This information includes the following topics: “ThinApp Deployment Options” on page 29 “Establishing File Type Associations with the thinreg.
ThinApp User’s Guide Creating a login script that queries applications entitled to the user and runs the thinreg.exe utility with the option that registers the applications on the local machine. Login scripts are useful for nonpersistent desktops. See “Establishing File Type Associations with the thinreg.exe Utility” on page 30. Controlling user access to fileshares.
Chapter 3 Deploying Applications Run the thinreg.exe Utility This example of running the thinreg.exe utility provides some sample commands. The package name in the thinreg.exe commands can appear in the following ways: C:\ Relative path to .exe file \\\\ As a variation, you can use a wildcard specification, such as *.exe. If the path or filename contains spaces, enclose the path in double quotation marks.
ThinApp User’s Guide Table 3-1. Optional thinreg.exe parameters Parameter /a, /allusers Purpose Sample Usage Registers a package for all users. thinreg.exe /a "\\\\Microsoft Office 2007 Word.exe" If an unauthorized user attempts to run the application, a message informs the user that he or she cannot run the application. /q, /quiet Prevents the display of an error message for an unrecognized command‐line parameter. /u, /unregister, /uninstall Unregisters a package.
Chapter 3 Deploying Applications Building an MSI Database If you do not create MSI files during the capture process, you can still create these files after building an application. An MSI database is useful for delivering captured applications through traditional desktop management systems to remote locations and automatically creating shortcuts and file type associations. Basic Active Directory group policies provide ways to distribute and start MSI packages.
ThinApp User’s Guide To modify the MSI parameters 1 In the Package.ini file, type the MSI filename. MSIFilename=.msi For example, the filename for Firefox might be Mozilla Firefox 2.0.0.3.msi. 2 (Optional) Update other MSI parameters. 3 Double‐click the build.bat file in the captured application folder to rebuild the application package. Specifying a Database Installation for Individual Users and Machines You can modify the installation of the MSI database for users and machines.
Chapter 3 Deploying Applications Deploying MSI Files on Microsoft Vista When you deploy MSI files on Vista, you must indicate whether an installer needs elevated privileges. Typical individual user installations do not require elevated privileges but individual machine installations require such privileges. ThinApp provides the MSIRequireElevatedPrivileges parameter in the Package.ini file that specifies the need for elevated privileges when the value is set to 1.
ThinApp User’s Guide In the following entry, only users belonging to the App1users group can use the App1.exe file, and members of the Everyone group can use the App2.exe file. The default message for denied users changes for App1. [BuildOptions] PermittedGroups=Everyone [App1.exe] PermittedGroups=App1Users AccessDeniedMsg=Sorry, you can’t run this application .. [App2.exe] ... ...
Chapter 3 Deploying Applications The ThinApp runtime client is a small part of the executable file package. When ThinApp loads the runtime client, it sets up the environment and starts the target executable file. The target executable file accesses other parts of the application stored in the virtual operating system. The runtime client intercepts such requests and serves them by loading DLLs from the virtual operating system. The load time of the runtime client across a network is a few milliseconds.
ThinApp User’s Guide Security Recommendations for Streaming Packages VMware recommends that you make a central shared directory for the package read‐only. Users can read the package contents but not change the executable file contents. When a package streams from a shared location, ThinApp stores application changes in the user sandbox. The default sandbox location is %AppData%\Thinstall\. You can configure the sandbox location at runtime or at package time.
Chapter 3 Deploying Applications Accessing the Local Disk, the Removable Disk, and Network Shares When you create a project structure, ThinApp configures isolation modes for directories and registry subtrees. The isolation modes control which directories the application can read and write to on the local computer. Review the default configuration options: Hard disk – An example of a hard disk is C:\. Isolation modes selected during the capture process affect access.
ThinApp User’s Guide Sample Isolation Mode Configuration Depending on Deployment Context Isolation modes control the read and write access for specific system directories and system registry subkeys. You can adjust isolation modes to resolve the problems in Table 3‐2. Table 3-2. Sample Problems and Solutions That Use Isolation Modes Problem Solution An application fails to run because previous or future versions exist simultaneously or fail to uninstall properly.
Chapter 3 Deploying Applications Figure 3‐4 shows the registry from the perspective of the captured Microsoft Visio 2007. Figure 3-4. Windows Registry as seen by the captured Microsoft Visio 2007 Office 12.0 Access Connectivity Common Registration User Settings Visio 10.0 11.0 8.0 9.0 Common Delivery Live Meeting Outlook PowerPoint Visio VMware, Inc.
ThinApp User’s Guide 42 VMware, Inc.
4 Updating and Linking Applications 4 You can update virtual applications with different utilities depending on the extent of change and dependencies on other applications.
ThinApp User’s Guide Update Firefox 2.0.0.3 to Firefox 3 with Application Sync This example shows the Application Sync update process for Firefox. The update process involves modifying the Package.ini file. The AppSyncURL parameter requires a URL path. ThinApp supports HTTP, HTTPS, and file protocols. For information about all Application Sync parameters, see “Configuring Application Updates with Application Sync” on page 83. To update Firefox 2.0.0.3 to Firefox 3 1 Capture Firefox 2.0.0.
Chapter 4 Updating and Linking Applications Application Sync Effect on Entry Point Executable Files The Application Sync utility updates entry point executable files. For example, assume you deploy a Microsoft Office 2007 package that does not include Microsoft PowerPoint. The Microsoft Office PowerPoint 2007.exe entry point does not exist for the original package.
ThinApp User’s Guide To prevent the startup of the ctfmon.exe process 1 If you did not activate the cmd.exe entry point during the capture process, set the Disabled parameter for the cmd.exe entry in the Package.ini file to 0 and rebuild the package with the build.bat utility. This generates an executable file for the cmd.exe entry point in the /bin directory.
Chapter 4 Updating and Linking Applications If you capture Microsoft Office and try to access a PDF attachment in the virtual Microsoft Outlook environment, you can set up Microsoft Office to detect a linked Adobe Reader package on the network when Adobe Reader is not available within the immediate virtual or physical environment. Hot fixes and service packs – Link updates to an application and roll back to a previous version if users experience significant issues with the new version.
ThinApp User’s Guide To link an application to Microsoft .NET 1 Capture the installation of the .NET 2.0 Framework. During the capture process, you must select at least one user‐accessible entry point. 2 Rename the.exe file that ThinApp produces to a .dat file. This renaming prevents users from accidentally running the application. The name of the .dat file you select does not matter because users do not run the file directly. For example, use dotnet.dat. 3 Save the .NET project to C:\Captures\dotnet.
Chapter 4 Updating and Linking Applications 3 Capture Application B. 4 In the Package.ini file for Application B, specify Application C as a required or optional application link. For example, add RequiredLinks=\AppFolder\AppC\AppC.exe to the file. 5 Capture Application C. If you start Application A, it can access the files and registry keys of Application B and Application B can access the files and registry keys of Application C.
ThinApp User’s Guide File and Registry Collisions in Linked Packages If the base application and a dependent package linked to the base application contain file or registry entries at the same location, a collision occurs. When this happens, the order of import operations determines which package has priority. The last package imported has priority in such cases and the file or registry contents from that package are visible to the running applications.
Chapter 4 Updating and Linking Applications Forcing an Application Sync Update on Client Machines You can use the AppSync command to force an Application Sync update on a client machine. You might want to update a package stored in a location where standard users do not have write access. In this situation, you cannot use Application Sync parameters to check for updates when an application starts because users do not have the required rights to update the package. You can schedule a daily AppSync.
ThinApp User’s Guide sbmerge.exe Commands The sbmerge.exe Print command displays sandbox changes and does not make modifications to the sandbox or original project. The sbmerge.exe Apply command merges changes from the sandbox with the original project. This command updates the project registry and file system to reflect changes and deletes the sandbox directory. Usage "C:\Program Files\VMware\VMware ThinApp\sbmerge" Print [] "C:\Program Files\VMware\VMware ThinApp\sbmerge" Apply [
Chapter 4 Updating and Linking Applications Dynamic Updates Without Administrator Rights You can update applications dynamically without requiring administrator rights. For example, .NET‐based applications that download new DLL files from the Internet as part of their update process must run the ngen.exe file to generate native image assemblies for startup performance. In typical circumstances, the ngen.exe file writes to HKLM and C:\WINDOWS, both of which are only accessible with administrator accounts.
ThinApp User’s Guide 3 Create a desktop or Start menu shortcut to the user’s desktop that points to a shared executable file location at \\\\Firefox.exe. Assume two users start Firefox.exe and lock the application. 4 Copy the updated version of Firefox.exe to the central share at \\\\Firefox.1. If you are a new user, ThinApp starts the application with the new package data in Firefox.1.
5 Configuring Package Parameters 5 Advanced users can customize the parameters of the virtual application outside of the capture process. Parameters can affect the configuration of build options that include MSI, update, and entry point settings. The Package.ini file is located in the project folder and contains parameters that configure a captured application during the build process. The Setup Capture wizard sets the initial values of some of the Package.ini parameters. You can save the Package.
ThinApp User’s Guide Package.ini File Structure The structure of the Package.ini file includes sections that apply to all applications or individual applications. Most parameters must appear under a specific section heading. The Package.ini file contains the following headings: [BuildOptions] [.exe] [FileList] [Compression] [Isolation] The [BuildOptions] section of the Package.ini file applies to all applications.
Chapter 5 Configuring Package Parameters Examples If your application is small or you know that Symantec AntiVirus is not installed on the desktops to which you are deploying the application, you can modify the NetRelaunch parameter for stronger initial startup performance. [BuildOptions] NetRelaunch=0 RuntimeEULA The RuntimeEULA parameter controls the End User License Agreement (EULA) display for the package. This parameter addresses legacy EULA requirements.
ThinApp User’s Guide Wow64 The Wow64 parameter simulates a 32‐bit environment for 32‐bit applications that cannot run on a 64‐bit Windows operating system. If a 32‐bit application tries to handle its own 64‐bit registry redirection, you can activate this parameter before building a project. ThinApp comments out the initial setting to prevent Windows on Windows 64‐bit (WOW64) emulation.
Chapter 5 Configuring Package Parameters With Full isolation mode, ThinApp blocks visibility to system elements outside the virtual application package. This mode restricts any changes to files or registry keys to the sandbox and ensures that no interaction exists with the environment outside the virtual application package. Full isolation prevents application conflict between the virtual application and applications installed on the physical system. Do not use the Full isolation mode in the Package.
ThinApp User’s Guide You can ensure that the application can write to any key on the computer, except where the package specifies otherwise. [Isolation] RegistryIsolationMode=Merged Configuring File and Protocol Associations You can modify ThinApp parameters to associate file extensions with applications and to specify protocols that are visible to the physical environment. FileTypes The FileTypes parameter lists file extensions that the thinreg.exe utility associates with an executable file.
Chapter 5 Configuring Package Parameters You can use a comma to separate patterns in the list. Wildcards (*) match none of the characters or at least one of the characters and question marks (?) match exactly one character. The syntax is similar to the DOS dir command, but you can apply wildcard characters to directory names and filenames. You can specify the ExcludePattern parameter in the Package.ini file, where the pattern exclusion applies to the entire directory structure, and the ##Attributes.
ThinApp User’s Guide RetainAllIcons The RetainAllIcons parameter keeps all of the original icons of the executable file listed in the Source parameter in the application. The icons that are not assigned to application executable files reside in the virtual file system of the package. The RetainAllIcons parameter determines whether to copy the unused icons from the virtual file system to the executable file.
Chapter 5 Configuring Package Parameters PermittedGroups The PermittedGroups parameter restricts a package to a specific set of Active Directory users. You can specify group names, SID strings, or a mix of group names and SID strings in the same line of the PermittedGroups parameter. If you use a domain‐based group name, you must connect to that domain when you build the application package. If you add a SID in the parameter value, you are not required to connect to the domain where the SID is defined.
ThinApp User’s Guide If you do not specify privileges, ThinApp does not assign a default value but operates according to the asInvoker setting. Examples You can modify the UACRequestedPrivilegesLevel parameter to specify administrator privileges for a program. [BuildOptions] UACRequestedPrivilegesLevel=requireAdministrator UACRequestedPrivilegesUIAccess The UACRequestedPrivilegesUIAccess parameter specifies user interface access on Windows Vista or later operating system versions.
Chapter 5 Configuring Package Parameters ThinApp sets an initial value that loads DLL files from the virtual file system and passes the loading process to Windows for DLL files on the physical file system. In some circumstances, Windows must load a DLL file in the virtual file system. You might have a DLL file that inserts itself into other processes using Windows hooks. The DLL file that implements the hook must be available on the host file system and Windows must load that file.
ThinApp User’s Guide The IsolatedMemoryObjects parameter does not appear in the Package.ini file but you can add the parameter. ThinApp sets an initial value that isolates the memory objects that a native version of Internet Explorer uses in the virtual environment. The value addresses a conflict between the explorer.exe and iexplore.exe utilities when the utilities map sandbox files.
Chapter 5 Configuring Package Parameters Examples You can modify the NotificationDLLs parameter to make calls to the First.dll and Second.dll files. [BuildOptions] NotificationDLLs=First.dll;Second.dll NotificationDLLSignature The NotificationDLLSignature parameter works with the NotificationDLLs parameter and verifies that a specified DLL file has a signature. If the DLL does not have a signature, ThinApp does not load the file.
ThinApp User’s Guide Examples You can modify the SandboxCOMObjects parameter to make visible the COM objects that the virtual application registers outside the sandbox. For example, if you install native Microsoft Office 2003 and virtual Microsoft Office 2007, and you run a custom mail merge program in the native environment that starts Microsoft Word and instructs it to open, change, and save a document, you can generate Microsoft Word 2007 documents when virtual Microsoft Word is running.
Chapter 5 Configuring Package Parameters Examples You can modify the CachePath parameter to use an absolute path. CachePath=C:\VirtCache You can set a relative path that ThinApp detects as the path relative to the directory where the application executable file resides. If the package resides in C:\VirtApps and the CachePath parameter has a value of Cache, the cache directory is C:\VirtApps\Cache.
ThinApp User’s Guide Type – FIXED, REMOVABLE, CD‐ROM, or RAMDISK. FIXED – Indicates fixed media. For example, a hard drive or internal Flash drive. REMOVABLE – Indicates removable media. For example, a disk drive, thumb drive, or flash card reader. CD‐ROM – Indicates a CD‐ROM drive. RAMDISK—Indicates a RAM disk. Virtual drives are useful when applications rely on hard‐coded paths to drive letters that might not be available on the deployment systems.
Chapter 5 Configuring Package Parameters [BuildOptions] VirtualDrives= Drive=A, Serial=12345678, Type=REMOVABLE; Drive=B, Serial=9ABCDEF0, Type=FIXED You can specify the X, D, and Z virtual drive letters. [BuildOptions] VirtualDrives=Drive=X, Serial=ff897828, Type=REMOVABLE; Drive=D, Type=CDROM; Drive=Z Drive X is a removable disk with the ff797828 serial number. Drive D is a CD‐ROM drive with an assigned serial number, Drive Z is a FIXED disk with an assigned serial number.
ThinApp User’s Guide Examples If you want to protect the physical file system from any changes, you can modify the AllowUnsupportedExternalChildProcesses parameter and block ThinApp from generating 64‐bit child processes outside of the virtual environment. ThinApp cannot run any 64‐bit processes because ThinApp does not support the processes in the virtual environment.
Chapter 5 Configuring Package Parameters ChildProcessEnvironmentExceptions The ChildProcessEnvironmentExceptions parameter notes exceptions to the ChildProcessEnvironmentDefault parameter when you want to specify child processes. When you set the ChildProcessEnvironmentDefault parameter to Virtual, the ChildProcessEnvironmentExceptions parameter lists the applications that run outside of the virtual environment.
ThinApp User’s Guide Table 5‐1 lists sample compression ratios and startup times for a Microsoft Office 2003 package that runs from a local hard drive. Table 5-1. Sample Compression Ratios and Startup Times Compression Type None Fast Size 448,616KB 257,373KB Compression ratio 100% 57% Startup time (first run) 6 seconds 6 seconds Startup time (second run) 0.1 seconds 1 seconds Build time (first build) 3 minutes 19 minutes Build time (second build) 2 minutes 1.
Chapter 5 Configuring Package Parameters Examples If you are working with large builds and performance is not a priority, you can modify the MSICompressionType parameter to prevent MSI file compression. [Compression] MSICompressionType=none OptimizeFor The OptimizeFor parameter controls whether to compress executable files or to reduce memory consumption and page file usage on the hard drive to improve startup performance.
ThinApp User’s Guide You might block standard .trace file generation to hide the application history from a user. In a testing environment, you might turn off tracing for applications that you know work properly. Producing extra .trace files wastes disk space and CPU time. Examples You can set the DisableTracing parameter to prevent the generation of .trace files in Log Monitor. [BuildOptions] DisableTracing=1 LogPath The LogPath parameter sets the location to store .trace files during logging activity.
Chapter 5 Configuring Package Parameters [app.exe] Source=%ProgramFilesDir%\myapp\app.exe StripVersionInfo=1 Version.XXXX The Version.XXXX parameter overrides application version strings or adds new version strings in the Version tab of Windows properties. The capture process does not generate this parameter. You can add this parameter to the Package.ini file. Examples You can set a new product name with the Version.XXXX parameter. You might want ThinApp Office rather than Office as the product name.
ThinApp User’s Guide Examples The LocaleName parameter can display a Japanese locale name. [BuildOptions] LocaleName=ja-JP Configuring Individual Applications You can modify ThinApp parameters to configure specific applications. Parameters specific to entry points fall under the [.exe] sections of the Package.ini file. For example, the entries under [Adobe Reader 8.exe] for an Adobe Reader application might affect command‐line arguments and application shortcuts.
Chapter 5 Configuring Package Parameters ReadOnlyData The ReadOnlyData parameter specifies the name of the read‐only virtual registry file created during the application build and designates the primary data container for an application. Do not modify this parameter. The Package.ini file displays this parameter in case you want to locate the primary data container. When the primary data container is less than 200MB, ThinApp stores the container within an entry point executable file.
ThinApp User’s Guide [Microsoft Office Word 2007.exe] Source=%ProgramFilesDir%\Microsoft Office\Office12\WINWORD.EXE Shortcut=Microsoft Office Enterprise 2007.dat Shortcuts The Shortcuts parameter lists the locations where the thinreg.exe utility creates a shortcut to a virtual application. The capture process determines Shortcuts entries based on the shortcuts the application installer implements. MSI files use the Shortcuts parameter to determine the shortcuts to create.
Chapter 5 Configuring Package Parameters The WorkingDirectory parameter sets the initial value of the working directory but the directory is dynamic as you navigate to other locations. Examples If you have an application on a USB drive, you can modify the WorkingDirectory value from the default USB location to the My Documents directory on the desktop. [.exe] WorkingDirectory=%Personal% The location of the My Documents directory depends on the isolation mode setting.
ThinApp User’s Guide RequiredAppLinks The RequiredAppLinks parameter specifies a list of required packages to import to the base package at runtime. You can configure this parameter in the Package.ini file of the base package. If the import operation for any dependent package fails, an error message appears and the base executable file exits. You can use the OptionalAppLinks parameter instead to continue even when load errors occur.
Chapter 5 Configuring Package Parameters You can expand the PLUGINS environment variable and import all executable files at this location. RequiredAppLinks=%PLUGINS%\*.exe You can load two specified plug‐in files and a list of executable files located under the plug‐in location. RequiredAppLinks=plugin1.exe;plugin2.exe;plugins\*.
ThinApp User’s Guide AppSyncExpireMessage The AppSyncExpireMessage parameter sets the message that appears when the connection to the Web server fails after the expiration period ends and a virtual application starts. The application quits when the message appears. Examples ThinApp provides a default message for the AppSyncExpireMessage parameter. AppSyncExpireMessage=This application has been unable to contact its update server for days, so it is unavailable for use.
Chapter 5 Configuring Package Parameters AppSyncUpdateFrequency The AppSyncUpdateFrequency parameter specifies how often ThinApp checks the Web server for application updates. You can set the update frequency in minutes (m), hours (h), or days (d). ThinApp sets an initial value of 1d that connects a package to the Web server once a day to check for updates. ThinApp does not check for an update when another running application shares the same sandbox.
ThinApp User’s Guide Examples The default period of the AppSyncWarningPeriod parameter is five days. AppSyncWarningPeriod=5d Configuring MSI Files You can modify ThinApp parameters to configure MSI files for deployment through desktop management systems. For information about working with MSI files, see “Building an MSI Database” on page 33. Information about compression of MSI files appears with other parameters that control file sizes. See “MSICompressionType” on page 74.
Chapter 5 Configuring Package Parameters An administrator can install the MSI database for all users on a machine or an individual user without administrator rights can install the database for only that user. [BuildOptions] MSIFilename=.msi MSIDefaultInstallAllUsers=2 MSIFilename The MSIFilename parameter triggers the generation of an MSI database and specifies its filename. Other MSI parameters can work only when you uncomment the MSIFilename parameter.
ThinApp User’s Guide Examples You can modify the MSIManufacturer parameter to display the name of a specific department. For example, users can see a department name in the Windows Add or Remove Programs dialog box and contact the help desk for that department. [BuildOptions] MSIFilename=.msi MSIManufacturer= MSIProductCode The MSIProductCode parameter specifies a product code for the MSI database. Windows Installer uses the code to identify MSI packages.
Chapter 5 Configuring Package Parameters ThinApp sets an initial value of the MSIRequireElevatedPrivileges parameter that marks the MSI database as requiring elevated privileges. If your system is set up for UAC prompts, a UAC prompt appears when you install an application. The parameter works only when the MSIFilename parameter requests the generation of a Windows Installer database.
ThinApp User’s Guide Configuring Sandbox Storage and Inventory Names You can modify ThinApp parameters to configure the sandbox where all changes that the captured application makes are stored. The ThinApp inventory name might affect the need to change the sandbox name. For more information about the sandbox placement and structure, see Chapter 6, “Locating the ThinApp Sandbox,” on page 93.
Chapter 5 Configuring Package Parameters You can decide at runtime whether to use the RemoveSandboxOnExit script API function to delete the sandbox on exit. Examples You can modify the RemoveSandboxOnExit parameter to delete the sandbox when the application exits. When multiple users share an application under one user name, you can delete the sandbox to eliminate the previous user’s registry and file system changes.
ThinApp User’s Guide Examples You can modify the SandboxPath parameter to create the sandbox in the same directory as the executable file. If Mozilla Firefox 3.0 is the value of the SandboxName parameter, you can create the Mozilla Firefox 3.0 sandbox in the same directory that Firefox runs from. [BuildOptions] SandboxPath=. You can create the sandbox in a subdirectory subordinate to the executable file location. [BuildOptions] SandboxPath=LocalSandbox\Subdir1 You can create the sandbox in the %AppData%
6 Locating the ThinApp Sandbox 6 The sandbox is the directory where all changes that the captured application makes are stored. The next time you start the application, those changes are incorporated from the sandbox. When you delete the sandbox directory, the application reverts to its captured state.
ThinApp User’s Guide ThinApp starts the sandbox search by trying to locate the following environment variables in this order: %_SANDBOX_DIR% This environment variable changes the sandbox location for specific applications on the computer. For example, if the Mozilla Firefox 3.0_SANDBOX_DIR environment variable exists, its value determines the parent directory sandbox location. If the value is z:\FirefoxSandbox before you run the application, ThinApp stores the sandbox in z:\FirefoxSandbox.
Chapter 6 Locating the ThinApp Sandbox Controlling the Sandbox Location The setup capture process adds the SandboxName parameter to the Package.ini file. If you capture Firefox and Mozilla Firefox 3.0 is the value of this parameter, the default location of the sandbox for the application is %AppData%\Thinstall\Mozilla Firefox 3.0. The typical %AppData% location is C:\Documents and Settings\\Application Data. %AppData% is often mapped to a shared network drive.
ThinApp User’s Guide Sandbox Structure ThinApp stores the sandbox using a file structure almost identical to the build project structure. ThinApp uses macro names for shell folder locations, such as %AppData%, instead of hard coded paths. This structure enables the sandbox to migrate to different computers dynamically when the application runs from new locations. The sandbox contains the following registry files: Registry.rw.tvr – Contains all registry modifications that the application makes.
7 Creating ThinApp Snapshots and Projects from the Command Line 7 The snapshot.exe utility creates a snapshot of a computer file system and registry and creates a ThinApp project from two previously captured snapshots. You do not have to start the snapshot.exe utility directly because the Setup Capture wizard starts it. Only advanced users and system integrators who are building ThinApp functionality into other platforms might make direct use of this utility.
ThinApp User’s Guide Examples Snapshot My.snapshot Snapshot My.snapshot –Config MyExclusions.ini Snapshot My.snapshot C:\MyAppDirectory HKEY_LOCAL_MACHINE\Software\MyApp Options The options specify the directories or subkeys in the snapshot. Option Description -Config ConfigFile.ini Specifies directories or registry subkeys to exclude during snapshot creation. If you do not specify a configuration file, ThinApp uses the snapshot.ini file from the ThinApp installation directory.
Chapter 7 Creating ThinApp Snapshots and Projects from the Command Line Displaying the Contents of a Snapshot File The snapshot.exe utility lists the contents of the snapshot file. Usage snapshot.exe SnapshotFileName.snapshot -Print Examples Snapshot Start.snapshot –Print ThinApp requires all of the parameters. Sample snapshot.exe Commands Table 7‐1 describes sample commands for the snapshot.exe utility. The parameters are not case‐sensitive.
ThinApp User’s Guide 3 Save to disk a snapshot of the new machine configuration. snapshot.exe C:\End.snapshot 4 Generate a template Package.ini file. snapshot.exe C:\Start.snapshot –SuggestProject C:\End.snapshot C:\Template.ini ThinApp uses the template file to generate the final Package.ini file. The template file contains a list of all detected executable file entry points and Package.ini parameters. If you write your own script to replace the Setup Capture wizard, use the template Package.
8 ThinApp File System Formats and Macros 8 ThinApp stores the differences between snapshots during the setup capture process in a virtual file system and virtual registry. The virtual file system uses folder macros to represent Windows shell folder locations.
ThinApp User’s Guide For example, you might capture an application on a system that has C:\WINNT as the Windows directory and deploy the application on a system that has C:\Windows as the Windows directory. ThinApp transparently converts C:\WINNT to %SystemRoot% during the capture process for that system and expands %SystemRoot% to C:\Windows during runtime for that system. If an application registers DLLs to C:\winnt\system32 while running on Windows 2000, the user can quit the application and log in to a
Chapter 8 ThinApp File System Formats and Macros Table 8-1. Folder Macros (Continued) Macro Name Typical Location %Internet Cache% C:\Documents and Settings\\Local Settings\Temporary Internet Files %Local AppData% C:\Documents and Settings\\Local Settings\Application Data %My Pictures% C:\Documents and Settings\\My Documents\My Pictures %My Videos% C:\Documents and Settings\\My Documents\My Videos %NetHood% C:\Documents and Settings\\NetHood
ThinApp User’s Guide 104 VMware, Inc.
9 Creating ThinApp Scripts 9 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.
ThinApp User’s Guide The following callback example shows the OnFirstSandboxOwner and OnFirstParentExit functions. ------------------------example.
Chapter 9 Creating ThinApp Scripts Modify the Virtual Registry The following script procedure modifies the virtual registry at runtime to load an external ODBC driver from the same directory where the package executable file is located. To modify the registry 1 Obtain the path to the package executable files. Origin = GetEnvironmentVariable("TS_ORIGIN") 2 Find the last slash in the path and obtain the characters that precede the slash. LastSlash = InStrRev(Origin, "\") SourcePath = Left(Origin, LastSlas
ThinApp User’s Guide ThinApp sets up TS_ORIGIN to indicate the full path to a captured executable file package. A virtual application sets the TS_ORIGIN variable to the physical path of the primary data container.If you have a virtual application consisting of the main.exe and shortcut.exe files, both files reside in C:\VirtApp. When you run the main.exe file, TS_ORIGIN var is set to C:\VirtApp\main.exe. When you run the shortcut.exe file, the TS_ORIGIN environment variable is set to C:\VirtApp\main.exe.
Chapter 9 Creating ThinApp Scripts 4 Add the information in the system registry. RegEditPid = ExecuteExternalProcess("regedit /s " & chr(34) & RegFileName & chr(34)) WaitForProcess RegEditPid, 0 Wait until the process is complete. 5 Clean the environment. fso.
ThinApp User’s Guide Examples You can exit the process and indicate success. ExitProcess 0 When the process exits, the scripting system receives its OnLastProcessExist function callback. Any loaded DLLs run termination code to clean up the environment. ExpandPath The ExpandPath(InputPath) function converts a path from macro format to system format. Parameters InputPath [in] A path in macro format. Returns The expanded macro path in system format. Examples Path = ExpandPath("%ProgramFilesDir%\Myapp.
Chapter 9 Creating ThinApp Scripts ExecuteVirtualProcess The ExecuteVirtualProcess(CommandLine) function runs a command inside of the virtual environment. You can use this function to make changes to the virtual environment. Parameters CommandLine [in] Representation of the application and command‐line parameters to run outside of the virtual environment. Returns Integer process ID. You can use the process ID with the WaitForProcess function. See “WaitForProcess” on page 115.
ThinApp User’s Guide You can retrieve the following values from most DLLs: Comments InternalName ProductName CompanyName LegalCopyright ProductVersion FileDescription LegalTrademarks PrivateBuild FileVersion OriginalFilename SpecialBuild Returns This function returns a string value. If the requested filename does not exist, or the function cannot locate the specified value in the file, the function returns an empty string (ʺʺ).
Chapter 9 Creating ThinApp Scripts GetOSVersion The GetOSVersion() function returns information about the current version of Windows. Parameters This function has no parameters. Returns This function returns a string in the MAJOR.MINOR.BUILD_NUMBER.PLATFORM_ID OS_STRING format. MAJOR is one the following values: Windows Vista 6 Windows Server 2008 6 Windows Server 2003 5 Windows XP 5 Windows 2000 5 Windows NT 4.
ThinApp User’s Guide GetEnvironmentVariable The GetEnvironmentVariable(Name) function returns the environment variable associated with the Name variable. Parameters Name [in] The name of the environment variable for which the value is retrieved. Returns This function returns the string value associated with the Name environment variable.
Chapter 9 Creating ThinApp Scripts SetfileSystemIsolation The Setfile systemIsolation(Directory, IsolationMode) function sets the isolation mode of a directory. Parameters Directory [in] Full path of the directory whose isolation mode is to be set. IsolationMode [in] Isolation mode to set. 1 = WriteCopy 2 = Merged 3 = Full Examples You can set the Merged isolation mode for the temp directory.
ThinApp User’s Guide Returns This function returns an integer. 0 = Timeout fails 1 = Process exits 2 = Process does not exist or security is denied Examples id = ExecuteExternalProcess("C:WINDOWS\system32\cmd.exe") WaitForProcess(id, 0) 116 VMware, Inc.
10 Monitoring and Troubleshooting ThinApp 10 You can use Log Monitor to generate trace files and troubleshoot the ThinApp environment. Log Monitor is compatible only with an application captured using the same version of ThinApp.
ThinApp User’s Guide The generated log files can be large and over 100MB depending on how long the application runs with Log Monitor and how busy an application is. The only reason to run Log Monitor for an application is to capture trace files. Trace files are critical for troubleshooting problems by analyzing and correlating multiple entries within the trace file. Troubleshoot Activity with Log Monitor You can use Log Monitor to perform basic troubleshooting.
Chapter 10 Monitoring and Troubleshooting ThinApp 3 (Optional) Capture logs for a specific duration to troubleshoot an exact issue. a Select the Suspend check box. b Start the captured application and let it run to the point where the error occurs or the performance problem starts. c In Log Monitor, deselect the Suspend check box to resume the logging process. You can check the application behavior to isolate the issue. d Select the Suspend check box to stop the logging process.
ThinApp User’s Guide Search for the error message displayed in dialog boxes. Some applications call the MessageBox Win32 API function to display unexpected errors at runtime. You can search a trace file for MessageBox or the contents of the string displayed in the error and determine what the application was running just before the dialog box appeared. Narrow the focus on calls originating from a specific DLL and thread. The log format specifies the DLL and thread that makes a call.
Chapter 10 Monitoring and Troubleshooting ThinApp <- indicates the process of the call returning to the original caller. For call exit log entries, ThinApp displays the output parameters. These parameters are out and in/out parameters. kernel32.dll indicates the DLL where the API call lands. 7c81b1f0 indicates the address of the API inside kernel32 where the call lands. If you disassemble kernel32.dll at the 7c81b1f0 address, you locate the code for the SetConsoleMode function.
ThinApp User’s Guide . ... 438 total calls 7847975891 total cycles (2809.64 ms): |sprof| ts_load_internal_module 764794646 cycles (273.80 ms) on log entry 21753 426837866 cycles (152.81 ms) on log entry 191955 408570540 cycles (146.27 ms) on log entry 193969 . . ... 94 total calls 4451728477 total cycles (1593.76 ms): |sprof| ts_lookup_imports 544327945 cycles (194.87 ms) on log entry 21758 385149968 cycles (137.89 ms) on log entry 193970 187246661 cycles (67.04 ms) on log entry 190210 . . ...
Chapter 10 Monitoring and Troubleshooting ThinApp The example shows the %drive_C%\test\cmd_test\bin, %SystemSystem%\foobar, and %SystemRoot%\foobar paths as the locations in the virtual file system that ThinApp probes. ----Potential Errors Detected --*** Unable to determine if any services need to be auto-started, error 2 001550 *** FindFirstFileW ’C:\test\cmd_test\bin\foobar.*’ -> INVALID_HANDLE_VALUE *** failed [system probe C:\test\cmd_test\bin\foobar.
ThinApp User’s Guide The cmd.exe utility obtains the first location by calling GetCurrentDirectoryW and the second location by calling GetFullPathNameW with ʺ.ʺ as the path specifies. These calls return the path for the current working directory. The log file shows that the cmd.exe utility creates the C:\test\cmd_test\bin> prompt.
Chapter 10 Monitoring and Troubleshooting ThinApp 2 Replace the last four xxxx characters with random alphanumeric entries to increase security. 3 Create a directory that is named in the OutlookSecureTempFolder registry key in your ThinApp project. For example, create the %Profile%\Local Settings\OutlookTempxxxx directory. 4 In the %Profile%\Local Settings\OutlookTempxxxx directory, create a ##Attributes.ini file with the following entries: [Isolation] DirectoryIsolationMode=Merged Starting Explorer.
ThinApp User’s Guide 126 VMware, Inc.
Glossary A Application Link A utility that links dependent applications to a base application at runtime and starts all the applications together when you start the base application. You can use the utility to deploy and update component packages separately rather than capture all components in the same package. Application Sync A utility that updates an application by detecting a new packaged version on a server or network share.
ThinApp User’s Guide L logging.dll A utility that generates .trace files. Log Monitor A utility that captures chronological activity for executable files that the captured application starts.The log_monitor.exe file is compatible only with applications captured using the same version of ThinApp. M MSI A Windows Installer container that is useful for application deployment tools. You can deliver the captured application as an MSI file instead of an executable file.
Glossary S sandbox The physical system folder that stores runtime user changes to the virtual application. When you start the application, ThinApp incorporates changes from the sandbox. When you delete the sandbox, ThinApp reverts the application to its captured state. The default location of the sandbox is %APPDATA%\Thinstall\. sbmerge.exe A utility that makes incremental updates to applications, such as the incorporation of a plug‐in or a change in a browser home page. The sbmerge.
ThinApp User’s Guide 130 VMware, Inc.
Index Symbols ##Attributes.ini comparing to Package.ini 23, 56 editing 24 A Active Directory authorizing group access 17 controlling access to applications 35 using Package.
ThinApp User’s Guide DCOM services, access for captured applications 12 deploying applications on network share 30 applications with deployment tools 29 executable files 30 MSI files 29 deployment tools, using MSI files 29 device drivers, incompatible with ThinApp 12 DLLs loading into memory 121 recording by Log Monitor 117 drivers, support for 38 MSI files automating the thinreg.
Index configuring individual application parameters 78 configuring isolation parameters 58 configuring locale parameters 77 configuring logging parameters 75 configuring MSI parameters 86 configuring object and DLL parameters 64 configuring process and service parameters 71 configuring runtime parameters 56 configuring sandbox parameters 90 configuring security parameters 62 configuring size parameters 73 configuring storage parameters 68 configuring version parameters 76 DirectoryIsolationMode 58 Disabled
ThinApp User’s Guide for thinreg.exe 31 for versions 76 PermittedGroups, effect on Application Link 49 primary data container defining 21 maintaining the name with Application Sync 45 size implications 21 project files 22 projects, opening during capture process 22 shell integration, reduced functions with ThinApp 12 snapshot.exe creating snapshots from the command line 97 sample commands 99 sample procedure 99 snapshot.
Index VMware View, using captured applications 29 vregtool, listing virtual registry contents 96 W WriteCopy isolation mode 19 VMware, Inc.
ThinApp User’s Guide 136 VMware, Inc.