ThinApp User’s Guide ThinApp 5.1 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.
Title 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 © 2014 VMware, Inc. All rights reserved. Copyright and trademark information VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc.
Contents About This Book 7 1 Installing ThinApp 9 ThinApp Requirements 9 Operating Systems, Applications, and Systems That ThinApp Supports 9 Applications That ThinApp Cannot Virtualize 10 Recommendations for Installing ThinApp 11 Using a Clean Computer 11 Using the Earliest Operating System Required for Users 11 Install ThinApp Software 11 Checking ThinApp Installation Files 12 Disable Entry Point Shortcuts 12 2 Capturing Applications 15 Phases of the Capture Process 15 Preparing to Capture Application
ThinApp User’s Guide Configuration Instructions for Group Policy Settings 35 3 Deploying Applications 37 ThinApp Deployment Options 37 Deploying ThinApp with Deployment Tools 37 Deploying ThinApp in the VMware View Environment 37 Deploying ThinApp on Network Shares 38 Deploying ThinApp Using Executable Files 38 Establishing File Type Associations with the thinreg.exe Utility 38 Application Sync Effect on the thinreg.exe Utility 38 Run the thinreg.exe Utility 39 Optional thinreg.
Contents 5 Locating the ThinApp Sandbox 67 Search Order for the Sandbox 67 Controlling the Sandbox Location 69 Store the Sandbox on the Network 69 Store the Sandbox on a Portable Device 69 Sandbox Structure 70 Making Changes to the Sandbox 70 Listing Virtual Registry Contents with vregtool 70 6 Creating ThinApp Snapshots and Projects from the Command Line 71 Methods of Using the snapshot.exe Utility 71 Creating Snapshots of Machine States 71 Creating the Template Package.
ThinApp User’s Guide 9 Monitoring and Troubleshooting ThinApp 93 Providing Information to Technical Support 93 Log Monitor Operations 93 Troubleshoot Activity with Log Monitor 94 Perform Advanced Log Monitor Operations 94 Log Format 96 Troubleshooting Specific Applications 100 Troubleshoot Registry Setup for Microsoft Outlook 100 Viewing Attachments in Microsoft Outlook 100 Starting Explorer.
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 VMware Professional Services VMware Education Services courses offer extensive hands-on labs, case study examples, and course materials designed to be used as on-the-job reference tools. Courses are available onsite, in the classroom, and live online. For onsite pilot programs and implementation best practices, VMware Consulting Services provides offerings to help you assess, plan, build, and manage your virtual environment.
1 Installing ThinApp 1 You can use 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 some application types. Applications that do not natively support the deployment operating system.
Chapter 1 Installing ThinApp Recommendations for Installing ThinApp When you install ThinApp, consider the recommendations and best practices for the software. Using a Clean Computer VMware recommends using a clean computer to install ThinApp because the environment affects the application capture process. A clean computer is a physical or virtual machine with only a Windows operating system installed.
ThinApp User’s Guide Checking ThinApp Installation Files The ThinApp installation generates the VMware ThinApp directory in C:\Program Files\VMware. You might check the files in this directory to perform operations such as starting the Log Monitor utility to view recent activity. The following key files in the VMware ThinApp directory affect ThinApp operations: AppSync.exe – Keeps captured applications up to date with the latest available version. logging.dll – Generates .trace files. dll_dump.
Chapter 1 Installing ThinApp 6 If you have targeted your GPO policy for the Machine, expand Computer Configuration. 7 If you have targeted your GPO policy at the user or both, expand User Configuration. 8 Navigate to Policies > Administrative Templates > VMware ThinApp Management. 9 Click the 7zip node to display the feature specific policy settings on the right-pane. 10 Open policy setting and follow the instructions in the help box to configure the policy settings.
ThinApp User’s Guide 14 VMware, Inc.
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 enables 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 5 Close the application. 6 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 Set User Groups ThinApp can use Active Directory groups to authorize access to the virtual application. You can restrict access to an application to ensure that users do not pass it to unauthorized users. Active Directory Domain Services define security groups and distribution groups. ThinApp can only support nested security groups. Set user groups in the Setup Capture wizard 1 2 On the Groups page, limit the user access to the application.
Chapter 2 Capturing Applications When you select Merged isolation, ThinApp completes the following operations: Sets the DirectoryIsolationMode parameter in the Package.ini file to Merged. Sets up exceptions that apply WriteCopy isolation to the following directories and their subdirectories: %AppData% %Common AppData% %Local AppData% %Program Files Common% %ProgramFilesDir% %SystemRoot% %SystemSystem% ThinApp retains Merged isolation mode for the %SystemSystem%\spool subdi
ThinApp User’s Guide Set File System Isolation Modes The capture process sets the level of read and write access to the physical file system to determine which directories are visible and writable by the virtual application. For information about Full isolation and registry isolation that are available only outside of the Setup Capture wizard, see “DirectoryIsolationMode” on page 64 and “RegistryIsolationMode” on page 65.
Chapter 2 Capturing Applications Customize ThinApp Project Settings A project is the data that the capture process creates. You cannot run or deploy the captured application until you build a package from the project files. Setting up the project involves determining the inventory name and the project location. The inventory name facilitates internal tracking of the application and determines the default project directory name.
ThinApp User’s Guide Customize Package Settings The capture process includes initial settings for the primary data container, MSI packages, and executable package compression. Customize package settings in the Setup Capture wizard 1 2 On the Package Settings page, select the primary data container from the list that is based on your executable file entry points. If the size of the primary container is smaller than 200MB, ThinApp creates a .exe file as the primary container.
Chapter 2 Capturing Applications Build Virtual Applications You can adjust project files and build the application for deployment. Build virtual applications in the Setup Capture wizard 1 2 (Optional) On the Ready to Build page, scan or change the project files. Option Description Edit Package.ini Modify application parameters for the entire package. Open project folder Browse ThinApp project files in Windows Explorer.
ThinApp User’s Guide Modify the Package.ini File Use a text editor to modify the Package.ini file. Modify the Package.ini file 1 Open the Package.ini file located 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. 2 Activate the parameter to edit by removing the semicolon at the beginning of the line. For example, activate the RemoveSandboxOnExit parameter for Firefox.
Chapter 2 Capturing Applications Requirements for Capturing Internet Explorer 6 on Windows XP Before you start the Setup Capture wizard the following requirements must be met: You must have a clean virtual machine with Windows XP installed. Ensure that Windows XP includes all the service packs and Microsoft updates, so that Internet Explorer 6 is captured with the latest security fixes from Microsoft. ThinApp must be installed on the same machine.
ThinApp User’s Guide Extracting and Registering ThinDirect After you have built the Internet Explorer 6 package, you need to extract and register the ThinDirect plug-in on the test machine. The ThinDirect plug-in must be installed as part of the virtual package. The plug-in is installed in your native browser during the registration process. Extract and register ThinDirect In the console, run the thinreg /a VirtIE6.
Chapter 2 Capturing Applications Runs a ThinApp prescan Installs an application from the network share specified in the configuration file Runs a postscan Generates a ThinApp project on the network share specified in the configuration file Performs project post-processing tasks Builds the ThinApp project on the network share into a package The silent capture agent then returns control to the ThinApp Converter, which reverts the virtual machines to their precapture state, using their
ThinApp User’s Guide HostEnvironment The HostEnvironment section of the configuration file contains the connection parameters for connecting to VMware ESX Server, VMware vCenter Server, or VMware Workstation on a local machine. [HostEnvironment] parameters are mandatory. You can only specify a single endpoint at a time in the configuration file. For example, if you plan to use a single VMware ESX Server, you can have ThinAppConverter.exe directly connect to that server.
Chapter 2 Capturing Applications If you do not want to store the vSphere Server password in the configuration file, specify the value as true. When set to true, a prompt always appears, even if a HostLoginPassword is specified in the configuration file. Example The following example shows a typical host environment specification. The virtual machine name is specified as the ESX server hostname.
ThinApp User’s Guide Specifies that the user be prompted to enter a password. If you do not want to store the virtual machine password in the configuration file, specify the value as true. When set to true, a prompt always appears, even if a password is specified in the configuration file. Examples Following is an example for an ESX server-based environment. A password has been specified and, as PasswordPrompt is set to false, the user will not be prompted to enter a password.
Chapter 2 Capturing Applications OutputUncPath Specify the network share UNC path to the location of the generated ThinApp projects. For example: \\fileserver\sharename, or \\fileserver\sharename\dirname OutputMountUserName Specify the user name used for connecting to the OutputUncPath network share. UPN format can be used to specify a domain user, for example, user@domain.com. OutputMountPassword or OutputMountPasswordBase64 Specify the password for connecting to the network share.
ThinApp User’s Guide PackageIniOverrideFile Specify the file path to the global Package.ini override file. This optional parameter enables you to specify a global override file for Package.ini that is generated for each ThinApp project. The values in the override file are merged into Package.ini in the ThinApp project that is generated for each application. Global overrides are useful when you have a global policy setting, for example, PermittedGroup in Package.ini. A Package.
Chapter 2 Capturing Applications InstallerTimeout Specify how long ThinApp Converter should wait for an application installer to finish before it quits. By default, the value is 7200 seconds. AppSettings:AppName This optional section provides parameters that you can use to add settings that are specific to an application. AppName is the actual name of the subdirectory that contains the application installer. These parameters can be added to each AppSettings section.
ThinApp User’s Guide Example Following is an example of how predefined variables can be used in the PackageIniOverrideFile, ProjectPostProcessingCommand, and InstallationCommand parameters. [Settings] PackageIniOverrideFile=%AppInstallersRootDir%\AppSyncSettings.ini ;will resolve to \\AppInstallerServer\AppInstaller\AppSyncSettings.ini [AppSettings:Adobe] InstallationCommand=AdbeRdr920_en_US.exe /sAll PackageIniOverrideFile=%AppInstallerDir%\override.ini ;will resolve to \\AppInstallerServer\AppInstaller\A
Chapter 2 Capturing Applications When you install ThinApp 5.1, a new folder named Policy is created in the installation directory. The policies folder contains tools and templates for managing ThinApp packages. AppPolicy.exe README.TXT ThinAppBase.adml ThinAppBase.admx ThinAppGeneric.adml ThinAppGeneric.admx Administrative Template Files Administrative Template files contain markup language that is used to describe a registry-based Group Policy.
ThinApp User’s Guide Place Administrative Template files on a Domain Controller You can copy the base administrative and application template files to the Windows directory for a specific version of the domain controller. 1 Copy the ThinAppBase.admx file to %WINDIR%\PolicyDefinitions. 2 Copy the ThinAppBase.adml file in %WINDIR%\PolicyDefinitions\en-US. 3 Copy ThinApp_FF28.admx to %WINDIR%\PolicyDefinitions. 4 Copy ThinApp_FF28.adml to %WINDIR%\PolicyDefinitions\en-US.
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 37 “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 38. 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 Purpose Sample Usage /a, /allusers 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. thinreg.
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 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 3 From the Start menu, select Programs > Administrative Tools > Services. Your virtual service application appears in the list of services. You can manage the service in the same way as any natively installed service. Using ThinApp Packages Streamed from the Network Any network storage device can serve as a streaming server for hundreds or thousands of client computers. See Figure 3-1. Figure 3-1.
ThinApp User’s Guide Figure 3-2. Application Streaming packaged executable VMware ThinApp VOS local PC 128KB read request virtual registry compressed file 64KB (Block 1) 64KB (Block 2) decompressed (Block 1) Ethernet decompressed (Block 2) 64KB (Block 3) 64KB (Block 4) 64KB (Block 5) Requirements and Recommendations for Streaming Packages ThinApp does not require specific server software to provide streaming capability. Any Windows file share, NAS device, or SMB share can provide this capability.
Chapter 3 Deploying Applications Stream ThinApp Packages from the Network Users can access packaged applications through the network. Stream packages from the network 1 Place the ThinApp package in a location accessible to client computers. 2 Send a link to users to run the application directly. Using Captured Applications with Other System Components Captured applications can interact with other components installed on the desktop.
ThinApp User’s Guide Table 3-2. Default Configuration Options (Continued) Component Description Network mapped drives By default, any user who has access rights can read or write to any location on a network mapped disk. UNC network paths By default, any user who has access rights can read or write to any location on a UNC network path. Accessing the System Registry By default, captured applications can read the full system registry as permitted by access permissions.
Chapter 3 Deploying Applications 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-3. Table 3-3. 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. Use the Full isolation mode.
ThinApp User’s Guide 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 50 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, refer ThinApp Package.ini Parameters Reference Guide. 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 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. 2 Copy the /bin directory in the captured application directory to a clean virtual machine or delete the sandbox for the Microsoft Office package.
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 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 Not Configured. If you do not configure this setting, then ThinApp will perform AppLink using the AppLink parameters defined in the package. If the package does not contain any AppLink parameters, the runtime will not perform AppLink. Enabled. If you enable this setting, then ThinApp performs AppLink even if the package does not contain any AppLink parameters.
Chapter 4 Updating and Linking Applications 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 ThinA
ThinApp User’s Guide 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. With ThinApp, the ngen.
Chapter 4 Updating and Linking Applications 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.exe.1. If you are a new user, ThinApp starts the application with the new package data in Firefox.exe.1.
ThinApp User’s Guide 4 On the Domain Controller, copy the ThinApp_AdobeReader.admx to C:\Windows\PolicyDefinitions. 5 Copy the ThinApp_AdobeReader.adml in C:\Windows\PolicyDefinitions\en-US. The new entry will be visible under Domains > Policy Settings. 6 Right click on System and select System > Select Available Policy > Enforce. 7 Navigate to Policies > Admin Templates > VMware ThinApp Management. 8 Double click AppSync.
Chapter 4 Updating and Linking Applications Sandbox Considerations for Upgraded Applications When you upgrade an application, you can control whether users continue to use their previous settings by keeping the sandbox name consistent in the Package.ini file. You can prevent users from using an older sandbox with an upgraded application by packaging the upgraded application with a new name for the sandbox. Starting the upgraded application the first time creates the sandbox with the new name.
ThinApp User’s Guide 66 VMware, Inc.
5 Locating the ThinApp Sandbox 5 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 find 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 5 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.
6 Creating ThinApp Snapshots and Projects from the Command Line 6 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 capability 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. Table 6-1. Snapshot Directories and Subkeys 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.
Chapter 6 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 6-2 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.
Chapter 6 Creating ThinApp Snapshots and Projects from the Command Line snapshot64.exe:Is used to extract an existing ThinApp project into a capture and build 64-bit operating system. In the following example, ThinApp extracts an existing virtual Microsoft Office 2010 64-bit application onto a Windows 7, 64-bit native operating system. Example: snapshot64.exe "c:\Microsoft Office 64-bit Components 2010" -installnative -installnative option extracts the existing ThinApp project into the native oper
ThinApp User’s Guide 76 VMware, Inc.
7 ThinApp File System Formats and Macros 7 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 7 ThinApp File System Formats and Macros Table 7-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 80 VMware, Inc.
8 Creating ThinApp Scripts 8 Scripts modify the behavior of virtual applications dynamically. You can create custom code before starting an application packaged with ThinApp or after an application exits. You can use scripts to authenticate users and load configuration files from a physical to virtual environment. Callback functions run code during specific events. If applications create child processes, use callback functions to run code only in the main parent process.
ThinApp User’s Guide The following callback example shows the OnFirstSandboxOwner and OnFirstParentExit functions. ------------------------example.
Chapter 8 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. 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)
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 8 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 8 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 91.
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 8 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 8 Creating ThinApp Scripts SetfileSystemIsolation The SetfileSystemIsolation(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) 92 VMware, Inc.
9 Monitoring and Troubleshooting ThinApp 9 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 9 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 9 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 find 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 9 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 9 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 102 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 106 VMware, Inc.
Index Symbols ##Attributes.ini comparing to Package.ini 24 editing 24 A Active Directory authorizing group access 18 controlling access to applications 43 using Package.
ThinApp User’s Guide MSI files 37 deployment tools, using MSI files 37 device drivers, incompatible with ThinApp 10 DLLs loading into memory 97 recording by Log Monitor 93 drivers, support for 47 E entry points defining 17 for troubleshooting 17 in Setup Capture wizard 17 updating with Application Sync 53 G global hook DLLs, reduced function with ThinApp 10 I IE6 on Windows XP capturing 24 requirements 24 iexplore.
Index .bat example 82 .
ThinApp User’s Guide 110 VMware, Inc.