Capturing Multiple Application Installers with ThinApp Converter
On virtual machines running a Windows operating system, you can use ThinApp Converter to convert multiple application installers into ThinApp packages. After you provide a configuration file with specific settings that the converter accesses, ThinApp Converter runs applications in silent mode. Silent mode means that the process occurs without requiring user input, after initial configuration settings are specified. ThinApp Converter transparently captures installation content, generates ThinApp projects, and build the projects into a ThinApp package in virtual machines you specify in the configuration file. This process is fully automated, from when ThinApp Converter starts to run until the ThinApp package is built.
The ThinApp executable file and the application installers can run on virtual machines.
ThinApp Converter Process
Before you run ThinApp Converter, you must use the ThinAppConverter.ini configuration file as a template to specify the virtual machine environment on which the applications to be converted reside, the network share paths, and various other mandatory and optional parameters. You then use the -f command line switch to specify the configuration file that you created, which ThinApp Converter will use. For example, ThinAppConverter.exe -f myConfig.ini.
ThinApp Converter reads the configuration file to identify which installers are to be converted and the virtual machines on which the conversion is to occur.
ThinApp Converter then powers on each virtual machine and takes a snapshot that is used after the conversion process is complete.
After the snapshot is taken, ThinApp Converter pushes a silent capture agent to virtual machines. The silent capture agent runs transparently on the virtual machines, capturing the application installation process in a similar way to that of the Setup Capture wizard when a single application is being captured. The silent capture agent performs the following actions:
The silent capture agent then returns control to the ThinApp Converter, which reverts the virtual machines to their precapture state, using their original snapshot.
The process is then repeated for the next application installation process that needs to be converted. When multiple virtual machines are specified, the capture agent runs on the machines simultaneously. As a virtual machine becomes available, it is once again used for converting the next application
ThinApp Converter Limitations
Not all application installation processes support silent installation mode. ThinApp Converter does not support automatic capture for an installation process that does not support silent installation.
System Requirements for Running ThinApp Converter
ThinApp Converter requires one of the following virtual machine environments:
The virtual machines that are used in the conversion process must have the following items installed:
ThinApp Converter includes a private copy of the VMware VIX API library. If a more recent version of the library already exists on the host machine, ThinApp Converter tries to use the newest version.
VMware recommends that you use Windows 2003 or Windows 2008 as a file server for network share. The file server needs to have sufficient system resources to handle a large quantity of file operations. Do not use the host machine that runs the ThinApp Converter executable file as the file server for the network share.
When using a VMware Workstation environment, ensure that the network settings are in bridged mode.
Preparing the Configuration File for ThinApp Converter
A sample configuration file, ThinAppConverter.ini, is included in the ThinApp installation. The file is generally located in C:\Program Files\VMware\VMware ThinApp.
Modify or create a copy of this file to suit your requirements. Use UTF-8 encoding when you specify parameter values.
The ThinAppConverter.ini configuration file includes the following section headings:
[HostEnvironment] contains virtual machine hosting parameters.
[VirtualMachineN] contains virtual machine-specific parameters.
[Settings] contains parameters that provide global control of the capture process.
[AppSettings:AppName] contains optional application-specific parameters.
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.
You cannot specify more than one ESX server. To use more than one ESX server, configure ThinAppConverter.exe to connect to VMware vCenter Server, which manages multiple ESX servers.
VirtualMachineHost
The name of the virtual machine to which ThinApp Converter is to connect.
Examples
The following example shows a virtual machine specified by ESX server hostname.
[HostEnvironment]
VirtualMachineHost=MyEsx.vmware.com
The following example shows a virtual machine specified by IP address.
[HostEnvironment]
VirtualMachineHost=10.13.11.23
The following example shows a local machine specified as localhost.
[HostEnvironment]
VirtualMachineHost=localhost
HostLoginUserName
The login user name for the host machine.
Use the same login user name for connecting to the server as you use for logging in to the VMware vSphere Client. You must have sufficient privileges to turn on and off virtual machines, take virtual machine snapshots, and so on.
You can use UPN format when you specify a user name for vCenter. For example, user@domain.com.
HostLoginUserName is ignored when logging into VMware Workstation.
HostLoginPassword or HostLoginPasswordBase64
The login password for the host machine. You have the following options when you specify passwords:
You can specify a base64 encoded password for the HostLoginPasswordBase64 parameter. Specifying an encoded password does not increase security. You need to protect the actual INI file.
All passwords are handled in the same way.
HostLoginPasswordPrompt
Specifies that the user be prompted to enter a password.
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. A password has been specified, however the user will still be prompted to enter as password, as specified in HostLoginPasswordPrompt.
[HostEnvironment]
VirtualMachineHost=MyEsx.vmware.com
HostLoginUserName=root
HostLoginPassword=secret
HostLoginPasswordPrompt=true
VirtualMachineN
The VirtualMachineN section of the configuration file contains a list of the Windows-based virtual machines that will be utilized in the conversion process.
Create a VirtualMachineX section for each virtual machine that you want to include, and specify their parameters. X is 1, and subsequent virtual machine sections are numbered sequentially.
[VirtualMachineN] parameters are mandatory.
VmxPath
Specify the configuration path of the virtual machine.
For ESX Server or vCenter Server, you can identify the virtual machine configuration file path using the vSphere Client.
Identify the virtual machine configuration path using the vSphere Client
1
2
Click the Options tab, and copy the string from the Virtual Machine Configuration File field.
3
For Workstation, specify the entire file path on the host on which the VMX configuration file resides. For example, C:\MyVMs\Windows XP\Windows XP.vmx. Do not place the path in quotation marks, even if the path contains a space.
UserName
A valid user name for the virtual machine guest operating system. The user must have administrator privileges for the virtual machine guest operating system.
You can use UPN format when you specify a user name. For example, user@domain.com.
Password or PasswordBase64
A valid password for the virtual machine guest operating system. You have the following options when you specify passwords:
Specifying an encoded password does not increase security strength. You need to protect the actual INI file.
All passwords are handled in the same way.
If the Password setting is not used, the password for the guest is assumed to be blank. Most Windows virtual machines do not support automation with empty passwords, so you should specify a guest password.
PasswordPrompt
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.
[VirtualMachine1]
VmxPath=[Storage] WinXP_Converter/WinXP_Converter.vmx
UserName=administrator
Password=secret
PasswordPrompt=false
Following is an example for a VMware Workstation-based virtual machine. On virtual machine 1, PasswordPrompt has been set to true. The user will be prompted for a password even though a password has been specified in the configuration.
[VirtualMachine1]
VmxPath=C:\MyVMs\Windows XP\Windows XP.vmx
UserName=administrator
Password=secret
PasswordPrompt=true
[VirtualMachine2]
VmxPath=C:\MyVMs\Windows 7\Windows 7.vmx
UserName=adminuser@mydomain.com
Password=
PasswordPrompt=true
Settings
The Settings section of the configuration file contains the parameters for the application installation directory and ThinApp project output directory, in the form of UNC. It also contains several parameters controlling the conversion process behavior.
ThinApp Converter only requires read-only permissions for the network share that contains the application installers. It requires read/write permissions for the network share that contains the ThinApp projects.
If input and output directories are on the same file server, you must use the same user account to connect them.
InputUncPath
Specify the network share UNC path for the application installers. For example: \\fileserver\sharename, or \\fileserver\sharename\dirname.
InputMountUserName
Specify the user name used for connecting to that network share. UPN format can be used when you specify a domain user, for example user@domain.com
InputMountPassword or InputMountPasswordBase64
Specify the password for connecting to the network share. You have the following options when you specify passwords:
InputMountPasswordPrompt
Specifies that the user be prompted to enter a password.
If you do not want to store the network share 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.
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. You have the following options when you specify passwords:
OutputMountPasswordPrompt
Specifies that the user be prompted to enter a password.
If you do not want to store the network share 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.
Example
Following is an example of network share specifications.The user for the application installation directory has only read permissions. For both the input and output network shares, a prompt will display, requiring a user to enter a password.
[Settings]
InputUncPath=\\AppInstallerServer\AppInstallers\ThinAppMigration
InputMountUserName=readonlyUser
InputMountPassword=secret
InputMountPasswordPrompt=true
OutputUncPath=\\DeploymentServer\ThinAppProj
OutputMountUserName=readwriteUser
OutputMountPassword=secret
OutputMountPasswordPrompt=true
ThinApp Converter Logic for Detecting the Application Installation Processes
For the application installer’s network share, ThinApp Converter examines all subdirectories under the specified UNC path recursively, including their subdirectories. For each subdirectory, it determines which command to run for silent application installation using the following logic:
1
Attempts to find a value for InstallationCommand in the [AppSettings:AppName] section of the configuration file. If successful ThinApp Converter uses that value.
2
Attempts to find a file named install.cmd or install.bat. If successful, ThinApp Converter runs that file.
3
If ThinApp Converter finds a single .cmd or .bat file, it runs that file.
4
If ThinApp Converter finds a single .exe file, it runs that file.
5
If ThinApp Converter finds a single .mst file, it runs that file and adds the necessary silent installation switches.
6
If ThinApp Converter finds a single .msi file, it runs that file and adds the necessary silent installation switches.
If none of the steps enable ThinApp Converter to find a correct installation command, the subdirectory is skipped. A warning is logged in the log file.
You must remove all network connections to the file server referenced in the INI file from the host on which you run ThinApp Converter, to prevent conflict between user credentials.
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.ini override file is formatted like a standard Windows INI file. You can add INI parameters and values that are relevant to the Package.ini file.
The path is relative to the application installer’s network share. Using the example for specifying the network shares for the application installers and ThinApp projects, if you specify PackageIniOverrideFile=override.ini, ThinApp Converter will try to find the file under \\AppInstallerServer\AppInstaller. You can provide a more explicit value by using predefined variables. For more information, see Predefined Environment Variables.
You can specify a Package.ini file for each application. This process is described as part of the [AppSettings:AppName] section.
ExclusionList
Specify a comma- or semicolon-separated list of application directories that ThinApp will skip when searching for application installers.
The list is case insensitive.
You can specify wildcards for DOS-style file names. For example, Microsoft*. ? and * are supported.
Example
Following is an example of an exclusion specification using a wildcard.
[Settings]
ExclusionList=App?.old;FireFox1.0
ProjectPostProcessingCommand
Specify the file path to the project post processing command.
The file path is relative to the application installer’s network share. Using the example for specifying the network shares for the application installers and ThinApp projects, if you specify ProjectPostProcessingCommand=addscript.bat, ThinApp Converter will try to find the file under \\AppInstallerServer\AppInstaller. You can provide a more explicit value by using predefined variables. For more information, see Predefined Environment Variables.
StopOnError
Specify whether ThinApp Converter should stop converting an application if it encounters an error, or continue with the other applications. The default value is false.
BuildAfterCapture
Specify whether the ThinApp Converter should build the ThinApp Projects into packages following capture.
The default value is true.
DetectIdle
Specify whether ThinApp Converter should try to detect if an application installer is stalled, for example when the application is waiting for user input on the guest virtual machine because incorrect silent installation switches were specified.
The default value is true. ThinApp Converter might not be able to detect all situations in which the installer is idle.
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. In most circumstances, you will not need to configure this section.
InstallationCommand
Specify how ThinApp Converter should start the application installer. If there is no value, ThinApp Converter attempts to select one installation command using the logic described in ThinApp Converter Logic for Detecting the Application Installation Processes.
PackageIniOverrideFile
The Package.ini override file that is applied to a single application installer. When this parameter has a value, the global override file is processed first, followed by this application-specific override file.
The file path is relative to the application installer subdirectory. Using the example at the bottom of this section, if you specify PackageIniOverrideFile=override.ini, ThinApp Converter will try to find the file under \\AppInstallerServer\AppInstaller\Adobe. You can provide a more explicit value by using predefined variables. For more information, see Predefined Environment Variables.
ProjectPostProcessingCommand
Specify the project post processing command for the specific application.
When this parameter has a value, the global override file is processed first, followed by this application-specific post processing command.
Example
Following is an example of how to apply an application-specific override during post processing.
[AppSettings:Adobe]
InstallationCommand=AdbeRdr920_en_US.exe /sAll
PackageIniOverrideFile=override.ini
[AppSettings:TextPad]
InstallationCommand=silent_install.bat
ProjectPostProcessingCommand=%AppInstallerDir%\addscript.bat
Predefined Environment Variables
The values for PackageIniOverrideFile (global and per application), ProjectPostProcessingCommand (global and per application), and InstallationCommand can contain environment variables. ThinApp Converter expands the value before using it.
ThinApp Converter adds these variables as predefined environment variables:
%AppInstallersRootDir% - The UNC path of the application installers that is specified in InputUncPath in the [Settings] section.
%AppInstallerDir% - The subdirectory under %AppInstallersRootDir% for the relevant application.
%ThinAppProjectsRootDir% - The UNC path for the generated ThinApp projects that is specified in OutputUncPath in the [Settings] section.
%ThinAppProjectDir% - The subdirectory under %ThinAppProjectsRootDir% for the relevant application.
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\Adobe\AppSyncSettings.ini