ThinApp User’s Guide ThinApp 4.0.
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 © 2009 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 Locating ThinApp Installation Files 13 2 Capturing Applications 15 Reviewing the Capture Process 15 Assessing Application Dependencies Before the Capture Process 15 Closin
ThinApp User’s Guide Using Captured Applications with Other System Components 34 Performing Paste Operations 34 Accessing Printers 34 Accessing Drivers 34 Accessing the Local Disk, the Removable Disk, and Network Shares 35 Accessing the System Registry 35 Accessing Networking and Sockets 35 Using Shared Memory and Named Pipes 35 Using COM, DCOM, and Out‐of‐Process COM Components 35 Starting Services 35 Using File Type Associations 35 Sample Isolation Mode Configuration Depending on Deployment Context 36 Vi
Contents Configuring Build Output 66 OutDir 66 ExcludePattern 66 Configuring Permissions and Security 66 AccessDeniedMsg 66 AddPageExecutePermission 67 PermittedGroups 67 UACRequestedPrivilegesLevel 68 UACRequestedPrivilegesUIAccess 68 Configuring Objects and DLL Files 69 ExternalCOMObjects 69 ExternalDLLs 69 IsolatedMemoryObjects 69 IsolatedSynchronizationObjects 70 ObjectTypes 70 SandboxCOMObjects 71 VirtualizeExternalOutOfProcessCOM 71 Configuring Storage 72 CachePath 72 UpgradePath 72 VirtualDrives 73
ThinApp User’s Guide Configuring Dependent Applications with Application Link 84 Application Link Path Name Formats 84 RequiredAppLinks 84 OptionalAppLinks 85 Configuring Application Updates with Application Sync 85 AppSyncClearSandboxOnUpdate 86 AppSyncExpireMessage 86 AppSyncExpirePeriod 86 AppSyncURL 87 AppSyncUpdateFrequency 87 AppSyncUpdatedMessage 87 AppSyncWarningFrequency 87 AppSyncWarningMessage 88 AppSyncWarningPeriod 88 Configuring MSI Files 88 MSIArpProductIcon 88 MSIDefaultInstallAllUsers 88 M
Contents D ThinApp Virtual File System 103 Virtual File System Formats 103 Merged and Virtual Views of the File System 103 Using Folder Macros 104 List of Folder Macros 104 Processing %SystemRoot% 105 E ThinApp Scripts 107 Callback Functions 107 Use Scripts in a ThinApp Environment 108 .bat Example 108 Timeout Example 108 Modify the Virtual Registry 109 .
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 The ThinApp software isolates and contains applications, simplifies application customization and deployment to different operating systems, and eliminates 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 ThinApp does not capture certain entries when creating an application package. template.msi – Builds the MSI files. You can customize this template to ensure the .
2 Capturing Applications 2 You can capture applications with the Setup Capture wizard. The capture process packages an application into a virtual environment and sets initial application parameters. For information about capturing applications from the command line, see Appendix C, “Snapshot Commands and Customization,” on page 99.
ThinApp User’s Guide Capture an Application with the Setup Capture Wizard The Setup 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.
Chapter 2 Capturing Applications During the build process that occurs at the end of the Setup Capture wizard, ThinApp generates one executable file for each selected entry point. If you deploy the application as an MSI file or use the thinreg.exe utility, the desktop and Start menu shortcuts created on end‐user desktops point to these entry points. ThinApp provides the following entry points to troubleshoot or debug your environment: cmd.
ThinApp User’s Guide Specify User Groups and Sandbox Data Locations ThinApp can use Active Directory groups to authorize access to the application and sandbox location. For example, you might restrict access to an application to ensure users do not pass it to unauthorized users. ThinApp does not support nested Active Directory groups. For example, if a user is a member of group A, and group A is a member of group B, ThinApp can only detect the user as a member of group A rather than group A and group B.
Chapter 2 Capturing Applications When you select the Merged isolation mode in the Setup Capture wizard, ThinApp completes the following operations: ThinApp sets the DirectoryIsolationMode parameter in the Package.ini file to Merged. ThinApp assigns the Merged isolation mode to the following directories: %Personal% %Desktop% %SystemSystem%\spool If you save documents to the desktop and My Documents folder, ThinApp saves the documents to the physical system regardless of the Merged mode se
ThinApp User’s Guide ThinApp assigns the Merged isolation mode to the following directories: %Personal% %Desktop% %SystemSystem%\spool ThinApp assigns the Full isolation mode to any new directories that the application creates during the installation. The WriteCopy option in the Setup Capture wizard has the same effect as the WriteCopy isolation mode setting in the Package.ini file, but the directory exceptions apply only to the wizard option.
Chapter 2 Capturing Applications To specify application delivery settings in the Setup Capture wizard 1 (Optional) Change the directory where you want to save the ThinApp project. If you keep the default directory and capture Firefox 2.0.0.3, the path might appear as C:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox (2.0.0.3). The inventory name selected during the wizard determines the default project directory name.
ThinApp User’s Guide Advanced Package Configuration Advanced users might modify configuration files outside of the Setup Capture wizard, such as the Package.ini or ##Attributes.ini files. Modifying Settings in the Package.ini File The Package.ini file contains configuration settings and resides in the captured application folder. For example, a Firefox 2.0.0.3 path might be C:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\Package.ini.
Chapter 2 Capturing Applications Modifying Settings in the ##Attributes.ini File The ##Attributes.ini file applies configuration settings at the directory level. The Package.ini file applies settings at the overall application level. 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.
ThinApp User’s Guide 24 VMware, Inc.
3 Deploying Applications 3 Working with captured applications might involve working with deployment tools, the thinreg.exe utility, MSI files, and Active Directory. This information includes the following topics: “ThinApp Deployment Options” on page 25 “Establishing File Type Associations with the thinreg.
ThinApp User’s Guide Deploying ThinApp on Network Shares Small and medium enterprises tend to use a network share. You can create executable files for the captured application and store them on a network share. Each time you deploy a new application or an update to an existing package, you can notify client users to run the thinreg.exe utility with an appropriate option.
Chapter 3 Deploying Applications Run the thinreg.exe Utility This example provides some sample thinreg.exe 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. The following command shows the use of 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 with the Setup Capture wizard, 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 Modify the Package.ini File to Create MSI Files You must enter a value for the MSIFilename parameter to generate MSI files. For more information about MSI parameters, see “Customizing MSI Files with Package.ini Parameters” on page 29 and “Configuring MSI Files” on page 88. To edit the MSI parameters 1 In the Package.ini file, enter the MSI filename. MSIFilename=.msi For example, the filename for Firefox might be Mozilla Firefox 2.0.0.3.msi.
Chapter 3 Deploying Applications To override the MSI installation directory From the command line, type the msiexec /i .msi INSTALLDIR=C:\\ command. 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 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 load time of the runtime client across a network is a few milliseconds. After ThinApp loads the runtime client to memory on the client computer, the end‐user computer calculates which blocks of data are required from the server and reads them based on application activity. When the application makes subsequent read requests for the same data, the Windows disk cache provides data without requiring a network read operation.
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. See “Modifying Isolation Modes” on page 23. You can adjust isolation modes to resolve the problems in Table 3‐2. Table 3-2.
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 38 VMware, Inc.
4 Updating Applications 4 You can update captured 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 editing 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 85. To update Firefox 2.0.0.3 to Firefox 3 1 Capture Firefox 2.0.0.
Chapter 4 Updating 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 View of the Application using Application Link Figure 4‐1 shows the running application with a merged view of the system, the base application, and all linked components. Files, registry keys, services, COM objects, and environment variables from dependency packages are visible to the base application. Figure 4-1.
Chapter 4 Updating Applications 6 Open the Package.ini file in the captured application folder for the base application. 7 Enable the RequiredAppLinks parameter for the base application by adding the following line after the [BuildOptions] entry. RequiredAppLinks=dotnet.dat Application Link parameters must reference the primary data container of the application you want to link to. You cannot reference shortcut .exe files because these files do not contain any applications, files, or registry keys.
ThinApp User’s Guide Affecting Isolation Modes with Application Link ThinApp loads an Application Link layer during application startup and merges registry entries and file system directories. If ThinApp finds a registry subkey or file system directory that did not previously exist in the main package or layer that is already merged, ThinApp uses the isolation mode specified in the layer being loaded.
Chapter 4 Updating Applications For example, a base package might contain the a.vbs and b.vbs files and a dependent package might contain the b.vbs and c.vbs files. Because a filename collision exists between the b.vbs files, the VBScript in the last imported package specified in a RequiredAppLinks or OptionalAppLinks parameter overrides any previously imported scripts with the same name. In this case, ThinApp condenses the pool of four .vbs files into a single pool with the a.
ThinApp User’s Guide Running a captured application and customizing the settings and virtual environment. ThinApp stores the changes in the sandbox. Running the sbmerge.exe utility to merge registry and file system changes from the sandbox into the ThinApp project. Rebuilding the captured application with the build.bat file Deploying the updated application. Merge Sandbox Changes with Firefox This procedure for the sbmerge.exe utility uses Firefox 2.0.0.
Chapter 4 Updating Applications Optional Parameters The optional sbmerge.exe parameters specify project and sandbox paths and block progress messages and merging of sandbox files. Parameter Description -ProjectDir If you start the sbmerge.exe command from a location other than the application project folder, use the absolute or relative path to the project directory using the -ProjectDir parameter. A sample command is "C:\Program Files\VMware\VMware ThinApp\sbmerge" Print –
ThinApp User’s Guide You can update the package on a central computer and push the changes to client machines or central network shares as a new captured executable file. Use one of the following options for applying updates: During the setup capture process. Inside the virtual environment. Applications with auto‐update capabilities can undergo updates. If the update is a patch.exe file, the patch program can run in the virtual environment and run from a cmd.exe file entry point.
Chapter 4 Updating Applications 5 If you must deploy a more current update of Firefox, place it in the same directory with a higher number at the end. 6 Copy Version 2.0 of Firefox.exe to central share at \\\\Firefox.2 After Firefox.1 is unlocked, you can delete it, but Firefox.exe should remain in place because the user shortcuts continue to point there. ThinApp always uses the filename that has the highest version number.
ThinApp User’s Guide 50 VMware, Inc.
5 Monitoring and Troubleshooting ThinApp 5 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 5 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 5 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 5 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 5 Monitoring and Troubleshooting ThinApp 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.exe in the Virtual Environment Running one instance of the explorer.
ThinApp User’s Guide 60 VMware, Inc.
A Configuring Package Parameters A Advanced users can customize the parameters of the virtual application outside of the capture process. The Package.ini file is located in the project folder and contains parameters that configure a captured application during the build process. You must save the Package.ini file and build the project to have the parameters changes take effect.
ThinApp User’s Guide Package.ini File Structure The [BuildOptions] section of the Package.ini file applies to all applications. Individual applications inherit these parameters unless the application‐specific entries overrides these settings. For example, the [Adobe Reader 8.exe] section of the Package.ini file for an Adobe Reader application might have settings that override the larger [BuildOptions] parameters.
Appendix A Configuring Package Parameters Examples If the application starts from a network drive or a removable disk, the default value of the NetRelaunch parameter creates a local stub file to restart the application. [BuildOptions] NetRelaunch=1 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 might want to turn off the NetRelaunch parameter for stronger initial startup performance.
ThinApp User’s Guide When you specify an environment variable, the value returned is the value of the environment variable. If the value of the VirtualComputerName parameter is %VCOMPNAME%, and the %VCOMPNAME% environment variable is set to EnvCompName, the GetComputerName API returns EnvCompName. Wow64 The Wow64 parameter simulates a 32‐bit environment for 32‐bit applications that cannot run on a 64‐bit Windows operating system.
Appendix A Configuring Package Parameters RegistryIsolationMode The RegistryIsolationMode parameter controls the default isolation mode for registry keys in the package. This setting applies to the registry keys that do not have explicit settings. For more information about the definitions of isolation modes, see “Specify File System Access” on page 18. Registry isolation modes only exist in the Package.ini file. You cannot configure this setting in the Setup Capture wizard.
ThinApp User’s Guide Examples The capture process can specify protocols, such as the mailto protocol, for a Microsoft Outlook package. [Microsoft Office Outlook 2007.exe] Protocols=feed;feeds;mailto;Outlook.URL.mailto;stssync;webcal;webcals Configuring Build Output Build parameters specify the location of the build output and the files to exclude from the package. OutDir The OutDir parameter specifies the directory that stores the build.bat output. Do not change the value of this parameter.
Appendix A Configuring Package Parameters Examples You can customize the AccessDeniedMsg string with a technical support number. [BuildOptions] PermittedGroups=Administrator;OfficeUsers AccessDeniedMsg=You do not have permission to execute this application, please call support @ 1-800-822-2992 AddPageExecutePermission The AddPageExecutePermission parameter addresses applications that do not work in a Data Execution Prevention (DEP) environment.
ThinApp User’s Guide Examples You can specify a list of Active Directory user group names separated by semicolons. The [BuildOptions] parameters set global settings for the entire project. [BuildOptions] PermittedGroups=Administrator;OfficeUsers AccessDeniedMsg=You do not have permission to execute this application, please call support @ 1-800-822-2992 You can specify a user group setting for a specific application that overwrites the global PermittedGroups setting. [App1.
Appendix A Configuring Package Parameters Examples The default value of false ensures that the virtual application cannot access protected elements. [BuildOptions] UACRequestedPrivilegesUiAccess=false Configuring Objects and DLL Files You can use ThinApp parameters to specify COM object access and DLL loading requirements. ExternalCOMObjects The ExternalCOMObjects parameter controls whether ThinApp or Windows creates a specific COM object CLSID key.
ThinApp User’s Guide ThinApp isolates shared memory objects that embedded Internet Explorer instances use. A conflict occurs between the explorer.exe and iexplore.exe utilities when the utilities map sandbox files. You can use the IsolatedMemoryObjects parameter to isolate additional named shared memory objects to ensure that the objects are visible only to other virtual applications using the same sandbox.
Appendix A Configuring Package Parameters If you want the virtual Office 2007 to handle the object types, you can leave the ObjectTypes setting in the Package.ini file, build the package, and register it using the thinreg.exe utility. If you want the native Office 2003 to handle the object types, you must remove the ObjectTypes setting from the Package.ini file before building and registering the package. You cannot add random entries to the ObjectTypes parameter.
ThinApp User’s Guide Configuring Storage You can use ThinApp parameters to configure file storage and set up virtual drives. CachePath The CachePath parameter sets the path to the cache directory that stores font files and stub executable files. You can use this parameter to force the cache directory to reside on a different drive. This parameter can contain macros, such as %Local AppData%, that expand before use.
Appendix A Configuring Package Parameters VirtualDrives The VirtualDrives parameter specifies additional drive letters that are available to the application at runtime. Virtual drives are useful when applications rely on hard‐coded paths to drive letters that might not be available on the client computers. For example, certain legacy applications might expect that the D: drive is a CD‐ROM and that data files are available at D:\media.
ThinApp User’s Guide Configuring Processes and Services Process and service configuration involve parameters that specify write access to a native process or the startup and shutdown of virtual services. AllowExternalProcessModifications The AllowExternalProcessModifications parameter determines whether captured applications can write to a native process. For example, you might capture a speech recognition application that must inject itself into native applications to voice the text.
Appendix A Configuring Package Parameters Examples You can keep virtual services running when the application exits. [BuildOptions] AutoShutdownServices=0 You can stop virtual services when the last nonservice application exits. This is the default behavior. [BuildOptions] AutoShutdownServices=1 AutoStartServices The AutoStartServices parameter controls whether to start virtual service when the first application starts.
ThinApp User’s Guide Examples You can specify exceptions to running child processes in the virtual environment. When the virtual application starts a notepad.exe child process, the child process runs outside the virtual environment. [BuildOptions] ChildProcessEnvironmentExceptions=AcroRd.exe;notepad.exe ChildProcessEnvironmentDefault=Virtual Configuring File and Block Sizes You can use ThinApp parameters to compress file and block sizes for applications.
Appendix A Configuring Package Parameters Table A-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.2 minutes You can specify the CompressionType parameter in the Package.
ThinApp User’s Guide [myapp.exe] Source=%ProgramFilesDir%\myapp\app.exe Icon=%ProgramFilesDir%\myap\myicon.ico RetainAllIcons The RetainAllIcons parameter keeps all of the original icons of the source executable file in the captured executable file. By default, the tlink.exe utility constructs a new executable file using a source executable file. To reduce disk space, the new executable file image contains only icons that you can view from the system shell. The package contains all the other icons.
Appendix A Configuring Package Parameters Examples You can direct ThinApp to store log files in c:\ThinappLogs. [BuildOptions] LogPath=C:\ThinappLogs Unlike most paths in ThinApp, the log path cannot contain macros such as %AppData% or %Temp%. Configuring Versions ThinApp parameters provide information about the versions of application executable files and ThinApp.
ThinApp User’s Guide Configuring Locale Information ThinApp parameters that display locale information do not require changes. AnsiCodePage The AnsiCodePage parameter uses a numerical value to specify the country locale where you captured the application. ThinApp uses the value to translate multibyte strings. Examples The capture process generates the AnsiCodePage value. [BuildOptions] AnsiCodePage=1252 LocaleIdentifier The LocaleIdentifier parameter displays a numeric ID for the locale.
Appendix A Configuring Package Parameters Examples Use the /
ThinApp User’s Guide ReserveExtraAddressSpace The ReserveExtraAddressSpace parameter indicates the amount of extra address space to reserve for the captured executable file. The tlink.exe utility sets the Windows SizeOfImage field in the generated executable file based on the SizeOfImage field of the source executable file. The Windows loader uses the SizeOfImage field to determine how much virtual address space to reserve for the executable file.
Appendix A Configuring Package Parameters Examples You can create a shortcut in the Microsoft Office folder of the Start menu to the Microsoft Word 2003 application. [Microsoft Office Word 2003.exe] ReadOnlyData=bin\Package.ro.tvr Source=%ProgramFilesDir%\Microsoft Office\OFFICE11\WINWORD.EXE Shortcuts=%Programs%\Microsoft Office Source The Source parameter points to the executable file that ThinApp loads when you use a shortcut executable file.
ThinApp User’s Guide Configuring Dependent Applications with Application Link The Application Link utility keeps shared components or dependent applications in separate packages. In the Package.ini file, you can use the OptionalAppLinks and RequiredAppLinks entries to dynamically combine ThinApp packages at runtime on end‐user computers. This process enables you to package, deploy, and update component pieces separately and retain the benefits of application virtualization.
Appendix A Configuring Package Parameters Path names are on the deployment machine because the linking takes effect at runtime on the client machine. You can specify absolute paths, such as c:\abs\path\dotnet.exe, relative paths, such as relpath\dotnet.exe, and UNC paths, such as \\server\share\dotnet.exe. Path names can contain environment variables. Use semicolons to separate the linked packages. For more information about the Application Link utility, see “Application Link Updates” on page 41.
ThinApp User’s Guide You must comment the AppSyncURL parameter to activate all Application Sync parameters. The following entries are the default settings for Application Sync parameters: AppSyncURL=https://example.com/some/path/PackageName.exe AppSyncUpdateFrequency=1d AppSyncExpirePeriod=30d AppSyncWarningPeriod=5d AppSyncWarningFrequency=1d AppSyncWarningMessage=This application will become unavailable for use in AppSyncWarningPeriod days if it cannot contact its update server.
Appendix A Configuring Package Parameters AppSyncURL The AppSyncURL parameter sets the Web server URL or fileshare location that stores the updated version of an application. ThinApp checks this location and downloads the updated package. Application Sync works over the HTTP (unsecure), HTTPS (secure), and File protocols. Part of the HTTPS protocol involves checking the identity of the Web server. You can include a user name and a password in the AppSyncURL parameter for basic authentication.
ThinApp User’s Guide AppSyncWarningMessage The AppSyncWarningMessage parameter sets the message that appears when the warning period starts. The first time you start the application in the warning period, a warning message appears and ThinApp tries to access the update from the server. If ThinApp cannot update the package, ThinApp tries again every time the application starts. The warning message appears only after each AppSyncWarningFrequency period expires.
Appendix A Configuring Package Parameters Examples If a user installs the .msi file with a value of 1 for the MSIDefaultInstallAllUsers parameter, that user and all other users who log in to the computer can use shortcuts, file type associations, and more. You must have administrator rights for a machine installation. [BuildOptions] MSIFilename=mymsi.msi MSIDefaultInstallAllUsers=1 If a user installs the .
ThinApp User’s Guide Examples You can set the MSIManufacturer parameter to the name of your organization. The name does not have any effect other than appearing in the properties of the MSI database. [BuildOptions] MSIFilename=mymsi.msi MSIManufacturer=My Company Name MSIProductCode The MSIProductCode parameter specifies a product code for the MSI database. The parameter works only when the MSIFilename parameter requests the generation of a Windows Installer database.
Appendix A Configuring Package Parameters MSIUpgradeCode The MSIUpgradeCode parameter specifies an upgrade code for the MSI database. The parameter works only when the MSIFilename parameter requests the generation of a Windows installer database. VMware recommends that each MSI database have an upgrade code. The capture process generates a suitable upgrade code in the Package.ini file. Avoid changing the UpgradeCode value unless you verify that the new value is a valid GUID.
ThinApp User’s Guide You can use the same inventory name across different versions of the same application to ensure that only the most recent version appears in Add or Remove Programs list. The applications overwrite each other in the Add or Remove Programs list and prevent you from uninstalling all of the registered packages. If you want to uninstall more than one version, use a different inventory name for each version.
Appendix A Configuring Package Parameters SandboxNetworkDrives The SandboxNetworkDrives parameter determines whether ThinApp uses sandboxes for network‐mapped drives. Examples You can store changes in the sandbox and prevent the user from writing directly to network‐mapped drives. [BuildOptions] SandboxNetworkDrives=1 You can write directly to network‐mapped drives without storing changes in a sandbox. This is the default behavior.
ThinApp User’s Guide 94 VMware, Inc.
Bm ThinApp Sandbox B 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.
Appendix B 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.
C Snapshot Commands and Customization C 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 need 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.
Appendix C Snapshot Commands and Customization 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 C‐1 describes sample commands for the snapshot.exe utility. The parameters are not case‐sensitive. The commands are wrapped in the Command column because of space restraints.
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.
D ThinApp Virtual File System D ThinApp stores the differences between snapshots during the setup capture process in a virtual file system and virtual registry.
ThinApp User’s Guide Using Folder Macros ThinApp uses macros to represent file system path locations that might change when virtualized applications run on different Windows operating systems or computers. The use of macros allows shared application profile information to instantly migrate to different operating systems. 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.
Appendix D ThinApp Virtual File System Table D-1. Folder Macros (Continued) Macro Name Typical Location %Favorites% C:\Documents and Settings\\Favorites %Fonts% C:\Windows\Fonts %History% C:\Documents and Settings\\Local Settings\History %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 Do
ThinApp User’s Guide 106 VMware, Inc.
E ThinApp Scripts E 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.
Appendix E 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, LastSlash) 3 F
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.
Appendix E ThinApp Scripts 4 Enter the information in the system registry. RegEditPid = ExecuteExternalProcess("regedit /s " and chr(34) and RegFileName and 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.
Appendix E 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 117.
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 (ʺʺ).
Appendix E 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.
Appendix E 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("cmd.exe") WaitForProcess(id, 0) 118 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 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.exe utility merges runtime changes recorded in the sandbox back into a ThinApp project. snapshot A recording of the state of the Windows file system and registry during the application capture process. The Setup Capture process uses the snapshot.
ThinApp User’s Guide 122 VMware, Inc.
Index Symbols ##Attributes.ini comparing to Package.ini 23, 62 editing 23 modifying isolation modes 23 A Active Directory authorizing access to groups 18 controlling access to applications 31 using Package.
ThinApp User’s Guide deployment tools, using MSI files 25 device drivers, incompatible with ThinApp 12 DLLs loading into memory 55 recording by Log Monitor 51 drivers, support for 34 E entry points defining 16 for troubleshooting 17 updating with Application Sync 41 G global hook DLLs, reduced function with ThinApp 12 I iexplore.
Index DisableTracing 78 editing Application Sync parameters 40 ExcludePattern 66 ExternalCOMObjects 69 ExternalDLLs 69 FileTypes 65 Icon 77 InventoryName 91 IsolatedMemoryObjects 69 IsolatedSynchronizationObjects 70 LocaleIdentifier 80 LocaleName 80 LogPath 78 modifying isolation modes 23 modifying MSI parameters 30 MSI parameters 29 MSIArpProductIcon 88 MSIDefaultInstallAllUsers 88 MSIFilename 89 MSIInstallDirectory 89 MSIManufacturer 89 MSIProductCode 90 MSIProductVersion 90 MSIRequireElevatedPrivileges
ThinApp User’s Guide snapshot.exe creating snapshots from the command line 99 sample commands 101 sample procedure 101 snapshot.