Você está na página 1de 146

ThinApp Users Guide

ThinApp 4.6.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.

EN-000400-01

ThinApp Users 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 2011 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.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.

VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com

VMware, Inc.

Contents

AboutThisBook

1 InstallingThinApp 11
ThinAppRequirements 11 OperatingSystems,Applications,andSystemsThatThinAppSupports 11 ApplicationsThatThinAppCannotVirtualize 12 RecommendationsforInstallingThinApp 12 UsingaCleanComputer 12 UsingtheEarliestOperatingSystemRequiredforUsers 13 InstallThinAppSoftware 13 CheckingThinAppInstallationFiles 13

2 CapturingApplications 15
PhasesoftheCaptureProcess 15 PreparingtoCaptureApplications 15 CapturingApplicationswiththeSetupCaptureWizard 16 CreateaSystemImageBeforetheApplicationInstallation 16 RescantheSystemwiththeInstalledApplication 16 DefiningEntryPointsasShortcutsintotheVirtualEnvironment 17 SetEntryPoints 17 SetUserGroups 18 DefiningIsolationModesforthePhysicalFileSystem 18 SetFileSystemIsolationModes 20 StoringApplicationChangesintheSandbox 20 CustomizetheSandboxLocation 20 SendAnonymousStatisticstoVMware 20 CustomizeThinAppProjectSettings 21 DefiningPackageSettings 21 CustomizePackageSettings 22 OpeningProjectandParameterFiles 22 BuildVirtualApplications 23 AdvancedPackageConfiguration 23 ModifyingSettingsinthePackage.iniFile 23 ModifyingSettingsinthe##Attributes.iniFile 24 GuidelinesforPackagingMicrosoftOffice2007 24 RequirementsforPackagingMicrosoftOffice2007 25 CapturingMicrosoftOffice2007 25 ConfigureMicrosoftOffice2007 27 CapturingInternetExplorer6onWindowsXP 28 RequirementsforCapturingInternetExplorer6onWindowsXP 28 CaptureInternetExplorer6onWindowsXPbyUsingtheSetupCaptureWizard 28 CaptureInternetExplorer6onWindowsXPFromtheCommandLine 29 ExtractingandRegisteringThinDirect 30 CapturingMultipleApplicationInstallerswithThinAppConverter 30 ThinAppConverterConversionProcess 30 SystemRequirementsforRunningThinAppConverter 32 PreparingtheConfigurationFileforThinAppConverter 32 PredefinedEnvironmentVariables 38

VMware, Inc.

ThinApp Users Guide

3 DeployingApplications 39
ThinAppDeploymentOptions 39 DeployingThinAppwithDeploymentTools 39 DeployingThinAppintheVMwareViewEnvironment 39 DeployingThinApponNetworkShares 40 DeployingThinAppUsingExecutableFiles 40 EstablishingFileTypeAssociationswiththethinreg.exeUtility 40 ApplicationSyncEffectonthethinreg.exeUtility 40 Runthethinreg.exeUtility 41 Optionalthinreg.exeParameters 41 BuildinganMSIDatabase 43 CustomizingMSIFileswithPackage.iniParameters 43 ModifythePackage.iniFiletoCreateMSIFiles 43 ControllingApplicationAccesswithActiveDirectory 45 Package.iniEntriesforActiveDirectoryAccessControl 45 StartingandStoppingVirtualServices 46 AutomaticStartupforVirtualServices 46 UsingThinAppPackagesStreamedfromtheNetwork 47 HowThinAppApplicationStreamingWorks 47 RequirementsandRecommendationsforStreamingPackages 48 StreamThinAppPackagesfromtheNetwork 49 UsingCapturedApplicationswithOtherSystemComponents 49 PerformingPasteOperations 49 AccessingPrinters 49 AccessingDrivers 49 AccessingtheLocalDisk,theRemovableDisk,andNetworkShares 49 AccessingtheSystemRegistry 50 AccessingNetworkingandSockets 50 UsingSharedMemoryandNamedPipes 50 UsingCOM,DCOM,andOutofProcessCOMComponents 50 StartingServices 50 UsingFileTypeAssociations 50 SampleIsolationModeConfigurationDependingonDeploymentContext 51 ViewofIsolationModeEffectontheWindowsRegistry 51

4 UpdatingandLinkingApplications 53
ApplicationUpdatesThattheEndUserTriggers 53 ApplicationSyncUpdates 53 ApplicationLinkUpdates 56 ApplicationUpdatesThattheAdministratorTriggers 60 ForcinganApplicationSyncUpdateonClientMachines 61 UpdatingApplicationswithRuntimeChanges 61 AutomaticApplicationUpdates 62 DynamicUpdatesWithoutAdministratorRights 63 SidebySideUpgradingofRunningApplicationsonaNetworkShare FileLocks 63 UpgradeaRunningApplication 63 SandboxConsiderationsforUpgradedApplications 64 UpdatingtheThinAppVersionofPackages 64 relinkExamples 64

63

VMware, Inc.

Contents

5 ConfiguringPackageParameters 65
Package.iniFileStructure 66 ParametersThatApplytoPackage.inior##Attributes.iniFiles ConfiguringtheThinAppRuntime 66 NetRelaunch 66 RuntimeEULA 67 VirtualComputerName 67 Wow64 68 QualityReportingEnabled 68 LoadDotNetFromSystem 68 ConfiguringIsolation 68 DirectoryIsolationMode 68 RegistryIsolationMode 69 ConfiguringFileandProtocolAssociations 70 FileTypes 70 Protocols 70 ConfiguringBuildOutput 71 ExcludePattern 71 Icon 71 OutDir 72 RetainAllIcons 72 ConfiguringPermissions 72 AccessDeniedMsg 72 AddPageExecutePermission 72 PermittedGroups 73 UACRequestedPrivilegesLevel 74 UACRequestedPrivilegesUIAccess 74 ConfiguringObjectsandDLLFiles 74 ExternalCOMObjects 74 ExternalDLLs 75 ForcedVirtualLoadPaths 75 IsolatedMemoryObjects 76 IsolatedSynchronizationObjects 76 NotificationDLLs 77 NotificationDLLSignature 77 ObjectTypes 77 SandboxCOMObjects 78 VirtualizeExternalOutOfProcessCOM 78 ConfiguringFileStorage 78 CachePath 78 UpgradePath 79 VirtualDrives 80 ConfiguringProcessesandServices 81 AllowExternalKernelModeServices 81 AllowExternalProcessModifications 81 AllowUnsupportedExternalChildProcesses 82 AutoShutdownServices 82 AutoStartServices 82 ChildProcessEnvironmentDefault 83 ChildProcessEnvironmentExceptions 83 ConfiguringSizes 83 BlockSize 83 CompressionType 84 MSICompressionType 85 OptimizeFor 85 66

VMware, Inc.

ThinApp Users Guide

ConfiguringLogging 86 DisableTracing 86 LogPath 86 ConfiguringVersions 86 CapturedUsingVersion 86 StripVersionInfo 86 Version.XXXX 87 ConfiguringLocales 87 AnsiCodePage 87 LocaleIdentifier 87 LocaleName 88 ConfiguringIndividualApplications 88 CommandLine 88 Disabled 88 ReadOnlyData 89 ReserveExtraAddressSpace 89 Shortcut 89 Shortcuts 90 Source 90 WorkingDirectory 91 ConfiguringDependentApplicationswithApplicationLink 91 ApplicationLinkPathnameFormats 91 RequiredAppLinks 92 OptionalAppLinks 93 ConfiguringApplicationUpdateswithApplicationSync 93 AppSyncClearSandboxOnUpdate 94 AppSyncExpireMessage 94 AppSyncExpirePeriod 94 AppSyncURL 94 AppSyncUpdateFrequency 95 AppSyncUpdatedMessage 95 AppSyncWarningFrequency 95 AppSyncWarningMessage 95 AppSyncWarningPeriod 96 ConfiguringMSIFiles 96 MSIArpProductIcon 96 MSIDefaultInstallAllUsers 96 MSIFilename 97 MSIInstallDirectory 97 MSIManufacturer 98 MSIProductCode 98 MSIProductVersion 98 MSIRequireElevatedPrivileges 99 MSIUpgradeCode 99 MSIStreaming 100 ConfiguringSandboxStorageandInventoryNames 100 InventoryName 100 RemoveSandboxOnExit 101 SandboxName 101 SandboxNetworkDrives 101 SandboxPath 102 SandboxRemovableDisk 102

VMware, Inc.

Contents

6 LocatingtheThinAppSandbox 103
SearchOrderfortheSandbox 103 ControllingtheSandboxLocation 105 StoretheSandboxontheNetwork 105 StoretheSandboxonaPortableDevice 105 SandboxStructure 106 MakingChangestotheSandbox 106 ListingVirtualRegistryContentswithvregtool 106

7 CreatingThinAppSnapshotsandProjectsfromtheCommandLine 107
MethodsofUsingthesnapshot.exeUtility 107 CreatingSnapshotsofMachineStates 107 CreatingtheTemplatePackage.inifilefromTwoSnapshotFiles 108 CreatingtheThinAppProjectfromtheTemplatePackage.iniFile 108 DisplayingtheContentsofaSnapshotFile 109 Samplesnapshot.exeCommands 109 CreateaProjectWithouttheSetupCaptureWizard 109 Customizingthesnapshot.iniFile 110

8 ThinAppFileSystemFormatsandMacros 111
VirtualFileSystemFormats 111 ThinAppFolderMacros 111 ListofThinAppMacros 112 Processing%SystemRoot%inaTerminalServicesEnvironment 113

9 CreatingThinAppScripts 115
CallbackFunctions 115 ImplementScriptsinaThinAppEnvironment 116 .batExample 116 TimeoutExample 116 ModifytheVirtualRegistry 117 .regExample 117 StoppingaServiceExample 117 CopyingaFileExample 117 AddaValuetotheSystemRegistry 118 APIFunctions 119 AddForcedVirtualLoadPath 119 ExitProcess 119 ExpandPath 120 ExecuteExternalProcess 120 ExecuteVirtualProcess 121 GetBuildOption 121 GetFileVersionValue 121 GetCommandLine 122 GetCurrentProcessName 122 GetOSVersion 123 GetEnvironmentVariable 124 RemoveSandboxOnExit 124 SetEnvironmentVariable 124 SetfileSystemIsolation 125 SetRegistryIsolation 125 WaitForProcess 125

VMware, Inc.

ThinApp Users Guide

10 MonitoringandTroubleshootingThinApp 127
ProvidingInformationtoTechnicalSupport 127 LogMonitorOperations 127 TroubleshootActivitywithLogMonitor 128 PerformAdvancedLogMonitorOperations 128 LogFormat 130 TroubleshootingSpecificApplications 134 TroubleshootRegistrySetupforMicrosoftOutlook 134 ViewingAttachmentsinMicrosoftOutlook 134 StartingExplorer.exeintheVirtualEnvironment 135 TroubleshootingJavaRuntimeEnvironmentVersionConflict

135

Glossary

137

Index 141

VMware, Inc.

About This Book

TheThinAppUsersGuideprovidesinformationabouthowtoinstallThinApp,captureapplications,deploy applications,andupgradeapplications.You canrefertothisguidetocustomizeparametersandperform scripting.

Intended Audience
ThisbookisintendedforanyonewhoinstallsThinAppanddeployscapturedapplications.Typicalusersare systemadministratorsresponsibleforthedistributionandmaintenanceofcorporatesoftwarepackages.

VMware ThinApp Documentation


ThecompletedocumentationsetforVMwareThinAppconsistsofthefollowingdocuments.

ThinAppUsersGuide.Conceptualandproceduralinformationtohelpyoucompleteatask. ThinApp4.6ReleaseNotes.Latebreakingnewsanddescriptionsofknownissuesandworkarounds. MigratingApplicationswithThinAppDuringanUpgradefromMicrosoftWindowsXPtoWindows7. ProceduralinformationforusingThinApptomigrateapplicationsfromWindowsXPtoWindows7.

Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhavecomments,sendyour feedbacktodocfeedback@vmware.com.

Technical Support and Education Resources


Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou.To accessthecurrentversion ofthisbookandotherbooks,gotohttp://www.vmware.com/support/pubs.

Online and Telephone Support


Touseonlinesupporttosubmittechnicalsupportrequests,viewyourproductandcontractinformation,and registeryourproducts,gotohttp://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon priority1issues.Gotohttp://www.vmware.com/support/phone_support.

Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.

VMware, Inc.

ThinApp Users Guide

VMware Professional Services


VMwareEducationServicescoursesofferextensivehandsonlabs,casestudyexamples,andcoursematerials designedtobeusedasonthejobreferencetools.Coursesareavailableonsite,intheclassroom,andlive online.Foronsitepilotprograms andimplementationbestpractices,VMwareConsultingServicesprovides offeringsto helpyouassess,plan,build,andmanageyourvirtualenvironment.To accessinformationabout educationclasses,certificationprograms,andconsultingservices,gotohttp://www.vmware.com/services.

Legal Notice
ThinAppusestheregularexpressionlibraryoriginallywrittenbyHenrySpencer. Copyright(c)1986,1993,1995byUniversityofToronto. WrittenbyHenrySpencer.Notderivedfromlicensedsoftware. Permissionisgrantedtoanyonetousethissoftwareforanypurposeonanycomputersystem,andto redistributeitinanyway,subjecttothefollowingrestrictions: 1 2 3 4 Theauthorisnotresponsiblefortheconsequencesofuseofthissoftware,nomatterhowawful,evenif theyarisefromdefectsinit. Theoriginofthissoftwaremustnotbemisrepresented,eitherbyexplicitclaimorbyomission. Alteredversionsmustbeplainlymarkedassuch,andmustnotbemisrepresented(byexplicitclaimor omission)asbeingtheoriginalsoftware. Thisnoticemustnotberemovedoraltered.

10

VMware, Inc.

Installing ThinApp

YoucaninstallThinApptoisolateapplications,simplifyapplicationcustomization,deployapplicationsto differentoperatingsystems,andeliminateapplicationconflict. Thisinformationincludesthefollowingtopics:


ThinAppRequirementsonpage 11 RecommendationsforInstallingThinApponpage 12 InstallThinAppSoftwareonpage 13 CheckingThinAppInstallationFilesonpage 13

ThinApp Requirements
ReviewtherequirementsforoperatingsystemsandcapturedapplicationsbeforeinstallingThinApp.

Operating Systems, Applications, and Systems That ThinApp Supports


ThinAppsupportsvariousoperatingsystems,applications,andsystems.

32bitplatformsincludeWindowsNT,Windows2000,Windows XP,WindowsXPE,Windows2003 Server,WindowsVista,WindowsServer2008,Windows7 64bitplatformsincludeWindowsXP64bit,Windows200364bit,WindowsVista64 bit, Windows Server 2008 64bit,Windows Server 2008 R2 64bit,Windows 7 64 bit 16bitapplicationsrunningon32bitWindowsoperatingsystems 32bitapplicationsrunningon32bitand64bitWindowsoperatingsystems TerminalServerandCitrixXenapp

ThinAppsupportsJapaneseapplicationscapturedandrunonJapaneseoperatingsystems. CertainoperatingsystemsandapplicationsarenotsupportedbyThinApp.

16bitornonx86platformssuchasWindowsCE 64bitapplicationsrunningon32bitor64bitWindowsoperatingsystems 16bitapplicationsrunningon64bitWindowsoperatingsystems

VMware, Inc.

11

ThinApp Users Guide

Applications That ThinApp Cannot Virtualize


ThinAppcannotconvertsomeapplicationsintovirtualapplicationsandmightblockcertainapplicationfunctions. Youmustusetraditionalinstallationtechnologiestodeploysomeapplicationtypes.

Applicationsthatdonotnativelysupportthedeploymentoperatingsystem. Ifanoperatingsystemdoesnotsupportthenativeinstallationofanapplication,thatoperatingsystemis notasupportedThinAppdeploymentplatformforthatapplication.

Applicationsrequiringinstallationofkernelmodedevicedrivers ODBCdriversworkbecausetheyareusermodedrivers.

Antivirusandpersonalfirewalls Scannerdriversandprinterdrivers SomeVPNclients

Device Drivers
ApplicationsthatrequiredevicedriversdonotworkwhenpackagedwithThinApp.Youmustinstallthose devicedriversintheiroriginalformatonthehostcomputer.BecauseThinAppdoesnotsupportvirtualized devicedrivers,youcannotuseThinApptovirtualizeantivirus,VPNclients,personalfirewalls,anddiskand volumemountingrelatedutilities. IfyoucaptureAdobeAcrobat,youcanmodifyandsavePDFfiles,butyoucannotusethePDFprinterdriver thatenablesyoutosavedocumentstoPDFformat.

Shell Integration
SomeapplicationsthatprovideshellintegrationhavereducedfunctionswhentheyexistinaThinApp package.Forexample,avirtualapplicationthatintegrateswithWindowsExplorercannotaddspecificentries totheWindowsExplorercontextmenus.

DCOM Services that are Accessible on a Network


ThinAppisolatesCOMandDCOMservices.ApplicationsthatinstallDCOMservicesareaccessibleonthe localcomputeronlybyothercapturedapplicationsrunninginthesameThinAppsandbox.ThinAppsupports virtualDCOMandCOMonthesamecomputerbutdoesnotsupportnetworkDCOM.

Global Hook Dynamic Link Libraries


SomeapplicationsusetheSetWindowsHookExAPIfunctiontoaddaDLLfiletoallprocessesonthehost computer.TheDLLinterceptsWindowsmessagestocapturekeyboardandmouseinputfromother applications.ThinAppignoresrequestsfromapplicationsthatusetheSetWindowsHookExfunctiontotryto installglobalhookDLLs.ThinAppmightreducetheapplicationfunctions.

Recommendations for Installing ThinApp


WhenyouinstallThinApp,considertherecommendationsandbestpracticesforthesoftware.

Using a Clean Computer


VMwarerecommendsusingacleancomputertoinstallThinAppbecausetheenvironmentaffectsthe applicationcaptureprocess.AcleancomputerisaphysicalorvirtualmachinewithonlyaWindowsoperating systeminstalled.Inacorporateenvironmentwhereyouhaveabasedesktopimage,thebasedesktopimage isyourcleancomputer.Thedesktopcomputermightalreadyhavesomecomponentsandlibrariesinstalled.

12

VMware, Inc.

Chapter 1 Installing ThinApp

Applicationinstallersskipfilesthatalreadyexistonthecomputer.Iftheinstallerskipsfiles,theThinApp packagedoesnotincludethemduringtheapplicationcaptureprocess.Theapplicationmightfailtorunon othercomputerswherethefilesdonotexist.Acleancomputerenablesthecaptureprocesstoscanthe computerfilesystemandregistryquickly. IfyouinstallThinAppandcaptureanapplicationonacomputerthathasMicrosoft.NET2.0alreadyinstalled, .NET2.0isnotincludedintheThinApppackage.Thecapturedapplicationrunsonlyoncomputersthathave .NET2.0alreadyinstalled.

Using Virtual Machines for Clean Computers


Theeasiestwaytosetupacleancomputeristocreateavirtualmachine.YoucaninstallWindowsonthe virtualmachineandtakeasnapshotoftheentirevirtualmachineinitscleanstate.Afteryoucapturean application,youcanrestorethesnapshotandrevertittoacleanvirtualmachinestatethatisreadyforthenext applicationcapture. YoucanuseVMwareWorkstationorotherVMwareproductstocreatevirtualmachines.Forinformation aboutVMwareproducts,seetheVMwareWebsite.

Using the Earliest Operating System Required for Users


InstallThinApponacleancomputerwiththeearliestversionoftheoperatingsystemyouplantosupport. In mostcases,theearliestplatformisWindows 2000orWindows XP.MostpackagescapturedonWindowsXP workonWindows2000.In somecases,WindowsXPincludessomeDLLsthatWindows2000lacks.ThinApp excludestheseDLLSfromthecapturedapplicationpackageiftheapplicationtypicallyinstallstheseDLLs. AfteryoucreateaThinAppapplicationpackage,youcanoverwritefilesinthepackagewithupdatedversions andrebuildtheapplicationwithoutthecaptureprocess.

Install ThinApp Software


UsetheThinAppexecutablefiletoinstallThinApp. Install ThinApp software 1 2 3 4 5 DownloadThinApptoacleanphysicalorvirtualWindowsmachine. DoubleclicktheThinAppexecutablefile. InthePatentListsdialogbox,clickNext. Acceptthelicense,typetheserialnumber,andtypealicensedisplaynamethatappearswhenyouopen applicationsthatThinAppcaptures. ClickInstall. ThinAppisinstalled.

Checking ThinApp Installation Files


TheThinAppinstallationgeneratestheVMwareThinAppdirectoryinC:\Program Files\VMware.Youmight checkthefilesinthisdirectorytoperformoperationssuchasstartingtheLogMonitorutilitytoviewrecent activity. ThefollowingkeyfilesintheVMwareThinAppdirectoryaffectThinAppoperations:

AppSync.exeKeepscapturedapplicationsuptodatewiththelatestavailableversion. logging.dllGenerates.tracefiles. dll_dump.exeListsallcapturedapplicationsthatarecurrentlyrunningonasystem. log_monitor.exeDisplaystheexecutionhistoryanderrorsofanapplication. relink.exeUpdatesexistingpackagestothelatestThinAppversioninstalledonthesystem.

VMware, Inc.

13

ThinApp Users Guide

sbmerge.exeMergesruntimechangesrecordedintheapplicationsandboxwiththeThinAppproject andupdatesthecapturedapplication. SetupCapture.exeCapturesandconfiguresapplicationsthroughawizard. snapshot.exeComparesthepreinstallationenvironmentandpostinstallationenvironmentduringthe applicationcaptureprocess. ThinAppstartsthisutilityduringthesetupcaptureprocess.

snapshot.iniStoresentriesforthevirtualregistryandvirtualfilesystemthatThinAppignoresduring theprocessofcapturinganapplication. Thesnapshot.exefilereferencesthesnapshot.inifile.Advancedusersmightmodifythe snapshot.inifiletoensurethatThinAppdoesnotcapturecertainentrieswhencreatinganapplication package.

template.msiBuildstheMSIfiles. Youcancustomizethistemplatetoensurethatthe.msifilesgeneratedbyThinAppadheretocompany deploymentproceduresandstandards.Forexample,youcanaddregistrysettingsthatyouwant ThinApptoaddtoclientcomputersaspartoftheinstallation.

thinreg.exeRegisterscapturedapplicationsonacomputer. ThisregistrationincludessettingupshortcutsandtheStartmenuandsettingupfiletypeassociations thatallowyoutoopenapplications.

tlink.exeLinkskeymodulesduringthebuildprocessofthecapturedapplication. vftool.exeCompilesthevirtualfilesystemduringthebuildprocessofthecapturedapplication. vregtool.exeCompilesthevirtualregistryduringthebuildprocessofthecapturedapplication.

14

VMware, Inc.

Capturing Applications

Youcancaptureapplicationstopackageanapplicationintoavirtualenvironment. TheSetupCapturewizardisthemainmethodtocaptureapplicationsandsetinitialapplicationparameters. Advanceduserswhomustcaptureapplicationsfromthecommandlinecanusethesnapshot.exeutility insteadoftheSetupCapturewizard. Thissectionincludesthefollowingtopics:


PhasesoftheCaptureProcessonpage 15 PreparingtoCaptureApplicationsonpage 15 CapturingApplicationswiththeSetupCaptureWizardonpage 16 AdvancedPackageConfigurationonpage 23 GuidelinesforPackagingMicrosoftOffice2007onpage 24 CapturingInternetExplorer6onWindowsXPonpage 28 CapturingMultipleApplicationInstallerswithThinAppConverteronpage 30

Phases of the Capture Process


Capturinganapplicationinvolvessystemscans,applicationconfiguration,packageconfiguration,and generationofthevirtualapplicationfordistribution. TheSetupCapturewizardsetsinitialparametersfortheapplication.Youcancustomizethefullsetof parametersoutsideofthewizard.

Preparing to Capture Applications


Preparingforthecaptureprocessinvolvesunderstandingtheneedsanddependenciesoftheapplication. Fortargetapplicationsthathavedependenciesonotherapplications,libraries,orframeworks,youcancapture thedependenciesorusetheApplicationLinkutilitytolinkseparatevirtualapplicationsatruntime.For informationabouttheApplicationLinkutility,seeApplicationLinkUpdatesonpage 56. Fortargetapplicationsthatrequirelocaleformats,suchasaspecificdateformat,youcancapturetheminan environmentwiththerequiredlocalesetting.ThinApprunsvirtualapplicationsaccordingtotheregionaland languagesettingsonthecapturesystemratherthanthesettingsonthesystemthatrunstheapplication. AlthoughyoucanmodifythedefaultlocalesettingbycommentingouttheLocaleIdentifierparameterin thePackage.inifileandrebuildingtheapplication,youcanavoidcomplicationsinthecaptureenvironment. ForinformationabouttheLocaleIdentifierparameter,seeLocaleIdentifieronpage 87.

VMware, Inc.

15

ThinApp Users Guide

Capturing Applications with the Setup Capture Wizard


Thecaptureprocesspackagesanapplicationandsetsinitialapplicationparameters.Ifyouuseavirtual machine,considertakingasnapshotbeforeyourunthewizard.Asnapshotoftheoriginalcleanstateenables youtoreverttothesnapshotwhenyouwanttocaptureanotherapplication. ThisinformationusesMozillaFirefoxasakeyexampleforapplicationcapture.Forinformationabout MicrosoftOffice2007thatextendsbeyondthebasiccaptureprocess,seeGuidelinesforPackagingMicrosoft Office2007onpage 24.

Create a System Image Before the Application Installation


TheSetupCapturewizardstartsthecaptureprocessbyscanningthesystemtoassesstheenvironmentand createabaselinesystemimage. Create a system image before the application installation 1 Downloadtheapplicationstocapture. Forexample,downloadFirefoxSetup2.0.0.3.exeandcopyittothecleancomputeryouareworking with. 2 3 4 Closeanyapplications,suchasvirusscans,thatmightchangethefilesystemduringthecaptureprocess. Fromthedesktop,selectStart>Programs>VMware>ThinAppSetupCapture. (Optional)IntheReadytoPrescandialogbox,clickAdvancedScanLocationstoselectthedrivesand registryhivestoscan. YoumightwanttoscanaparticularlocationotherthantheC:\driveifyouinstallapplicationstoa differentdrive.Inrarecases,youmightwanttoavoidscanningaregistryhiveifyouknowthatthe applicationinstallerdoesnotmodifytheregistry. 5 ClickPrescantoestablishabaselinesystemimageoftheharddriveandregistryfiles. Thescanningprocesstakesabout10secondsforWindowsXP.

Rescan the System with the Installed Application


YoucaninstalltheapplicationtovirtualizebeforetheSetupCapturewizardrescansthesystemandassess changesfromtheinitialsystemimage. Install the application and rescan the system 1 WhentheInstallApplicationpageappears,minimizetheSetupCapturewizardandinstallthe applicationstocapture. Forexample,doubleclickFirefoxSetup2.0.0.3.exe to installFirefox.Iftheapplicationneedsto restartaftertheinstallation,restartthesystem.TheprocessrestartstheSetupCapturewizard. 2 (Optional)IfyouarecapturingInternetExplorer,intheInstallApplicationpage,clickInternetExplorer, tocompleteadditionalstepsbeforeinstallingthebrowser. IfyouarecapturingInternetExplorer6onWindowsXP,seeCapturingInternetExplorer6onWindows XPonpage 28. Formoreinformationaboutentrypoints,seeDefiningEntryPointsasShortcutsintotheVirtual Environmentonpage 17. 3 (Optional)Makeanynecessaryconfigurationchangestocomplywithyourcompanypolicies,suchas usingspecificsecuritysettingsoraparticularhomepage. Ifyoudonotmakeconfigurationchangesatthistime,eachusermustmakechanges.

16

VMware, Inc.

Chapter 2 Capturing Applications

(Optional)Starttheapplicationandrespondtoanymessagesforinformationbeforeyoucontinuewith theSetupCapturewizard. Ifyoudonotrespondtoanymessagesatthistime,eachuserwhousestheapplicationmustdosoduring theinitialstart.

5 6

Closetheapplication. MaximizetheSetupCapturewizard,clickPostscantoproceedwithanotherscanofthecomputer,and clickOKtoconfirmthepostscanoperation. ThinAppstoresthedifferencesbetweenthefirstbaselineimageandthisimageinavirtualfilesystemand virtualregistry.

Defining Entry Points as Shortcuts into the Virtual Environment


Entrypointsaretheexecutablefilesthatactasshortcutsintothevirtualenvironmentandstartthevirtual application.Theentrypointsyoucanchoosefromdependontheexecutablefilesthatyourcaptured applicationcreatesduringinstallation. Forexample,ifyouinstallMicrosoftOffice,youcanselectentrypointsforMicrosoftWord,MicrosoftExcel, andotherapplicationsthatareinstalledduringaMicrosoftOfficeinstallation.IfyouinstallFirefox,youmight selectMozilla Firefox.exeandMozilla Firefox (SafeMode).exeifusersrequiresafemodeaccess. DuringthebuildprocessthatoccursattheendoftheSetupCapturewizard,ThinAppgeneratesone executablefileforeachselectedentrypoint.IfyoudeploytheapplicationasanMSIfileorusethe thinreg.exeutility,thedesktopandStartmenushortcutscreatedonuserdesktopspointtotheseentry points.

Entry Points for Troubleshooting


ThinAppprovidesentrypointstotroubleshootyourenvironment. Debugginganapplicationmightinvolvethefollowingentrypoints:

cmd.exeStartsacommandpromptinavirtualcontextthatenablesyoutoviewthevirtualfilesystem. regedit.exeStartstheregistryeditorinavirtualcontextthatenablesyoutoviewthevirtualregistry. iexplore.exeStartsiexplore.exeinavirtualcontextthatenablesyoutotestvirtualized ActiveX controls.

Entrypointsstartnativeexecutablefilesinavirtualcontext.Entrypointsdonotcreatevirtualpackagesof cmd.exe,regedit.exe,oriexplore.exe. Ifyoucannotpredicttheneedfordebuggingortroubleshootingtheenvironment,youcanusetheDisabled parameterinthePackage.inifileatalatertimetoactivatetheseentrypoints.

Set Entry Points


Youcandesignatetheexecutablefilesthatmakeupthelistofentrypoints.ThinAppinstallstheexecutable filesduringthecaptureprocess. Set entry points in the Setup Capture wizard 1 OntheEntryPointspage,selectthecheckboxesforuseraccessibleentrypoints. ThewizarddisplaystheexecutablefilesthatweredirectlyaccessiblethroughthedesktoporStartmenu shortcuts. 2 (Optional)Todebugyourenvironment,selecttheShowentrypointsusedfordebuggingcheckboxto displaytheiexplore.exe,regedit.exe,andcmd.exetroubleshootingoptions.

VMware, Inc.

17

ThinApp Users Guide

Set User Groups


ThinAppcanuseActiveDirectorygroupstoauthorizeaccesstothevirtualapplication.Youcanrestrictaccess toanapplicationtoensurethatusersdonotpassittounauthorizedusers. ActiveDirectoryDomainServicesdefinesecuritygroupsanddistributiongroups.ThinAppcanonlysupport nestedsecuritygroups. Set user groups in the Setup Capture wizard 1 OntheGroupspage,limittheuseraccesstotheapplication. a b SelectOnlythefollowingActiveDirectorygroups. ClickAddtospecifyActiveDirectoryobjectandlocationinformation.
Description Specifiesobjects. Specifiesalocationintheforest. Verifyobjectnames. LocatesusernamesintheActiveDirectoryforest. Searchesforgroupsaccordingtonames,descriptions,disabledaccounts, passwords,anddayssincelastlogin.

Option ObjectTypes Locations CheckNames Advanced CommonQueries(underAdvanced)

(Optional)ChangethemessagethatappearsforusersthatThinAppcannotauthorize.

Defining Isolation Modes for the Physical File System


Isolationmodesdeterminethelevelofreadandwriteaccesstothenativefilesystemoutsideofthevirtual environment.Youmightadjustisolationmodesettingsdependingontheapplicationandtherequirementsto protectthephysicalsystemfromchanges. TheselectionofisolationmodesinthecaptureprocessdeterminesthevalueoftheDirectoryIsolationMode parameterinthePackage.inifile.Thisparametercontrolsthedefaultisolationmodeforthefilescreatedby thevirtualapplicationexceptwhenyouspecifyadifferentisolationmodeinthe##Attributes.inifilefor anindividualdirectory. Theselectionofadirectoryisolationmodedoesnotaffectthefollowingareas:

ThinApptreatswriteoperationstonetworkdrivesaccordingtotheSandboxNetworkDrivesparameter inthePackage.inifile.Thisparameterhasadefaultvaluethatdirectswriteoperationstothephysical drive.ThinApptreatswriteoperationstoremovabledisksaccordingtotheSandboxRemovableDisk parameterinthePackage.inifile.Thisparameterhasadefaultvaluethatdirectswriteoperationstothe physicaldrive. IfyousavedocumentstothedesktoporMy Documentsfolder,ThinAppsavesthedocumentstothe physicalsystem.ThinAppsetstheisolationmodeinthe##Attributes.inifilesin%Personal%and %Desktop%toMergedevenwhenyouselectWriteCopyisolationmode.

Applying Merged Isolation Mode for Modifications Outside the Package


WithMergedisolationmode,applicationscanreadandmodifyelementsonthephysicalfilesystemoutside ofthevirtualpackage.SomeapplicationsrelyonreadingDLLsandregistryinformationinthelocalsystem image. TheadvantageofusingMergedmodeisthatdocumentsthatuserssaveappearonthephysicalsysteminthe locationthatusersexpect,insteadofinthesandbox.Thedisadvantageisthatthismodemightclutterthe systemimage.Anexampleofthecluttermightbefirstexecutionmarkersbysharewareapplicationswritten torandomcomputerlocationsaspartofthelicensingprocess.

18

VMware, Inc.

Chapter 2 Capturing Applications

WhenyouselectMergedisolation,ThinAppcompletesthefollowingoperations:

SetstheDirectoryIsolationModeparameterinthePackage.inifiletoMerged. SetsupexceptionsthatapplyWriteCopyisolationtothefollowingdirectoriesandtheirsubdirectories:

%AppData% %Common AppData% %Local AppData% %Program Files Common% %ProgramFilesDir% %SystemRoot% %SystemSystem% ThinAppretainsMergedisolationmodeforthe%SystemSytem%\spoolsubdirectorybycreatingan exceptiontothe%SystemSystem%parentdirectoryisolationmode.

Betweentheprescanandpostscancaptureoperations,assignsFullisolationmodetoanydirectoriesthat theapplicationcreatesduringtheinstallation.Thisprocessisunrelatedtotheisolationmodeofanynew directoriesthattherunningvirtualapplicationcreates.

MergedisolationmodeintheSetupCapturewizardhasthesameeffectasMergedisolationmodeinthe Package.inifile,includingthedirectoryexceptionsthatspecifyWriteCopyisolationmode.TheSetup Capturewizardandmanualcaptureprocesswiththesnapshot.exe utilityconfigurethedirectory exceptionsforyouwiththe##Attributes.inifileswithinthedirectories.

Applying WriteCopy Isolation Mode to Prevent Modifications Outside of the Package


WithWriteCopyisolationmode,ThinAppcaninterceptwriteoperationsandredirectthemtothesandbox. YoucanuseWriteCopyisolationmodeforlegacyoruntrustedapplications.Althoughthismodemightmake itdifficulttofinduserdatafilesthatresideinthesandboxinsteadofthephysicalsystem,thismodeisuseful forlockeddowndesktopswhereyouwanttopreventusersfromaffectingthelocalfilesystem. WhenyouselectWriteCopyisolationintheSetupCapturewizard,ThinAppcompletesanumberof operations.

SetstheDirectoryIsolationModeparameterinthePackage.inifiletoWriteCopy. SetsupexceptionsthatapplyMergedisolationtothesedirectories

%Personal% %Desktop% %SystemSystem%\spool

Betweentheprescanandpostscancaptureoperations,assignsFullisolationmodetoanydirectoriesthat theapplicationcreatesduringtheinstallation.Thisprocessisunrelatedtotheisolationmodeofanynew directoriesthattherunningvirtualapplicationcreates.

WriteCopyisolationmodeintheSetupCapturewizardhasthesameeffectasWriteCopyisolationmodeinthe Package.inifile,includingthedirectoryexceptionsthatspecifyMergedisolationmode.TheSetupCapture wizardandsnapshot.exeutilityconfigurethedirectoryexceptionsforyouwiththe##Attributes.inifiles withinthedirectories.

VMware, Inc.

19

ThinApp Users Guide

Set File System Isolation Modes


Thecaptureprocesssetsthelevelofreadandwriteaccesstothephysicalfilesystemtodeterminewhich directoriesarevisibleandwritablebythevirtualapplication. For informationaboutFullisolationandregistryisolationthatareavailableonlyoutsideoftheSetupCapture wizard,seeDirectoryIsolationModeonpage 68andRegistryIsolationModeonpage 69. Set file system isolation modes in the Setup Capture wizard OntheIsolationpage,selecttheisolationmodeforthephysicalfilesystem.
Option Fullwriteaccesstononsystemdirectories (Mergedisolationmode) Restrictedwriteaccess(WriteCopy isolationmode) Description Allowstheapplicationtoreadresourcesonandwritetothelocalmachine. Allowstheapplicationtoreadresourcesonthelocalmachineandto restrictmostmodificationstothesandbox. ThinAppcopiesfilesystemchangestothesandboxtoensurethat ThinApponlymodifiescopiesoffilesinsteadoftheactualphysicalfiles.

Storing Application Changes in the Sandbox


Thesandboxisthedirectorywhereallchangesthatthecapturedapplicationmakesarestored.Thesandbox isruntimemodificationstorageandisnotacache.Thenexttimeyouopentheapplication,thosechangesare incorporatedfromthesandbox. Whenyoudeletethesandboxdirectory,theapplicationrevertstoitscapturedstate.Youmightdeletea sandboxwhenanapplicationhasaproblemandyouwanttoreverttheapplicationbacktotheworking originalstate.

Customize the Sandbox Location


Youcandeploythesandboxtoalocalusermachine,carryitonamobileUSBdevice,orstoreitinanetwork location. Ifyoudeploythesandboxtoalocalmachine,usetheusersprofileasthesandboxlocation.Thedefault locationofthesandboxforFirefoxmightbe%AppData%\Thinstall\Mozilla Firefox 3.0.Thetypical %AppData%locationisC:\Documents and Settings\<user_name>\Application Data.Theusersprofile isthedefaultlocationbecauseofthewriteaccess. Anetworklocationisusefulforbackingupthesandboxandforuserswhologintoanycomputerandkeep theirapplicationsettings.Usetheabsolutepathtothelocation,suchas\\thinapp\sandbox\Firefox.You canselectanetworklocationevenifanapplicationisinstalledonalocalmachine. Aportabledevicelocationisusefultokeepthesandboxdataonthedevicewheretheapplicationresides. Customize the sandbox location in the Setup Capture wizard OntheSandboxpage,selecttheusersprofile,applicationdirectory,orcustomlocationforthesandbox.

Send Anonymous Statistics to VMware


ToimproveThinAppsupportforapplications,VMwareusesthecaptureprocesstoconfirmwhethertocollect anonymousdataaboutdeployedThinApppackages.Thedataincludestheapplicationstarttime,total runningtime,andnumberofrunsfortheapplication. Send anonymous statistics to VMware OntheUsageStatisticspage,clicktheYesSendanonymoususagestatisticstoVMwareoptionbuttonto confirmthedatacollectionstatus.

20

VMware, Inc.

Chapter 2 Capturing Applications

Customize ThinApp Project Settings


Aprojectisthedatathatthecaptureprocesscreates.Youcannotrunordeploythecapturedapplicationuntil youbuildapackagefromtheprojectfiles. Settinguptheprojectinvolvesdeterminingtheinventorynameandtheprojectlocation.Theinventoryname facilitatesinternaltrackingoftheapplicationanddeterminesthedefaultprojectdirectoryname. Customize project settings in the Setup Capture wizard 1 OntheProjectSettingspage,changetheinventoryname. Usingthethinreg.exeutilityordeployingthecapturedapplicationasanMSIfilecausestheinventory nametoappearintheAddorRemoveProgramsdialogboxforWindows. 2 ChangethedirectorywhereyouwanttosavetheThinAppproject. IfyoukeepthedefaultdirectoryandcaptureFirefox2.0.0.3,thepathmightappearasC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox (2.0.0.3).

Defining Package Settings


ApackageistheexecutablefileorMSIfilewithexecutablefilesthatyouusetorunordeployacaptured application.Youbuildapackagefromtheprojectfiles. Settingupthepackageduringthecaptureprocessinvolvesspecifyinginformationaboutthemainvirtual applicationfilethatservesastheprimarydatacontainer,MSIgeneration,andcompression.

Defining the Primary Data Container


TheprimarydatacontaineristhemainvirtualapplicationfilethatincludestheThinAppruntimeandthe readonlyvirtualfilesystemandvirtualregistry.Theprimarydatacontainerfileisa.exeora.datfilethat residesinthesame/bindirectorywithanysubordinateapplicationexecutablefiles.Entrypointsreference theinformationintheprimarydatacontainer. Toidentifytheprimarydatacontainerafteryoucaptureanapplication,checktheReadOnlyDataparameter inthePackage.inifile.

Generating MSI Packages in the Capture Process


YoucancaptureanapplicationanddeployitasanMSIWindowsinstallationpackage.TheMSIinstallation placestheapplicationintheC:\Program Filesdirectory. AtypicalFirefoxapplicationdoesnotrequireanMSIinstallation.Otherapplications,suchasMicrosoftOffice, thatintegratewithapplicationdeliverytools,workwellasanMSIpackage.MSIgenerationrequiresyouto installtheMSIonthetargetdevicebeforeyoucanusetheapplicationpackage. MSIpackagesautomatetheprocessofregisteringfiletypeassociations,registeringdesktopandStartmenu shortcuts,anddisplayingcontrolpanelextensions.IfyouplantodeployThinAppexecutablefilesdirectlyon eachcomputer,youcanaccomplishthesameregistrationbyusingthethinreg.exeutility.

Compressing Packages in the Capture Process


Compressingapackageinthecaptureprocessdecreasesthesizeofanexecutablepackagebutdoesnotaffect MSIpackages. Compressioncanreducetheondiskstoragerequirementby50percentbutslowstheapplicationperformance whenThinAppuncompressesinitialblocksthatstarttheapplication.VMwaredoesnotrecommend compressionfortestbuildsbecausecompressionincreasesthebuildtime.

VMware, Inc.

21

ThinApp Users Guide

Customize Package Settings


Thecaptureprocessincludesinitialsettingsfortheprimarydatacontainer,MSIpackages,andexecutable packagecompression. Customize package settings in the Setup Capture wizard 1 OnthePackageSettingspage,selecttheprimarydatacontainerfromthelistthatisbasedonyour executablefileentrypoints.

Ifthesizeoftheprimarycontainerissmallerthan200MB,ThinAppcreatesa.exefileastheprimary container.ForasmallapplicationsuchasFirefox,any.exefilecanserveasthemaindatacontainer. Ifthesizeoftheprimarycontainerislargerthan200MB,ThinAppcreatesaseparate.datfileasthe primarycontainerbecauseWindowsXPandWindows2000cannotshowshortcuticonsforlarge .exefiles.Generatingseparatesmall.exefilestogetherwiththe.datfilefixestheproblem. Ifthesizeoftheprimarycontainerisbetween200MBand1.5GB,ThinAppcreatesthedefault.dat fileunlessyouselecta.exefiletooverridethedefault.datfile.

(Optional)Ifyouselecta.exefiletooverridethedefault.datfilewhenthesizeoftheprimarycontainer isbetween200MBand1.5GB,ignorethegeneratedwarning. Selectinga.exefileenablesallapplicationstoworkproperlybutmightpreventtheproperdisplayof icons.

(Optional)Ifyoucannotselectaprimarydatacontainer,typeaprimarydatacontainernametogenerate a.datfile. IfyouplantousetheApplicationSyncutilitytoupdateacapturedapplication,ThinAppusestheprimary datacontainernameduringtheprocess.Youmustusethesamenameacrossmultipleversionsofthe application.Youmightnotbeabletoselectthesameprimarydatacontainernamefromthelist. For example,MicrosoftOffice2003andMicrosoftOffice2007donothavecommonentrypointnames.

4 5 6

(Optional)SelecttheGenerateMSIpackagecheckboxandchangetheMSIfilename. (Optional)TocreateasmallerexecutablepackageforlocationssuchasaUSBdevice,selecttheCompress virtualpackagecheckbox. ClickSave.

Opening Project and Parameter Files


Thecaptureprocessprovidesanopportunitytoreviewtheprojectfilestoupdatesettingsbeforebuildingthe executablepackageorMSIpackage. Forexample,ifyoucaptureFirefox2.0.0.3,youmightbrowsetheC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3directorytoupdateasetting,suchasanActiveDirectory specification,inthePackage.inifilethatcontainstheparameterssetduringthecaptureprocess.For informationaboutupdatingsettings,seeAdvancedPackageConfigurationonpage 23. Theprojectincludesfolders,suchas%AppData%,thatrepresentfilesystempathsthatmightchangelocations whenrunningondifferentoperatingsystemsorcomputers.Mostfoldershave##Attributes.inifilesthat specifytheisolationmodeatthefolderlevel.

22

VMware, Inc.

Chapter 2 Capturing Applications

Build Virtual Applications


Youcanadjustprojectfilesandbuildtheapplicationfordeployment. Build virtual applications in the Setup Capture wizard 1 (Optional)OntheReadytoBuildpage,scanorchangetheprojectfiles.
Option EditPackage.ini Openprojectfolder Description Modifyapplicationparametersfortheentirepackage. BrowseThinAppprojectfilesinWindowsExplorer.

(Optional)Topreventabuildfromtakingplace,selecttheSkipthebuildprocesscheckbox. Youcanbuildthepackageatalatertimewiththebuild.batfileinthevirtualapplicationfolder.For example,aFirefox2.0.0.3pathtothebuild.batfilemightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\build.bat.

3 4 5

ClickBuildtobuildanexecutablepackageorMSIpackagecontainingthefilesyouinstalledduringthe captureprocess. (Optional)DeselecttheOpenfoldercontainingprojectexecutablesafterclickingFinishcheckboxto viewtheexecutablefilesandMSIfilesatalatertime. ClickFinish. YoucanrebuildthepackageatanytimeafteryouclickFinishtomakechanges.

Advanced Package Configuration


Advancedusersmightmodifyconfigurationfiles,suchasthePackage.inior##Attributes.inifiles, beforebuildingthepackageduringthecaptureoraftertheinitialbuildofthepackage.

Modifying Settings in the Package.ini File


YoucanmodifythePackage.inifiletoupdatetheoverallpackage. Thefileresidesinthecapturedapplicationfolder.AFirefox2.0.0.3pathmightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\Package.ini. Thefollowingparametersareafewexamplesofsettingsthatyoumightmodify:

DirectoryIsolationModeSetstheisolationmodetoMerged,WriteCopy,orFull. PermittedGroupsRestrictsuseofanapplicationpackagetoaspecificsetofActiveDirectoryusers. SandboxNameIdentifiesthesandbox. Youmightkeepthenameforincrementalapplicationupdatesandchangethenameformajorupdates.

SandboxPathSetsthesandboxlocation. SandboxNetworkDrivesSpecifieswhethertodirectwriteoperationsonthenetworksharetothe sandbox. RequiredAppLinksSpecifiesalistofexternalThinApppackagestoimporttothecurrentpackageat runtime. OptionalAppLinksSpecifiesalistofexternalThinApppackagestoimporttothecurrentpackageat runtime.

ForinformationaboutallPackage.iniparameters,seeChapter 5,ConfiguringPackageParameters,on page 65.

VMware, Inc.

23

ThinApp Users Guide

Modify the Package.ini File


UseatexteditortomodifythePackage.inifile. Modify the Package.ini file 1 OpenthePackage.inifilelocatedinthecapturedapplicationfolder. Forexample,aFirefox2.0.0.3pathmightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\Package.ini. 2 Activatetheparametertoeditbyremovingthesemicolonatthebeginningoftheline. Forexample,activatetheRemoveSandboxOnExitparameterforFirefox.
RemoveSandboxOnExit=1

3 4

Deleteorchangethevalueoftheparameterandsavethefile. Doubleclickthebuild.batfileinthecapturedapplicationfoldertorebuildtheapplicationpackage. Forexample,aFirefox2.0.0.3pathtothebuild.batfilemightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\build.bat.

Modifying Settings in the ##Attributes.ini File


The##Attributes.inifileexistsinthefoldermacrosoftheprojectfolderandappliesconfigurationsettings atthedirectorylevel.ThePackage.inifileappliessettingsattheoverallapplicationlevel.Youcanusethe DirectoryIsolationMode,CompressionType,andExcludePatternparametersinan##Attributes.ini filetooverridethePackage.inisettingsatthedirectorylevel. Forexample,youcansettheisolationmodeatthedirectoryorapplicationleveltodeterminewhichfilesand registrykeysarevisibleandwrittenbythevirtualapplicationyoucreate.Thedetailedsettinginthe ##Attributes.inifileoverridestheoverallPackage.inisetting.ThePackage.inisettingdeterminesthe isolationmodeonlywhenThinAppdoesnothave##Attributes.iniinformation. The##Attributes.inifileappearsinmostfoldersforthecapturedapplication.For example,the Attributes.inifilemightbelocatedinC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\%AppData%\##Attributes.ini.

Modify the ##Attributes.ini File


Useatexteditortomodifythe##Attributes.inifile. Modify the ##Attributes.ini file 1 2 Inthe##Attibutes.inifile,uncomment,update,ordeletetheparameter. Doubleclickthebuild.batfileinthecapturedapplicationfoldertorebuildtheapplicationpackage.

Guidelines for Packaging Microsoft Office 2007


AlthoughtheprocesstocaptureMicrosoftOffice2007mightdependonyourenvironment,youcanreferto basicguidelines. FormoreinformationaboutthecaptureandconfigureprocessforMicrosoftOfficeandenvironmentneeds, seetheVMwareThinAppcommunityblog.

24

VMware, Inc.

Chapter 2 Capturing Applications

Requirements for Packaging Microsoft Office 2007


TheprocessofcapturingMicrosoftOffice2007assumesseveralrequirementsbeyondthestandard requirementsforcreatingThinApppackages. ThefollowingrequirementsinvolveMicrosoftsoftwareorprinterdependencies:

AcleanvirtualmachinewithasupportedWindowsoperatingsystem. AlicensedcopyofMicrosoftOffice2007. AMicrosoftOffice2007volumelicensekey. Youmustactivatearetaillicensekeyoneachmachinethepackagerunson.

WindowsInstaller4.5. Microsoft.NETFramework2.0,orlater. YoumustinstallMicrosoft.NETaftertheprescanoperationintheSetupCapturewizardandbeforethe installationofMicrosoftOffice2007.

Anyrequiredprinter,suchasacorporateprinter,installedbeforetheprescanoperationintheSetup Capturewizard.

Capturing Microsoft Office 2007


ThekeydifferencesbetweencapturingMicrosoftOffice2007andcapturingbasicapplicationsinvolve modifyingMicrosoftOfficeandblockingchildprocesses. ThecaptureprocessforMicrosoftOffice2007involvesthesesteps. 1 2 3 CustomizeMicrosoftOffice2007InstallationOptionsonpage 25 DisableChildProcessesforMicrosoftOffice2007onpage 26 SetCaptureOptionsforMicrosoftOffice2007onpage 26

ThisprocessassumesthatyouarefamiliarwiththeSetupCapturewizard.Youcanmodifytheprocess accordingtoyourenvironment.

Customize Microsoft Office 2007 Installation Options


StartingthecaptureprocessforMicrosoftOffice2007involvescustomizingtheMicrosoftOfficeinstallation. Customize the installation of Microsoft Office 2007 1 2 3 4 5 6 7 8 CopyMicrosoft.NET2.0,WindowsInstaller4.5,andThinAppinstallationfilestothevirtualmachine. CopytheMicrosoftOffice2007installationfilestothevirtualmachineorloadtheMicrosoftOffice2007 ISOtothevirtualmachine. InstallWindowsInstaller4.5andrestartthesystem. InstallThinApp. (Optional)Installarequiredprinter,suchasacorporateprinter. RuntheSetupCapturewizarduntilyoucompletetheprescanoperation. OntheInstallApplicationpageoftheSetupCapturewizard,minimizethewizardandinstallMicrosoft .NET2.0. (Optional)IftheMicrosoft.NETinstallationgeneratesthemscorsvw.exeprocessthatcontinuesforan extendedperiod,stoptheprocesswiththengen.exetool.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe executequeueditems

VMware, Inc.

25

ThinApp Users Guide

StarttheMicrosoftOffice2007setupwizard. TheinstallationsetupinvolvestypingtheMicrosoftOffice2007licensekeyandacceptingthelicense agreement.

10

(Optional)OntheFileLocationtab,installthesoftwareinafixeddirectory,suchasC:\Office,rather thanadefaultdirectorytopreventpossibleaccesserrorsforonlinehelpinMicrosoftOfficeapplications. TheaccesserrorsapplyonlytoOfficeapplicationsdeployedon64bitoperatingsystems.

11 12

OntheChoosetheinstallationyouwantdialogbox,clicktheCustomizebutton. OntheInstallationOptionstab,customizetheoptionstocapturetheappropriatefilesandpreventa MicrosoftOfficeprintererror. a b c d e f SelectMicrosoftOffice>RunallfromMyComputer. Clicktheplus (+)symbolnexttotheOfficeToolsmenu. Clicktheplus (+)symbolnexttotheMicrosoftOfficeDocumentImagingmenu. IntheMicrosoftOfficeDocumentImageWriterdropdownmenu,selectNotAvailable. ClickInstallNowtoinstallMicrosoftOffice2007. Closetheinstallationsetup.

Disable Child Processes for Microsoft Office 2007


CapturingMicrosoftOfficeinvolvesdisablingchildprocessesbeforethepostscanstageoftheSetupCapture wizard. Somechildprocessespreventyoufromclosingthesandbox. Disable child processes for Microsoft Office 2007 1 Disablethectfmon.exeprocesstopreventchildprocessesfrompreventingyoufromclosingthe sandbox. a b c d e 2 IntheWindowscontrolpanel,selectRegionalandLanguageOptions. OntheLanguagestab,clickDetails. OntheAdvancedtab,selecttheTurnoffadvancedtextservicescheckbox. Fromthedesktop,selectStart>RunandruntheRegsvr32.exe /u msimtf.dllcommand. Fromthedesktop,selectStart>RunandruntheRegsvr32.exe /u Msctf.dllcommand.

Disablethemdm.exeprocesstopreventanissuewithchildprocessesthatpreventyoufromclosingthe sandbox. a b InInternetExplorer,selectTools>InternetOptions. OntheAdvancedtab,selecttheDisableScriptDebugging(Other)checkboxandtheDisableScript Debugging(InternetExplorer)checkbox.

(Optional)UseVMwareWorkstationtotakeasnapshotofthevirtualmachine. Thisfeaturecreatesanimagethatyoucanreverttowhenyouaddpluginsorupdates.

Set Capture Options for Microsoft Office 2007


ThefinalphaseofthecaptureprocessforMicrosoftOffice2007involvestheThinApppostscanoperationand SetupCapturewizardoptionstocreatethepackage. ThefollowingexamplesforoptionsmightapplytoMicrosoftOffice2007:

Thelocationoftheentrypointsis%ProgramFilesDir%\Microsoft Office\Office12. TheprimarydatacontainernameisMicrosoft Office 2007.dat.

26

VMware, Inc.

Chapter 2 Capturing Applications

TheisolationmodeisMergedmode. WriteCopyisolationmodeisappropriatewhenyoudonotwanttoleavetracesoffilesoutsideofthe sandbox.

ThedeploymentofMicrosoftOffice2007usesanMSIpackage.

Set capture options for Microsoft Office 2007 MaximizetheSetupCapturewizardandcompletethecaptureprocess.

Configure Microsoft Office 2007


ConfiguringMicrosoftOffice2007outsideofthecaptureprocessinvolvesdeletingdirectoriesandupdating projectfiles. YoucanmakeconfigurationchangestotheMicrosoftOffice2007packagewhenthechangesareappropriate foryourenvironment. Configure Microsoft Office 2007

(Optional)Tosavespace,deletethefollowingdirectoriesandfilesthatMicrosoftOfficedoesnotrequire:

%COOKIES% %HISTORY% %INTERNET CACHE% %PROFILE% %COMMON APPDATA%\VMware .msiand.mspfilesin%SystemRoot%\Installer

(Optional)IfyoudonotwanttomodifyyourOffice2007packagewithcustomizationsinvolvinguser namesorcompanynames,deletethecontentsofthe%APPDATA%directoryexceptthe##Attributes.ini file. Thisdeletionenforcesacleanconfigurationfortheuser.

(Optional)IntheHKEY_CURRENT_USER.txtfileintheprojectfiles,addtheisolation_full HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Securityentryanywhereinthe fileifitdoesnotexist. (Optional)Addtheseentriesbelowtheisolation_full HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Securityentry.


Value=OutlookSecureTempFolder REG_SZ~%Profile%\Local Settings\OutlookTemp#2300

(Optional)IfyouactivateanyApplicationSyncparameterandtheCompressionTypeparameter, deactivatecompressioninthe##Attributes.inifileofthe%Program Files Common%\Microsoft Shared\OFFICE12\directory.


[Compression] CompressionType=None

Withoutthismodification,anerrormightaffectthe%Program Files Common%\Microsoft Shared\OFFICE12\ODSERV.EXEfile.

VMware, Inc.

27

ThinApp Users Guide

Capturing Internet Explorer 6 on Windows XP


AfteryouusetheSetupCapturewizardtocaptureInternetExplorer6runningonWindowsXP,onatest machineyoucanusetheThinAppThinDirectplugintoredirectWebsitesorspecificpagestoautomatically openinavirtualInternetExplorer6browser.YoucanviewWebpagesthatareincompatibleinthenative versionofInternetExplorerinthevirtualInternetExplorer6.Alistismaintainedthatfacilitatesaredirection processforspecifiedincompatibledomainsandpages. YoucanalsoinstallInternetExplorer6pluginssuchasJavaruntimeplugins.Thepluginsaretreatedasany otherfileduringSetupCapture.ThepluginsareembeddedintheInternetExplorer6capture. AftertheThinDirectpluginissuccessfullyinstalledinyournativebrowser,whenauserrequestsaURLthat isincludedintheredirectlist,amessageappearsinthenativebrowsertoalerttheuserthatthepageisbeing redirectedtoavirtualInternetExplorer6browser.ThevirtualbrowseropensandtherequestedURLappears.

Requirements for Capturing Internet Explorer 6 on Windows XP


BeforeyoustarttheSetupCapturewizardthefollowingrequirementsmustbemet:

YoumusthaveacleanvirtualmachinewithWindowsXPinstalled. EnsurethatWindowsXPincludesalltheservicepacksandMicrosoftupdates,sothatInternetExplorer 6iscapturedwiththelatestsecurityfixesfromMicrosoft.

ThinAppmustbeinstalledonthesamemachine.

Capture Internet Explorer 6 on Windows XP by Using the Setup Capture Wizard


CapturingInternetExplorer6usingtheSetupCapturewizardissimilartothatofcapturingother applications.Therearetwokeydifferences.WhenyouusetheSetupCapturewizardtocaptureInternet Explorer6onWindowsXP,youdefineanentrypointtoInternetExplorer.YoualsouseThinDirecttospecify URLsthatwillberedirectedtothevirtualizedInternetExplorer6browser. SeeCapturingApplicationswiththeSetupCaptureWizardonpage 16forafulloverviewofthestandard SetupCaptureprocess. RunsetupcaptureonamachinerunningWindowsXPwithServicePack3,andwiththe.NETframework installed. Capture Internet Explorer 6 on Windows XP 1 2 3 CreateasystemimageusingthePrescanprocessoftheSetupCapturewizard. IntheInstallApplicationdialogbox,clickInternetExplorer. SelectIncludeentrypointforvitualizedInternetExplorer6inthevirtualpackageandclickOK. Thisoptioncapturesboththefilesthatchangedduringsetupcaptureandotherrequiredfilesandregistry settings. 4 5 6 7 8 InstallanypluginsforInternetExplorerthatyouwanttobeincludedinthepackage. RescanthesystemusingthePostscanprocessoftheSetupCapturewizard. IntheSetupCaptureEntryPointsdialogbox,selectthedefault,VirtIE6.exe. FollowthepromptsuntiltheNativeBrowserRedirectdialogboxappears. CreatealistoftheWebsitesandpagesthatyouwanttoredirecttothevirtualInternetExplorer6package.

28

VMware, Inc.

Chapter 2 Capturing Applications

Usetheformat[protocol://]hostname[:port][/path]tospecifyaredirectURL. Table 2-1. Description of redirect URL format


Description

protocol hostname

Theconnectionprotocol,normallyeitherhttporhttps.Ifyoudonotspecifythe protocol,thelinematchesallprotocols. Thehostname.Thehostnamecancontainasingle*asawildcard.Forexample, thehostname*.vmware.commatchesbothwww.vmware.comand othersubdomain.vmware.com. Anumericalportnumber.Ifnotspecified,thelinematchesallportnumbers. Thepath.Thepathcancontainasingle*asawildcard.Ifnotspecified,theline matchesallpaths.

port /path

Eachentrymustbeonaseparateline.

Youcanspecifyasitesothatallpagesonthatsiteareredirected,forexample,www.example.com. Youcanspecifyasitenamefollowedbyapagename,sothatthespecificpageisredirected,for examplejavatester.org/version.html. Emptylinesareignored Youcanusethe#symboltocreatecommentlinesthatarenotreadbytheThinDirectplugin.

(Optional)Whenyouhavesavedthepackage,opentheThinDirect.txtfile,whichcontainstheentry pointtoInternetExplorer6andthelistofredirectaddresses,andeditthefile. ThisfileonlyexistsafteryoucreateentriesintheNativeBrowserRedirectdialogbox. Theredirectionlistislocatedin%appdata%\roaming\Vmware\VMware Thinapp\Thindirect.

10 Followthepromptstobuildtheproject. TheThinDirect.exefileisembeddedinthepackage,withthepluginThinDirect.dllandplugin launcherThinDirectLauncher.exefiles.

Capture Internet Explorer 6 on Windows XP From the Command Line


YoucanuseascripttocaptureInternetExplorer6onWindowsXPfromthecommandline. Create a virtual Internet Explorer 6 package from the command line 1 2 3 4 OnacleanonamachinerunningWindowsXPwithServicePack3,andwiththe.NETframework installed,openaconsoleandatthecommandlineprompt,runsnapshot before.snapshot. Installanyrequiredplugins. Runsnapshot after.snapshot. Runsnapshot before.snapshot -SuggestProject after.snapshot VirtIE6.ini -IESelection <selection number>. Table 2-2. IESelection parameter values
Selection Number IESelection 0 IESelection 1. Action Takenoaction. CreateanentrypointthatpointstothesysteminstalledInternetExplorer. Forexample,ifyourunthisentrypointonaWindows7computerthathasInternet Explorer8nativelyinstalled,theentrypointstartsInternetExplorer8insideavirtualbubble. IfyourunthesameentrypointonaWindowsXPcomputerthathasInternetExplorer6 nativelyinstalled,theentrypointlaunchesInternetExplorer6insideavirtualbubble. IESelection 2 HarvestalltheInternetExplorer6filesfromthesystemandaddthemtothepackage.Adda VirtIE6.exeentrypoint.ThisVirtIE6.exeentrypointwillalwaysrunInternetExplorer6, independentofthenativelyinstalledversionofInternetExplorer.

VMware, Inc.

29

ThinApp Users Guide

5 6

(Optional)CreateaThinDirect.txtfileandsaveitinthesameprojectdirectoryasthePackage.ini file. Runsnapshot VirtIE6.ini -GenerateProject <path_to_project_dir>.

ThevirtualInternetExplorer6onWindowsXPpackageisbuilt.

Extracting and Registering ThinDirect


AfteryoubuildanInternetExplorer6package,youmustextractandregistertheThinDirectpluginonthe testmachine. WithThinDirect,youcanassociateWebpageswithalternativevirtualizedbrowserversions.WithThinDirect, usersareautomaticallyredirectedtotheappropriatevirtualornativebrowserastheynavigatethrough differentpages,withoutinterruptiontotheirworkflow. ThinDirectinstallsabrowserhelperobjectinthenativeinstanceofInternetExplorerthatrunsthevirtualized browserswhentheyarerequiredtonavigatetospecificpredefinedURLs.BecauseThinApprunsentirelyin usermodeanddoesnotinstallanysystemdrivers,thenativeInternetExplorerinstanceiscompletely unaffectedbyThinApp. TheThinDirectpluginmustbeinstalledaspartofthevirtualpackage.Thepluginisinstalledinthenative browserduringtheregistrationprocess. Extract and register ThinDirect Intheconsole,runthethinreg /a VirtIE6.execommandtoextracttheThinDirectapplication,andextract andregistertheThinDirectlibrary. TheThinDirectapplicationisinstalledintheProgram Files/VMware/VMware ThinApp/ThinDirect directory. YoucanhavemultipleThinDirecttextfilesintheThinDirectdirectory,iftheyallhaveuniquenames.The ThinDirectpluginthenreadsallfiles. Inadditiontoindividualmachineregistration,youcanregisterWebpageredirectsonaindividualuserbasis byomittingthe/aswitch.ToachieveindividualuserredirectsrequiresthattheThinDirectpluginbe installedasaseparatestepfromanAdministratoraccount.IfyoudonotinstalltheThinDirectpluginasa separatestep,Thinregdisplaysanerror. YoucanpushadditionalWebpageredirecttoendusercomputersbycopyingfileswithaspecificformatto specificindividualmachineorindividualuserlocations.

Capturing Multiple Application Installers with ThinApp Converter


YoucanuseThinAppConvertertoconvertmultipleapplicationinstallersintoThinApppackages automatically,byusingvirtualmachinesthatarerunningWindows.Afteryouprovideaconfigurationfile withspecificsettingsthattheconverteraccesses,ThinAppConverterrunsapplicationinstallersinsilent mode.Silentmodemeansthattheinstallationprocessoccurswithoutrequiringuserinput,afterinitial configurationsettingsarespecified.ThinAppConvertertransparentlycapturesinstallationcontent,generates ThinAppprojects,andbuildstheprojectsintoThinApppackagesinvirtualmachinesthatyouspecifyinthe configurationfile.Thisprocessisfullyautomated,fromwhenThinAppConverterstartstorununtilthe ThinApppackagesarebuilt.

ThinApp Converter Conversion Process


BeforeyourunThinAppConverter,youmustusetheThinAppConverter.iniconfigurationfileasa templatetospecifythevirtualmachineenvironmentonwhichtheapplicationstobeconvertedreside,the networksharepaths,andvariousothermandatoryandoptionalparameters.Youthenusethe-fcommand lineswitchtospecifytheconfigurationfilethatyoucreated,whichThinAppConverterwilluse.Forexample, ThinAppConverter.exe -f myConfig.ini.Toactivateverboseloggingofconversionprocess,usethe-v commandlineswitch,forexamplethinappconverter.exe -v -f myConfig.ini.

30

VMware, Inc.

Chapter 2 Capturing Applications

ThinAppConverterreadstheconfigurationfiletoidentifywhichapplicationinstallersaretobeconvertedand thevirtualmachinesonwhichtheconversionistooccur. ThinAppConverterthentakesasnapshotofthevirtualmachinewhenitispoweredoff,whichisusedto preservethevirtualmachinestates. Afterthesnapshotistaken,ThinAppConverterpowersonthevirtualmachineandpushesasilentcapture agentintothevirtualmachine.Thesilentcaptureagentrunstransparentlyonthevirtualmachines,capturing theapplicationinstallationprocessinasimilarwaytothatoftheSetupCapturewizardwhenanapplication isbeingcapturedmanually.Thesilentcaptureagentperformsthefollowingactions:


RunsaThinAppprescan Installsanapplicationfromthenetworksharespecifiedintheconfigurationfile Runsapostscan GeneratesaThinAppprojectonthenetworksharespecifiedintheconfigurationfile Performsprojectpostprocessingtasks BuildstheThinAppprojectonthenetworkshareintoapackage

ThesilentcaptureagentthenreturnscontroltoThinAppConverter,whichrevertsthevirtualmachinestotheir precapturestate,usingtheirpoweredoffsnapshots. Theprocessisthenrepeatedforthenextapplicationinstallationprocessthatneedstobeconverted.When multiplevirtualmachinesarespecified,thesilentcaptureagentrunsonthevirtualmachinessimultaneously. Asavirtualmachinebecomesavailable,itisonceagainusedforconvertingthenextapplication Figure 2-1. Overview of the Conversion Process

ThinApp Converter Limitations

Notallapplicationinstallationprocessessupportsilentinstallationmode.ThinAppConverterdoesnot supportautomaticcaptureforanapplicationinstallerthatdoesnotsupportsilentinstallation. Theinstallerdirectorynamemustnotcontaintheequalssymbol(=). Donotsuspend,poweroff,orpoweronanyofthevirtualmachinesthatarepartoftheconversionatany timeduringtheprocess. OnlyoneinstanceofThinAppConvertercanuseavirtualmachineduringtheconversionprocess.

VMware, Inc.

31

ThinApp Users Guide

System Requirements for Running ThinApp Converter


ThinAppConverterrequiresoneofthefollowingvirtualmachineenvironments:

VMwareESXServer4.0,orlater VMwarevCenterServer4.0,orlater VMwareWorkstation7.0,orlater

Thevirtualmachinesthatareusedintheconversionprocessmusthavethefollowingitemsinstalled:

WindowsXPwithServicePack3,WindowsVista,orWindows7 ThelatestversionofVMwareTools

ThinAppConverterincludesaprivatecopyoftheVMwareVIXAPIlibrary.Ifamorerecentversionofthe libraryalreadyexistsonthehostmachine,ThinAppConvertertriestousethenewestversion. VMwarerecommendsthatyouuseWindows2003orWindows2008asafileserverfornetworkshare.Thefile serverneedstohavesufficientsystemresourcestohandlealargequantityoffileoperations.Donotusethe hostmachinethatrunstheThinAppConverterexecutablefileasthefileserverforthenetworkshare. WhenusingaVMwareWorkstationenvironment,ensurethatthenetworksettingsareinbridgedmode.

Preparing the Configuration File for ThinApp Converter


Asampleconfigurationfile,ThinAppConverter.ini,isincludedintheThinAppinstallation.Thefileis generallylocatedinC:\Program Files\VMware\VMware ThinApp. Modifyorcreateacopyofthisfiletosuityourrequirements.UseUTF8encodingwhenyouspecifyparameter values. TheThinAppConverter.ini configurationfileincludesthefollowingsectionheadings:

[HostEnvironment]containsvirtualmachinehostingparameters. [VirtualMachineN]containsvirtualmachinespecificparameters. [Settings]containsparametersthatprovideglobalcontrolofthecaptureprocess. [AppSettings:AppName] containsoptionalapplicationspecificparameters.

HostEnvironment
TheHostEnvironmentsectionoftheconfigurationfilecontainstheconnectionparametersforconnectingto VMwareESXServer,VMwarevCenterServer,orVMwareWorkstationonalocalmachine. [HostEnvironment]parametersaremandatory.

Youcanonlyspecifyasingleendpointatatimeintheconfigurationfile.Forexample,ifyouplantouse asingleVMwareESXServer,youcanhaveThinAppConverter.exedirectlyconnecttothatserver. YoucannotspecifymorethanoneESXserver.TousemorethanoneESXserver,configure ThinAppConverter.exe toconnecttoVMwarevCenterServer,whichmanagesmultipleESXservers. YoucanusealocallyinstalledVMwareWorkstation.

VirtualMachineHost ThenameofthevirtualmachinehosttowhichThinAppConverteristoconnect.

ToconnectasingleVMwareESXServer,usetheIPaddressorhostnameoftheESXserver. ToconnecttoVMWarevCenterServer,usetheIPaddressornameofthevCenterserver. ToconnecttoalocalVMwareWorkstationinstance,uselocalhost. ForVMwareESXServerorVMwarevCenterServer,ifyouarenotusingstandardHTTPSwithport443, youcanspecifytheentireURL.

32

VMware, Inc.

Chapter 2 Capturing Applications

Examples ThefollowingexampleshowsavirtualmachinespecifiedbyESXserverhostname.
[HostEnvironment] VirtualMachineHost=MyEsx.vmware.com

ThefollowingexampleshowsavirtualmachinespecifiedbyIPaddress.
[HostEnvironment] VirtualMachineHost=10.13.11.23

Thefollowingexampleshowsalocalmachinespecifiedaslocalhost.
[HostEnvironment] VirtualMachineHost=localhost

HostLoginUserName Theloginusernameforthehostofthevirtualmachines. UsethesameloginusernameforconnectingtotheserverasyouuseforloggingintotheVMwarevSphere Client.Youmusthavesufficientprivilegestoturnonandoffvirtualmachines,takevirtualmachinesnapshots, andsoon. YoucanuseUPNformatwhenyouspecifyausernameforvCenter.Forexample,user@domain.com. HostLoginUserNameisignoredwhenloggingintoVMwareWorkstation. HostLoginPasswordorHostLoginPasswordBase64 Theloginpasswordforthehostmachine.Youhavethefollowingoptionswhenyouspecifypasswords:


Youcanentercleartext. Youcanspecifyabase64encodedpasswordfortheHostLoginPasswordBase64parameter.Specifying anencodedpassworddoesnotincreasesecurity.YoumustprotecttheactualINIfile.

HostLoginPasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. IfyoudonotwanttostorethevSphereServerpasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifaHostLoginPasswordisspecifiedintheconfigurationfile. Example Thefollowingexampleshowsatypicalhostenvironmentspecification.Thehostnameofthevirtualmachine isspecifiedastheESXserverhostname.


[HostEnvironment] VirtualMachineHost=MyEsx.vmawre.com HostLoginUserName=root HostLoginPassword=secret HostLoginPasswordPrompt=false

VirtualMachineN
TheVirtualMachineNsectionoftheconfigurationfilecontainsalistoftheWindowsbasedvirtualmachines thatwillbeusedintheconversionprocess.IfyourunThinAppConverter.exeinavirtualmachine,donot specifythatvirtualmachineintheVirtualMachineNlist,becausethatvirtualmachinecannotthenbeusedfor theconversionprocess. CreateaVirtualMachineX sectionforeachvirtualmachinethatyouwanttoinclude,andspecifytheir parameters.Xis1,andsubsequentvirtualmachinesectionsarenumberedsequentially. [VirtualMachineN]parametersaremandatory. VmxPath Specifytheconfigurationpathofthevirtualmachine.

VMware, Inc.

33

ThinApp Users Guide

ForESXServerorvCenterServer,youcanidentifythevirtualmachineconfigurationfilepathusingthe vSphereClient. Identify the virtual machine configuration path using the vSphere Client 1 2 3 RightclickthevirtualmachineandselectEditSettings. ClicktheOptionstab,andcopythestringfromtheVirtualMachineConfigurationFilefield. Usethisstringasthevirtualmachineconfigurationfilepath.

ForWorkstation,specifytheentirefilepathonthehostonwhichtheVMXconfigurationfileresides.For example,C:\MyVMs\Windows XP\WindowsXP.vmx.Donotplacethepathinquotationmarks,evenifthepath containsaspace. UserName Avalidusernameforthevirtualmachineguestoperatingsystem.Theusermusthaveadministrator privilegesforthevirtualmachineguestoperatingsystem. YoucanuseUPNformatwhenyouspecifyausername.Forexample,user@domain.com. PasswordorPasswordBase64 Avalidpasswordforthevirtualmachineguestoperatingsystem.Youhavethefollowingoptionswhenyou specifypasswords:

Youcanentercleartext. Youcanspecifyabase64encodedpasswordforthePasswordBase64parameter. Specifyinganencodedpassworddoesnotincreasesecuritystrength.YoumustprotecttheactualINIfile.

IfthePasswordsettingisnotused,thepasswordfortheguestisassumedtobeblank.MostWindowsvirtual machinesdonotsupportautomationwithemptypasswords,soyoushouldspecifyaguestpassword. PasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. Ifyoudonotwanttostorethevirtualmachinepasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifapasswordisspecifiedintheconfigurationfile. Examples FollowingisanexampleforanESXserverbasedenvironment.Apasswordhasbeenspecifiedand,as PasswordPromptissettofalse,theuserwillnotbepromptedtoenterapassword.


[VirtualMachine1] VmxPath=[Storage] WinXP_Converter/WinXP_Converter.vmx UserName=administrator Password=secret PasswordPrompt=false

FollowingisanexampleforaVMwareWorkstationbasedvirtualmachine.Onvirtualmachine1, PasswordPrompthasbeensettotrue.Theuserwillbepromptedforapasswordeventhoughapasswordhas beenspecifiedintheconfiguration.


[VirtualMachine1] VmxPath=C:\MyVMs\Windows XP\Windows XP.vmx UserName=administrator Password= PasswordPrompt=true [VirtualMachine2] VmxPath=C:\MyVMs\Windows 7\Windows 7.vmx UserName=adminuser@mydomain.com Password= PasswordPrompt=true

NOTEDonotplacethepathinquotationmarks,evenifthepathcontainsaspace.
34 VMware, Inc.

Chapter 2 Capturing Applications

Settings
TheSettingssectionoftheconfigurationfilecontainstheparametersfortheapplicationinstallerdirectoryand ThinAppprojectoutputdirectory,intheformofUNC.Italsocontainsseveralparameterscontrollingthe conversionprocessbehavior. ThinAppConverteronlyrequiresreadonlypermissionsforthenetworksharethatcontainstheapplication installers.Itrequiresread/writepermissionsforthenetworksharethatcontainstheThinAppprojects. Ifinputandoutputdirectoriesareonthesamefileserver,youmustusethesameuseraccounttoconnectthem. InputUncPath SpecifythenetworkshareUNCpathfortheapplicationinstallers.Forexample:\\fileserver\sharename, or\\fileserver\sharename\dirname. InputMountUserName Specifytheusernameusedforconnectingtothatnetworkshare.UPNformatcanbeusedwhenyouspecify adomainuser,forexampleuser@domain.com InputMountPasswordorInputMountPasswordBase64 Specifythepasswordforconnectingtothenetworkshare.Youhavethefollowingoptionswhenyouspecify passwords:

Youcanentercleartext. Youcanspecifyabase64encodedpasswordfortheInputMountPasswordBase64 parameter.

InputMountPasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. Ifyoudonotwanttostorethenetworksharepasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifapasswordisspecifiedintheconfigurationfile. OutputUncPath SpecifythenetworkshareUNCpathtothelocationofthegeneratedThinAppprojects. Forexample:\\fileserver\sharename,or\\fileserver\sharename\dirname OutputMountUserName SpecifytheusernameusedforconnectingtotheOutputUncPath networkshare.UPNformatcanbeusedto specifyadomainuser,forexample,user@domain.com. OutputMountPasswordorOutputMountPasswordBase64 Specifythepasswordforconnectingtothenetworkshare.Youhavethefollowingoptionswhenyouspecify passwords:

Youcanentercleartext. Youcanspecifyabase64encodedpasswordfortheOutputMountPasswordBase64parameter.

OutputMountPasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. Ifyoudonotwanttostorethenetworksharepasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifapasswordisspecifiedintheconfigurationfile. Example Followingisanexampleofnetworksharespecifications.Theuserfortheapplicationinstallationdirectoryhas onlyreadpermissions.


[Settings] InputUncPath=\\AppInstallerServer\AppInstallers\ThinAppMigration InputMountUserName=readonlyUser
VMware, Inc. 35

ThinApp Users Guide

InputMountPassword=secret InputMountPasswordPrompt=false OutputUncPath=\\DeploymentServer\ThinAppProj OutputMountUserName=readwriteUser OutputMountPassword=secret OutputMountPasswordPrompt=false

ThinApp Converter Logic for Detecting the Application Installers


Fortheapplicationinstallersnetworkshare,ThinAppConverterexaminesallsubdirectoriesunderthe specifiedUNCpathrecursively,includingtheirsubdirectories.Foreachsubdirectory,itdetermineswhich commandtorunforsilentapplicationinstallationusingthefollowinglogic: 1 AttemptstofindavalueforInstallationCommandinthe[AppSettings:AppDirName]sectionofthe configurationfile.IfsuccessfulThinAppConverterusesthatvalue.ThesubdirectorythatThinApp ConverterlooksintoisAppDirName. Attemptstofindafilenamedinstall.cmdorinstall.bat.Ifsuccessful,ThinAppConverterrunsthat file. IfThinAppConverterfindsasingle.cmdor.batfile,itrunsthatfile. IfThinAppConverterfindsasingle.exefile,itrunsthatfile. IfThinAppConverterfindsasingle.mstfile,itrunsthatfileandaddsthenecessarysilentinstallation switches. IfThinAppConverterfindsasingle.msifile,itrunsthatfileandaddsthenecessarysilentinstallation switches.

2 3 4 5 6

IfnoneofthestepsenableThinAppConvertertofindacorrectinstallationcommand,thesubdirectoryis skipped.Awarningisloggedinthelogfile. YoumustremoveallnetworkconnectionstothefileserverreferenceintheINIfilefromthehostonwhichyou runThinAppConverter,topreventconflictbetweenusercredentials. PackageIniOverrideFile SpecifythefilepathtotheglobalPackage.inioverridefile. ThisoptionalparameterenablesyoutospecifyaglobaloverridefileforPackage.ini thatisgeneratedfor eachThinAppproject.ThevaluesintheoverridefilearemergedintoPackage.iniintheThinAppproject thatisgeneratedforeachapplication. Globaloverridesareusefulwhenyouhaveaglobalpolicysetting,forexample,PermittedGroupin Package.ini. APackage.inioverridefileisformattedlikeastandardWindowsINIfile.YoucanaddINIparametersand valuesthatarerelevanttothePackage.inifile. Thepathisrelativetotheapplicationinstallersnetworkshare.Usingtheexampleforspecifyingthenetwork sharesfortheapplicationinstallersandThinAppprojects,ifyouspecify PackageIniOverrideFile=override.ini,ThinAppConvertertriestofindthefileunder \\AppInstallerServer\AppInstaller.Youcanprovideamoreexplicitvaluebyusingpredefined environmentvariables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 38. YoucanspecifyaPackage.inifileforeachapplication.Thisprocessisdescribedaspartofthe [AppSettings:AppName]section. ExclusionList SpecifyacommaorsemicolonseparatedlistofapplicationdirectoriesthatThinAppwillskipwhensearching forapplicationinstallers. Thelistiscaseinsensitive. YoucanspecifywildcardsforDOSstylefilenames.Forexample,Microsoft*. ?and*aresupported.

36

VMware, Inc.

Chapter 2 Capturing Applications

Example Followingisanexampleofanexclusionspecificationusingawildcard.
[Settings] ExclusionList=App?.old;FireFox1.0

ProjectPostProcessingCommand Specifythefilepathtotheprojectpostprocessingcommand. Thefilepathisrelativetotheapplicationinstallersnetworkshare.Usingtheexampleforspecifyingthe networksharesfortheapplicationinstallersandThinAppprojects,ifyouspecify ProjectPostProcessingCommand=addscript.bat,ThinAppConverterwilltrytofindthefileunder \\AppInstallerServer\AppInstaller.Youcanprovideamoreexplicitvaluebyusingpredefined environmentvariables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 38. StopOnError SpecifywhetherThinAppConvertershouldstopconvertinganapplicationifitencountersanerror,or continuewiththeotherapplications.Thedefaultvalueisfalse. BuildAfterCapture SpecifywhethertheThinAppConvertershouldbuildtheThinAppProjectsintopackagesfollowingcapture. Thedefaultvalueistrue. DetectIdle SpecifywhetherThinAppConvertershouldtrytodetectifanapplicationinstallerisstalled,forexamplewhen theapplicationiswaitingforuserinputontheguestvirtualmachinebecauseincorrectsilentinstallation switcheswerespecified. Thedefaultvalueistrue.ThinAppConvertermightnotbeabletodetectallsituationsinwhichtheinstaller isidle. InstallerTimeout SpecifyhowlongThinAppConvertershouldwaitforanapplicationinstallertofinishbeforeitquits. Bydefault,thevalueis7200seconds.

AppSettings:AppName
Thisoptionalsectionprovidesparametersthatyoucanusetoaddsettingsthatarespecifictoanapplication. AppNameistheactualnameofthesubdirectorythatcontainstheapplicationinstaller.Theseparameterscan beaddedtoeachAppSettingssection.Inmostcircumstances,youwillnotneedtoconfigurethissection. InstallationCommand SpecifyhowThinAppConvertershouldstarttheapplicationinstaller.Ifthereisnovalue,ThinAppConverter attemptstoselectoneinstallationcommandusingthelogicdescribedinThinAppConverterLogicfor DetectingtheApplicationInstallersonpage 36. PackageIniOverrideFile ThePackage.inioverridefilethatisappliedtoasingleThinAppproject.Whenthisparameterhasavalue,the globaloverridefileisprocessedfirst,followedbythisapplicationspecificoverridefile. Thefilepathisrelativetotheapplicationinstallersubdirectory.Usingtheexamplethatfollowsthe ProjectPostProcessingCommand parameterdescription,ifyouspecify PackageIniOverrideFile=override.ini,ThinAppConvertertriestofindthefileunder \\AppInstallerServer\AppInstaller\Adobe.Youcanprovideamoreexplicitvaluebyusingpredefined environmentvariables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 38.

VMware, Inc.

37

ThinApp Users Guide

ProjectPostProcessingCommand Specifytheprojectpostprocessingcommandforthespecificapplication. Whenthisparameterhasavalue,theglobalpostprocessingcommandisprocessedfirst,followedbythis applicationspecificpostprocessingcommand. Example Followingisanexampleofhowtoapplyanapplicationspecificoverrideduringpostprocessing.


[AppSettings:Adobe] InstallationCommand=AdbeRdr920_en_US.exe /sAll PackageIniOverrideFile=override.ini [AppSettings:TextPad] InstallationCommand=silent_install.bat ProjectPostProcessingCommand=%AppInstallerDir%\addscript.bat

Predefined Environment Variables


ThevaluesforPackageIniOverrideFile(globalandperapplication),ProjectPostProcessingCommand (globalandperapplication),andInstallationCommandcancontainenvironmentvariables.ThinApp Converterexpandsthevaluebeforeusingit. ThinAppConverteraddsthesevariablesaspredefinedenvironmentvariables:

%AppInstallersRootDir%TheUNCpathoftheapplicationinstallersthatisspecifiedin InputUncPathinthe[Settings]section. %AppInstallerDir%Thesubdirectoryunder%AppInstallersRootDir%fortherelevantapplication. %ThinAppProjectsRootDir%TheUNCpathforthegeneratedThinAppprojectsthatisspecifiedin OutputUncPathinthe[Settings]section. %ThinAppProjectDir%Thesubdirectoryunder%ThinAppProjectsRootDir%fortherelevant application.

Example
FollowingisanexampleofhowpredefinedvariablescanbeusedinthePackageIniOverrideFile, ProjectPostProcessingCommand,andInstallationCommandparameters.
[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

38

VMware, Inc.

Deploying Applications

Deployingcapturedapplicationsinvolvesworkingwithdeploymenttools,thethinreg.exeutility,MSIfiles, andActiveDirectory. Thisinformationincludesthefollowingtopics:


ThinAppDeploymentOptionsonpage 39 EstablishingFileTypeAssociationswiththethinreg.exeUtilityonpage 40 BuildinganMSIDatabaseonpage 43 ControllingApplicationAccesswithActiveDirectoryonpage 45 StartingandStoppingVirtualServicesonpage 46 UsingThinAppPackagesStreamedfromtheNetworkonpage 47 UsingCapturedApplicationswithOtherSystemComponentsonpage 49 SampleIsolationModeConfigurationDependingonDeploymentContextonpage 51

ThinApp Deployment Options


Youcandeploycapturedapplicationswithdeploymenttools,inaVMwareViewenvironment,ona networkshare,orasbasicexecutablefiles.

Deploying ThinApp with Deployment Tools


Mediumandlargeenterprisesoftenusemajordeploymenttools,suchasSymantec,BMC,andSMStools. ThinAppworkswithallmajordeploymenttools. Whenyouuseanyofthesetools,youcancreateMSIfilesforthecapturedapplicationsandfollowthesame processyouusetodeploynativeMSIfiles.Seedeploymentinstructionsfromthetoolvendors.Forinformation aboutMSIfiles,seeBuildinganMSIDatabaseonpage 43.

Deploying ThinApp in the VMware View Environment


YoucanuseVMwareViewtodistributeThinApppackages. Theworkflowfordeployingpackagesmightinvolvethefollowingtasks:

Creatingexecutablefilesforthecapturedapplications. Storingtheexecutablefilesonanetworkshare.

VMware, Inc.

39

ThinApp Users Guide

Creatingaloginscriptthatqueriesapplicationsentitledtotheuserandrunsthethinreg.exeutilitywith theoptionthatregisterstheapplicationsonthelocalmachine.Loginscriptsareusefulfornonpersistent desktops.SeeEstablishingFileTypeAssociationswiththethinreg.exeUtilityonpage 40. Controllinguseraccesstofileshares.ITadministratorsmightcontrolaccessbyorganizingnetworkshares basedonfunctionandassociatingpermissionswithnetworksharesbasedonthosefunctional boundaries.

Deploying ThinApp on Network Shares


Smallandmediumenterprisestendtouseanetworkshare.Youcancreateexecutablefilesforthecaptured applicationandstorethemonanetworkshare.Eachtimeyoudeployanewapplicationoranupdatetoan existingpackage,youcannotifyclientuserstorunthethinreg.exeutilitywithanappropriateoption. ITadministratorscancontroluseraccesstofilesharesbyorganizingnetworksharesbasedonfunctionand associatingpermissionswithnetworksharesbasedonthosefunctionalboundaries. ThedifferencesbetweenthenetworkshareoptionandtheVMwareViewoptionarethatthenetworkshare optionassumesamixofphysicalandvirtual(persistent)desktopsandinvolvesusersrunningthe thinreg.exeutilitydirectlyinsteadofrelyingonloginscripts.

Deploying ThinApp Using Executable Files


Youcanuseabasicdeploymentoptionwithexecutablefileswhendiskuseislimited. Youcancreateexecutablefilesforthecapturedapplications,copythemfromacentralrepository,andrunthe thinreg.exeutilitymanuallytoregisterfiletypeassociations,desktopshortcuts,andtheapplication packageonthesystem.

Establishing File Type Associations with the thinreg.exe Utility


IfyoucreateexecutablefilesinsteadofMSIfilesduringthecaptureprocess,youmustrunthethinreg.exe utilitytoopenfiles,suchasa.docdocumentoran.htmlpage.Forexample,ifyouclickaURLinanemail message,ThinAppmustbesettostartFirefox.Youdonothavetorunthethinreg.exeutilityforMSIfiles becauseMSIfilesstarttheutilityduringtheapplicationinstallation. Thethinreg.exeutilitycreatestheStartmenuanddesktopshortcuts,setsupfiletypeassociations,adds deinstallationinformationtothesystemcontrolpanel,andunregisterspreviouslyregisteredpackages.The utilityenablesyoutoseethecontrolpanelextensionsforapplications,suchasQuicktimeorthemailcontrol panelappletforMicrosoftOutlook2007.Whenyourightclickafile,suchasa.docfile,thethinreg.exe utilityenablesyoutoseethesamemenuoptionsfora.docfileinanativeenvironment. Usethenodesktoprefreshcommandinthethinreg.exeutilitytopreventmultipledesktoprefreshactions occurringonthelocalmachineduringfileassociationoperations. IfanapplicationrunsSMTPorHTTPprotocols,suchasanemaillinkonaWebpagethatneedstoopen MicrosoftOutlook2007,thethinreg.exeutilitystartsavailablevirtualapplicationsthatcanhandlethose protocols.Ifvirtualapplicationsarenotavailable,thethinreg.exeutilitystartsnativeapplicationsthatcan handlethoseprotocols. ThedefaultlocationoftheutilityisC:\Program Files\VMware\VMware ThinApp.

Application Sync Effect on the thinreg.exe Utility


TheApplicationSyncutilityaffectsthethinreg.exeutilityduringtheupdateprocess. Ifyouadd,modify,orremoveexecutablefiles,thethinreg.exeutilityreregistersthefiletypeassociations, shortcuts,andicons. Ifyouinstallprotocols,MIMEtypes,controlpanelapplets,andtemplatesotherthanexecutablefiles,the thinreg.exeutilityreregisterstheseelements.

40

VMware, Inc.

Chapter 3 Deploying Applications

Run the thinreg.exe Utility


Thisexampleofrunningthethinreg.exeutilityprovidessomesamplecommands. Thepackagenameinthethinreg.execommandscanappearinthefollowingways:

C:\<absolute_path_to_.exe> Relativepathto.exefile \\<server>\<share>\<path_to_.exe> Asavariation,youcanuseawildcardspecification,suchas*.exe. Ifthepathorfilenamecontainsspaces,enclosethepathindoublequotationmarks.Thefollowing commandshowstheuseofdoublequotationmarks.


thinreg.exe "\\DEPLOYSERVER\ThinApps\Microsoft Office Word 2007.exe"

Forinformationaboutthinreg.exeparameters,seeOptionalthinreg.exeParametersonpage 41. Run the thinreg.exe utility 1 2 DeterminetheexecutablefilesthatThinAppmustregisterwiththelocalenvironment. Fromthecommandline,typethethinreg.execommand.


thinreg.exe [<optional_parameters>] [<package1.exe>][<package2.exe>][<packages_by_wildcard>]

IftheservernameisDEPLOYSERVERandtheshareisThinApps,usethefollowingexampletoregister MicrosoftWordfortheloggedinuser.
ThinReg.exe "\\DEPLOYSERVER\ThinApps\Microsoft Office 2007 Word.exe"

UsethefollowingexampletoregisterallMicrosoftOfficeapplicationsinthespecifieddirectoryforthe loggedinuser.
ThinReg.exe "\\DEPLOYSERVER\ThinApps\Microsoft Office *.exe"

Optional thinreg.exe Parameters


Thethinreg.exeutilitymonitorsthePermittedGroupssettinginthePackage.inifile,registeringand unregisteringpackagesasneeded.Whenthethinreg.exeutilityregistersapackageforthecurrentuser,the utilitycreatesonlytheshortcutsandfiletypeassociationsthatthecurrentuserisauthorizedforinthe PermittedGroupssetting.Ifthissettingdoesnotexist,thecurrentuserisauthorizedforallexecutablefiles. Whenthethinreg.exeutilityregistersapackageforalluserswiththe/allusersparameter,ThinApp createsallshortcutsandfiletypeassociationsregardlessofthePermittedGroupssetting.Whenyou doubleclickashortcuticonthatyouarenotauthorizedfor,youcannotruntheapplication. Ifthepackagenameyouwanttoregisterorunregistercontainsspaces,youmustencloseitindoublequotation marks. ForinformationaboutthePermittedGroupssettingandsupportforActiveDirectorygroups,see PermittedGroupsonpage 73. Thethinreg.exeutilityalsomonitorsthePermittedComputerssettinginthePackage.inifile.Whenthe settinghasavalue,thepackagecanonlyberegisteredonacomputerwithinthespecified PermittedComputersgroup.Ifthissettingisempty,thepackagecanberegisteredonanycomputer,subjectto thePermittedGroupssetting. Table 31listsoptionalparametersforthethinreg.exeutility.Anycommandthatusesthe/aparameter requiresadministratorrights.

VMware, Inc.

41

ThinApp Users Guide

Table 3-1. Optional thinreg.exe Parameters


Parameter /a,/allusers Purpose Registersapackageforallusers. Ifanunauthorizeduserattemptstorun theapplication,amessageinformsthe userthatheorshecannotrunthe application. /q,/quiet Preventsthedisplayofanerrormessage foranunrecognizedcommandline parameter. Unregistersapackage. Thiscommandremovesthesoftwarefrom theAdd/RemoveProgramscontrolpanel applet. Sample Usage thinreg.exe /a "\\<server>\<share>\Microsoft Office 2007 Word.exe"

thinreg.exe /q <unknown_option>

/u,/unregister, /uninstall

UnregisterMicrosoftWordforthecurrentuser. thinreg.exe /u "\\<server>\<share>\Microsoft Office 2007 Word.exe" UnregisterallMicrosoftOfficeapplicationsfor thecurrentuserandremovetheAdd/Remove Programsentry. thinreg.exe /u "\\server\share\Microsoft Office *.exe" Ifauserregistersthepackagewiththe/a parameter,youmustusethe/aparameterwhen unregisteringthepackage. thinreg.exe /u /a *.exe

/r,/reregister

Reregistersapackage. Undertypicalcircumstances,the thinreg.exeutilitycandetectwhethera packageisalreadyregisteredandskipsit. The/roptionforcesthethinreg.exe utilitytoreregisterthepackage. Preventstheremovalofregistration informationevenifyouarenolonger authorizedtoaccessanapplication package. Withoutthisoption,thethinreg.exe utilityremovestheregistration informationforthatpackageifitdetects youarenolongerauthorizedtoaccessthe package. ThinAppstoresauthorizationinformation inthePermittedGroupsparameterofthe Package.inifile.

thinreg.exe /r "\\<server>\<share>\Microsoft Office 2007 Word.exe" Ifauserregistersthepackagewiththe/a parameter,youmustusethe/awhen reregisteringthepackage. thinreg.exe /r /a *.exe

/k, /keepunauthorized, /keep

thinreg.exe /k "\\<server>\<share>\Microsoft Office 2007 Word.exe"

/noarp

Preventsthecreationofanentryinthe Add/RemoveProgramscontrolpanel applet. Startsthethinreg.exeutilityon MicrosoftVistawithoutelevated privileges.Standarduserscanstartthe utilitywithoutauseraccountcontrol (UAC)popupwindow. Whenthethinreg.exeutilitydetectsa needformoreprivileges,suchasthe privilegesrequiredforthe/allusers parameter,theutilityrestartsitselfasa privilegedprocessandgeneratesaUAC popupwindow.The/norelaunch optionblocksthisrestartprocessand causestheregistrationtofail.

thinreg.exe /q /noarp "\\<server>\<share>\Microsoft Office 2007 Word.exe" thinreg.exe /q /norelaunch "\\<server>\<share>\Microsoft Office 2007 Word.exe"

/norelaunch

42

VMware, Inc.

Chapter 3 Deploying Applications

Building an MSI Database


IfyoudonotcreateMSIfilesduringthecaptureprocess,youcanstillcreatethesefilesafterbuildingan application.AnMSIdatabaseisusefulfordeliveringcapturedapplicationsthroughtraditionaldesktop managementsystemstoremotelocationsandautomaticallycreatingshortcutsandfiletypeassociations. Basic ActiveDirectorygrouppoliciesprovidewaystodistributeandstartMSIpackages. ThinAppcreatesanMSIdatabasethatcontainscapturedexecutablefiles,installerlogic,andthethinreg.exe utility.

Customizing MSI Files with Package.ini Parameters


YoucancustomizethebehaviorofMSIfilesbymodifyingPackage.iniparametersandrebuildingthe applicationpackage. ThefollowingparameterscanaffectMSIconfiguration:

TheMSIInstallDirectoryparametersetstheinstallationdirectoryforthepackage. Forexample,includeMSIInstallDirectory=C:\Program Files\inthePackage.inifile.

TheMSIDefaultInstallAllUsersparametersetstheinstallationofthepackageforindividualusers. ThinAppinstallsthepackageinthe%AppData%userdirectory. Forexample,includeMSIDefaultInstallAllUsers=0inthePackage.inifile. Formoreinformationaboutthisparameter,seeSpecifyingaDatabaseInstallationforIndividualUsers andMachinesonpage 44.

TheMSIFileNameparameternamesthepackage. Forexample,includeMSIFilename=Firefox30.msiinthePackage.inifile.

TheMSIPropertyparametermakesitpossibletoaddextrarowstothe.msi Propertytable,foradding customizedMSIpropertyvalues. AddMSIProperty.Xxx=yyysettingstothePackage.inifile.Property = XxxandValue = Yyy.

TheMSIRequireElevatedPrivilegesparameterindicateswhetheraninstallerneedselevated privilegesfordeploymentonMicrosoftVista.Installationsforindividualusersdonotusuallyneed elevatedprivilegesbutpermachineinstallationsrequiresuchprivileges. Forexample,includeMSIRequireElevatedPrivileges=1inthePackage.inifile.

TheMSIProductCodeparametermakesiteasiertoinstallanewversionoftheapplication.AnMSI databasecontainsaproductcodeandanupgradecode.Whenyouupdateapackage,keeptheoriginal valueoftheMSIUpgradeCodeparameter. Iftheparametervalueofthenewversionisthesameasthevalueoftheoldversion,theinstallation promptsyoutoremovetheoldversion.Ifthevaluesfortheparameteraredifferent,theinstallation uninstallstheoldversionandinstallsthenewversion. VMwarerecommendsthatyouavoidspecifyinganMSIProductCodevalueandallowThinAppto generateadifferentproductcodeforeachbuild.

Regardlessoftheparametervaluesspecifiedatbuildtime,youcanoverridethesettingsatdeploymenttime. SeeForceMSIDeploymentsforEachUserorEachMachineonpage 44.FormoreinformationaboutMSI parameters,seeConfiguringMSIFilesonpage 96.

Modify the Package.ini File to Create MSI Files


FormoreinformationaboutMSIparameters,seeCustomizingMSIFileswithPackage.iniParameterson page 43andConfiguringMSIFilesonpage 96. BeforeyoucanmodifyMSIparameters,youmustaddanentryfortheMSIFilenameparametertogenerate MSIfiles.

VMware, Inc.

43

ThinApp Users Guide

Modify the MSI parameters 1 InthePackage.inifile,typetheMSIfilename.


MSIFilename=<filename>.msi

Forexample,thefilenameforFirefoxmightbeMozilla Firefox 2.0.0.3.msi. 2 3 (Optional)UpdateotherMSIparameters. Doubleclickthebuild.batfileinthecapturedapplicationfoldertorebuildtheapplicationpackage.

Specifying a Database Installation for Individual Users and Machines


YoucanmodifytheinstallationoftheMSIdatabaseforusersandmachines. ThinAppinstallstheMSIdatabaseacrossallmachines.Youcanchangethedefaultinstallationwiththe followingparametervalues:

Tocreateadatabaseinstallationforindividualusers,useavalueof0forthe MSIDefaultInstallAllUsersparameterinthePackage.inifile.Thisvaluecreatesmsiexec parametersforeachuser. Toallowadministratorstocreateadatabaseinstallationforallusersonamachine,ortoallowan individualuserwithoutadministratorrightstocreateaninstallationonlyforthatuser,useavalueof2 fortheMSIDefaultInstallAllUsersparameter.AdministratorsbelongtotheAdministratorsActive Directorygroup.

FormoreinformationabouttheMSIDefaultInstallAllUsersparameter,seeMSIDefaultInstallAllUsers onpage 96. Force MSI Deployments for Each User or Each Machine Regardlessoftheparametervaluesspecifiedatbuildtime,youcanoverrideMSIsettingsatdeploymenttime. Forexample,ifyoucreatedthedatabasewithavalueof1fortheMSIDefaultInstallAllUsersparameter, youcanstillforceindividualuserdeploymentsforFirefox3.0withthemsiexec /i Firefox30.msi ALLUSERS=""command. IfyouusetheALLUSERS=""argumentforthemsiexeccommand,ThinAppextractsthecapturedexecutable filestothe%AppData%userdirectory. Force MSI deployments for individual users or for all users on a machine

(Optional)Fromthecommandline,typethemsiexec /i <database>.msi ALLUSERS=""commandto forcedeploymentsforindividualusers. (Optional)Fromthecommandline,typethemsiexec /i <database>.msi ALLUSERS=1commandto forcedeploymentsforallusersonamachine.

Override the MSI Installation Directory YoucanusethemsiexeccommandtooverridethedefaultMSIinstallationdirectory. WhenThinAppperformsanindividualmachineMSIdeployment,thedefaultinstallationdirectoryisthe localizedequivalentof%ProgramFilesDir%\<inventory_name> (VMware ThinApp).IfyouinstallaFirefox packageforeachmachine,thepackageresidesin%ProgramFilesDir%\Mozilla Firefox (VMware ThinApp). WhenThinAppperformsanMSIdeploymentforindividualusers,thedefaultinstallationdirectoryis %AppData%\<inventory_name> (VMware ThinApp). Inbothcases,youcanoverridetheinstallationdirectorybypassinganINSTALLDIRpropertytothemsiexec command. Override the MSI installation directory Fromthecommandline,typethemsiexec /i <database>.msi INSTALLDIR=C:\<my_directory>\<my_package>command.

44

VMware, Inc.

Chapter 3 Deploying Applications

Deploying MSI Files on Microsoft Vista


WhenyoudeployMSIfilesonVista,youmustindicatewhetheraninstallerneedselevatedprivileges.Typical individualuserinstallationsdonotrequireelevatedprivilegesbutindividualmachineinstallationsrequire suchprivileges. ThinAppprovidestheMSIRequireElevatedPrivilegesparameterinthePackage.inifilethatspecifies theneedforelevatedprivilegeswhenthevalueissetto1.Specifyingavalueof1forthisparameterorforcing anindividualuserinstallationfromthecommandlinecangenerateUACprompts.Specifyingavalueof0for thisparameterpreventsUACpromptsbutthedeploymentfailsformachinewideinstallations.

Controlling Application Access with Active Directory


YoucancontrolaccesstoapplicationsusingActiveDirectorygroups. Whenyoubuildapackage,ThinAppconvertsActiveDirectorygroupnamesintoSecurityIdentifier(SID) values.ASIDisasmallbinaryvaluethatuniquelyidentifiesanobject.SIDvaluesarenotuniqueforafew groups,suchastheadministratorgroup.BecauseThinAppstoresSIDvaluesinpackagesforfuturevalidation, thefollowingconsiderationsapplytoActiveDirectoryuse:

YoumustbeconnectedtoyourActiveDirectorydomainduringthebuildprocessandthegroupsyou specifymustexist.ThinApplooksuptheSIDvalueduringthebuild. Ifyoudeleteagroupandrecreateit,theSIDmightchange.Inthiscase,rebuildthepackageto authenticateagainstthenewgroup. Whenusersareoffline,ThinAppcanauthenticatethemusingcachedcredentials.Iftheuserscanloginto theirmachines,authenticationstillworks.Useagrouppolicytosettheperiodwhencachedcredentials arevalid. CachedcredentialsmightnotrefreshonclientsuntilthenextActiveDirectoryrefreshcycle.Youcanforce agrouppolicyonaclientbyusingthegpupdatecommand.Thiscommandrefresheslocalgrouppolicy, grouppolicy,andsecuritysettingsstoredinActiveDirectory.YoumightlogoutbeforeActiveDirectory credentialsarerecached. Certaingroups,suchastheAdministratorsgroupandEveryonegroup,havethesameSIDonevery ActiveDirectorydomainandworkgroup.OthergroupsyoucreatehaveadomainspecificSID.Users cannotcreatetheirownlocalgroupwiththesamenametobypassauthentication. ActiveDirectoryDomainServicesdefinesecuritygroupsanddistributiongroups.Ifyouusenested groups,ThinAppcanonlysupportnestedsecuritygroups.

Package.ini Entries for Active Directory Access Control


ThinAppprovidesthePermittedGroupsparameterinthePackage.inifiletocontrolActiveDirectory access. Whenyoustartacapturedapplication,thePermittedGroupsparametercheckswhetherauserisamember ofaspecifiedActiveDirectorygroup.IftheuserisnotamemberoftheActiveDirectorygroup,Thinappdoes notstarttheapplication.ForinformationaboutrestrictingpackagestoActiveDirectorygroups,see PermittedGroupsonpage 73. InthefollowingPackage.inientry,App1andApp2inheritPermittedGroupsvalues.
[BuildOptions] PermittedGroups=Administrators;OfficeUsers [App1.exe] ... .. [App2.exe] ... ...

VMware, Inc.

45

ThinApp Users Guide

Inthefollowingentry,onlyusersbelongingtotheApp1usersgroupcanusetheApp1.exefile,andmembers oftheEveryonegroupcanusetheApp2.exefile.The defaultmessagefordenieduserschangesforApp1.


[BuildOptions] PermittedGroups=Everyone [App1.exe] PermittedGroups=App1Users AccessDeniedMsg=Sorry, you cant run this application .. [App2.exe] ... ...

Starting and Stopping Virtual Services


WhenyoucaptureanddeployapackagethatcontainsaWindowsservice,suchastheSQLServerservice,any usercanrunthepackageandstartandstoptheservice.Unlikenativeapplications,virtualapplicationsdonot requireadministratorrightsfortheseoperations.

Automatic Startup for Virtual Services


Youcaninstallavirtualserviceasaphysicalservice,sothatitstartswhenthephysicalmachineisstarted.The virtualserviceremainsinitsThinAppprojectpackage,butisregisteredonthephysicalmachineand controlledusingthenativelyinstalledservicemanagementtools. Afteryoupackageyourservice,forexampleApacheServer,youregisteritonthephysicalmachine,usingthe ThinReg.exeapplication.Theserviceiscreatedasanativeservice,usinginformationfromthevirtual registry.Theserviceisavailabletoallusersusingthevirtualapplication.Theserviceisnotuserspecific. Theprocessiscomposedofthefollowingtasks:

CapturingtheservicebyusingThinApp RegisteringtheserviceonthephysicalmachinebyusingThinReg

Create a virtual service for automatic startup 1 2 Onacleanlocalmachine,useThinApptocapturetheservice. Afterthepostscanprocessiscomplete,intheSetupCaptureReadytoBuilddialog,click EditPackage.ini. ThePackage.inifileopensinatexteditor. 3 Searchfortheservicesentry. Theentryisfollowedbythenameoftheservicethatyoucaptured. Bydefault,theentryiscommentedout. 4 5 6 Removethesemicolon(;)fromthestartoftheline. SavethePackage.inifile. BuildtheThinAppproject.

Youcannowregisteryourvirtualservicesothatitcanbemanagedbyusingthenativeservicesmanagement tools. Register the virtual service on a physical machine 1 2 RuntheThinReg.exeapplication. Atthecommandline,typeC:\Program Files\VMware\VMware ThinApp\ThinReg /a *.exe. Youmustuse/a toregisterservices.IfyourunThinAppwithoutthisoption,theserviceisnotregistered. Youcanchangethepath,ifrequiredforyoursystem.

46

VMware, Inc.

Chapter 3 Deploying Applications

FromtheStartmenu,selectPrograms>AdministrativeTools>Services. Yourvirtualserviceapplicationappearsinthelistofservices. Youcanmanagetheserviceinthesamewayasanynativelyinstalledservice.

Using ThinApp Packages Streamed from the Network


Anynetworkstoragedevicecanserveasastreamingserverforhundredsorthousandsofclientcomputers. SeeFigure 31. Figure 3-1. Data Block Streaming over a Network Share

Jills Sandbox

shared folder

Sams Sandbox

Joes Sandbox

Ontheenduserdesktop,youcancreateshortcutsthatpointtothecentrallyhostedexecutablefilepackages. Whentheuserclickstheshortcut,theapplicationbeginsstreamingtotheclientcomputer.Duringtheinitial streamingstartupprocess,theThinAppstatusbarinformstheuseroftheprogress.

How ThinApp Application Streaming Works


WhenyouplacecompressedThinAppexecutablefilesonanetworkshareorUSBflashdrive,thecontents fromtheexecutablefilestreamtoclientcomputersinablockbasedfashion.Asanapplicationrequestsspecific partsofdatafiles,ThinAppreadsthisinformationinthecompressedformatoverthenetworkusingstandard Windowsfilesharingprotocol.Foraviewoftheprocess,seeFigure 32. Afteraclientcomputerreceivesdata,ThinAppdecompressesthedatadirectlytomemory.BecauseThinAppdoes notwritedatatothedisk,theprocessisfast.Alargepackagedoesnotnecessarilytakealongtimetoloadover thenetworkandthepackagesizedoesnotaffectthestartuptimeofanapplication.Ifyouaddanextra20GB filetoapackagethatisnotinuseatruntime,thepackageloadsatthesamespeed.Iftheapplicationopensand reads32KBofdatafromthe20GBfile,ThinApponlyrequests32KBofdata. TheThinAppruntimeclientisasmallpartoftheexecutablefilepackage.WhenThinApploadstheruntime client,itsetsuptheenvironmentandstartsthetargetexecutablefile.Thetargetexecutablefileaccessesother partsoftheapplicationstoredinthevirtualoperatingsystem.Theruntimeclientinterceptssuchrequestsand servesthembyloadingDLLsfromthevirtualoperatingsystem. Theloadtimeoftheruntimeclientacrossanetworkisafewmilliseconds.AfterThinApploadstheruntime clienttomemoryontheclientcomputer,theendusercomputercalculateswhichblocksofdataarerequired fromtheserverandreadsthembasedonapplicationactivity. Whentheapplicationmakessubsequentreadrequestsforthesamedata,theWindowsdiskcacheprovides datawithoutrequiringanetworkreadoperation.Iftheclientcomputerrunslowonmemory,Windows discardssomeofitsdiskcacheandprovidesthememoryresourcetootherapplications.

VMware, Inc.

47

ThinApp Users Guide

Figure 3-2. Application Streaming


packaged executable

VMware ThinApp VOS

local PC 128KB read request

virtual registry compressed file 64KB (Block 1) decompressed (Block 1) Ethernet

64KB (Block 2)

decompressed (Block 2)

64KB (Block 3)

64KB (Block 4)

64KB (Block 5)

Requirements and Recommendations for Streaming Packages


ThinAppdoesnotrequirespecificserversoftwaretoprovidestreamingcapability.AnyWindowsfileshare, NASdevice,orSMBsharecanprovidethiscapability.Theamountofdatathatneedstotransferbeforethe applicationcanbeginrunningvariesforeachapplication.MicrosoftOfficerequiresthatonlyafractionofthe packagecontentsstreambeforeanapplicationcanrun. VMwarerecommendsthatyouuseThinAppstreaminginaLANbasedenvironmentwithaminimumof 100MBnetworks.ForWANandInternetdeploymentsthatinvolvefrequentorunexpecteddisconnections, VMwarerecommendsoneofthefollowingsolutions:

UseaURLtodeploytheapplications. Useadesktopdeploymentsolutiontopushthepackagetothebackground.Allowtheapplicationtorun onlyaftertheentirepackagedownloads.

Thesesolutionsreducefailuresandeliminatesituationsinwhichtheapplicationrequiresunstreamed portionsduringanetworkoutage.Acompanywithmanybranchofficestypicallydesignatesoneapplication repositorythatmirrorsacentralsharedfolderateachbranchoffice.Thissetupoptimizeslocalperformance forclientmachineslocatedateachbranchoffice.

Security Recommendations for Streaming Packages


VMwarerecommendsthatyoumakeacentralshareddirectoryforthepackagereadonly.Userscanreadthe packagecontentsbutnotchangetheexecutablefilecontents.Whenapackagestreamsfromasharedlocation, ThinAppstoresapplicationchangesintheusersandbox.Thedefaultsandboxlocationis %AppData%\Thinstall\<application_name>.Youcanconfigurethesandboxlocationatruntimeorat packagetime. Acommonconfigurationistoplacetheusersandboxonanothercentralstoragedevice.Theusercanuseany computerandkeepindividualapplicationsettingsatacentralshare.Whenpackagesstreamfromacentral share,theyremainlockeduntilallusersexittheapplication.

48

VMware, Inc.

Chapter 3 Deploying Applications

Stream ThinApp Packages from the Network


Userscanaccesspackagedapplicationsthroughthenetwork. Stream packages from the network 1 2 PlacetheThinApppackageinalocationaccessibletoclientcomputers. Sendalinktouserstoruntheapplicationdirectly.

Using Captured Applications with Other System Components


Capturedapplicationscaninteractwithothercomponentsinstalledonthedesktop.

Performing Paste Operations


ReviewthefollowingpasteoperationsandlimitationswithThinApp:

PastingcontentfromsysteminstalledapplicationstocapturedapplicationsThispasteoperationis unlimited.Thevirtualapplicationcanreceiveanystandardclipboardformats,suchastext,graphics,and HTML.ThevirtualapplicationcanreceiveOLEobjects. PastingfromcapturedapplicationstosystemapplicationsThinAppconvertsOLEobjectscreatedin virtualapplicationstosystemnativeobjectswhenyoupastethemintonativeapplications.

Accessing Printers
Acapturedapplicationhasaccesstoanyprinterinstalledonthecomputerthatitisrunningon.Captured applicationsandapplicationsinstalledonthephysicalsystemhavethesameprintingability. YoucannotuseThinApptovirtualizeprinterdrivers.Youmustmanuallyinstallprinterdriversonacomputer.

Accessing Drivers
Acapturedapplicationhasfullaccesstoanydevicedriverinstalledonthecomputerthatitisrunningon. Capturedapplicationsandapplicationsinstalledonthephysicalsystemhavethesamerelationshipwith devicedrivers.Ifanapplicationrequiresadevicedriver,youmustinstallthedriverseparatelyfromthe ThinApppackage. Sometimes,anapplicationwithoutanassociateddrivermightfunctionwithsomelimitations.Forexample, AdobeAcrobatinstallsaprinterdriverthatenablesapplicationssystemwidetorenderPDFfilesusingaprint mechanism.WhenyouuseacapturedversionofAdobeAcrobat,youcanuseittoload,edit,andsavePDF fileswithouttheprinterdriverinstallation.Otherapplicationsdonotdetectanewprinterdriverunlessthe driverisinstalled.

Accessing the Local Disk, the Removable Disk, and Network Shares
Whenyoucreateaprojectstructure,ThinAppconfiguresisolationmodesfordirectoriesandregistrysubtrees. Theisolationmodescontrolwhichdirectoriestheapplicationcanreadandwritetoonthelocalcomputer. ReviewthedefaultconfigurationoptionsdescribedinTable 32. Table 3-2. Default Configuration Options
Component Harddisk Description AnexampleofaharddiskisC:\.Isolationmodesselectedduringthe captureprocessaffectaccess.UserscanwritetotheirDesktopandMy Documentsfolders.Othermodificationsthattheapplicationmakesgo intotheusersandbox.Thedefaultlocationofthesandboxisinthe ApplicationDatadirectory. Bydefault,anyuserwhohasaccessrightscanreadorwritetoany locationonaremovabledisk.

Removabledisk

VMware, Inc.

49

ThinApp Users Guide

Table 3-2. Default Configuration Options (Continued)


Component Networkmappeddrives UNCnetworkpaths Description Bydefault,anyuserwhohasaccessrightscanreadorwritetoany locationonanetworkmappeddisk. Bydefault,anyuserwhohasaccessrightscanreadorwritetoany locationonaUNCnetworkpath.

Accessing the System Registry


Bydefault,capturedapplicationscanreadthefullsystemregistryaspermittedbyaccesspermissions.Specific partsoftheregistryareisolatedfromthesystemduringthepackagecreationprocess.Thisisolationreduces conflictsbetweendifferentversionsofvirtualapplicationsandsysteminstalledapplications.Bydefault, ThinAppsavesallregistrymodificationsfromcapturedapplicationsinanisolatedsandboxandthesystem remainsunchanged.

Accessing Networking and Sockets


Capturedapplicationshavestandardaccesstonetworkingfeatures.Capturedapplicationscanbindtolocal portsandmakeremoteconnectionsiftheuserhasaccesspermissionstoperformtheseoperations.

Using Shared Memory and Named Pipes


Capturedapplicationscaninteractwithotherapplicationsonthesystembyusingsharedmemory,named pipes,mutexobjects,andsemaphores. ThinAppcanisolatesharedmemoryobjectsandsynchronizationobjects.Thisisolationmakestheminvisible tootherapplications,andotherapplicationobjectsareinvisibletoacapturedapplication.

Using COM, DCOM, and Out-of-Process COM Components


CapturedapplicationscancreateCOMcontrolsfromthevirtualenvironmentandthesystem.IfaCOM controlisinstalledasanoutofprocessCOM,thecontrolrunsasavirtualprocesswhenacapturedapplication usesit.Youcancontrolmodificationsthatthecapturedapplicationsmake.

Starting Services
Capturedapplicationscanstartandrunsysteminstalledservicesandvirtualservices.Systemservicesrunin thevirtualenvironmentthatcontrolsthemodificationsthattheservicescanmake.

Using File Type Associations


Capturedapplicationscanrunsysteminstalledapplicationsbyusingfiletypeassociations.Youcanaddfile typeassociationstothelocalcomputerregistrytopointtocapturedexecutablefilesforindividualusersand machines.

50

VMware, Inc.

Chapter 3 Deploying Applications

Sample Isolation Mode Configuration Depending on Deployment Context


Isolationmodescontrolthereadandwriteaccessforspecificsystemdirectoriesandsystemregistrysubkeys. YoucanadjustisolationmodestoresolvetheproblemsinTable 33. Table 3-3. Sample Problems and Solutions That Use Isolation Modes
Problem Anapplicationfailstorunbecause previousorfutureversionsexist simultaneouslyorfailtouninstall properly. Solution UsetheFullisolationmode. ThinApphideshostcomputerfilesandregistrykeysfromtheapplication whenthehostcomputerfilesarelocatedinthesamedirectoriesand subkeysthattheapplicationinstallercreates. FordirectoriesandsubkeysthathaveFullisolation,theapplicationsonly detectvirtualfilesandsubkeys.Anysystemvaluesthatexistinthesame locationareinvisibletotheapplication. Anapplicationfailsbecauseusersdidnot designortestitforamultiuser environment.Theapplicationfailsto modifyfilesandkeyswithoutaffecting otherusers. UsetheWriteCopyisolationmode. ThinAppmakescopiesofregistrykeysandfilesthattheapplicationwrites andperformsallthemodificationsinauserspecificsandbox. FordirectoriesandsubkeysthathaveWriteCopyisolation,theapplication recognizesthehostcomputerfilesandvirtualfiles.Allwriteoperations converthostcomputerfilesintovirtualfilesinthesandbox. UsetheWriteCopyisolationmode. ThinAppmakescopiesofregistrykeysandfilesthattheapplicationwrites andperformsallthemodificationsinauserspecificsandbox. FordirectoriesandsubkeysthathaveWriteCopyisolation,theapplication recognizesthehostcomputerfilesandvirtualfiles.Allwriteoperations converthostcomputerfilesintovirtualfilesinthesandbox.

Anapplicationfailsbecauseithaswrite permissiontogloballocationsandisnot designedforalockeddowndesktop environmentfoundinacorporatesetting oronWindowsVista.

View of Isolation Mode Effect on the Windows Registry


Figure 33showsasectionoftheWindowsregistryforacomputerthathasolderMicrosoftOfficeapplications installed.MicrosoftOffice2003createstheHKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0 registrysubtree. Figure 3-3. Windows Registry as Seen by Windows Regedit

ODBC Office 10.0 11.0 8.0 9.0 Common Delivery Live Meeting Outlook PowerPoint Visio
WhenThinApprunsacapturedversionofMicrosoftVisio2007,ThinAppsetsthe HKLM\Software\Microsoft\Officeregistrysubtreetofullisolation.Thissettingprevents Microsoft Visio 2007fromfailingbecauseofregistrysettingsthatmightpreexistonthehostcomputeratthe samelocation.

VMware, Inc.

51

ThinApp Users Guide

Figure 34showstheregistryfromtheperspectiveofthecapturedMicrosoftVisio2007. 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

52

VMware, Inc.

Updating and Linking Applications

Youcanupdatevirtualapplicationswithdifferentutilitiesdependingontheextentofchangeand dependenciesonotherapplications. Thisinformationincludesthefollowingtopics:


ApplicationUpdatesThattheEndUserTriggersonpage 53 ApplicationUpdatesThattheAdministratorTriggersonpage 60 AutomaticApplicationUpdatesonpage 62 SidebySideUpgradingofRunningApplicationsonaNetworkShareonpage 63 SandboxConsiderationsforUpgradedApplicationsonpage 64 UpdatingtheThinAppVersionofPackagesonpage 64

Application Updates That the End User Triggers


ThinAppprovidestheApplicationSyncandApplicationLinkutilitiestoupdateapplicationswithnew versionsornewcomponents.TheApplicationSyncutilityupdatesanentireapplicationpackage. The ApplicationLinkutilitykeepssharedcomponentsordependentapplicationsinseparatepackages.

Application Sync Updates


TheApplicationSyncutilitykeepsdeployedvirtualapplicationsuptodate.Whenanapplicationstartswith thisutilityenabled,theapplicationqueriesaWebservertodetermineifanupdatedversionoftheexecutable fileisavailable.Ifanupdateisavailable,thedifferencesbetweentheexistingpackageandthenewpackage aredownloadedandusedtoconstructanupdatedversionofthepackage.Theupdatedpackageisusedfor futurelaunches. TheApplicationSyncutilityisusefulformajorconfigurationupdatestotheapplication.Forexample,you mightupdateFirefoxtothenextmajorversion.Remoteusersoruserswhoarenotconnectedtothecorporate networkcanmakeuseoftheApplicationSyncutilitybyembeddingupdatesettingswithinthepackageand usinganyWebservertostoretheupdatedversionofthepackage.

Using Application Sync in a Managed or Unmanaged Environment


Ifyouusevirtualapplicationsthatupdateautomaticallyinamanagedcomputerenvironment,donotusethe ApplicationSyncutilitybecauseitmightclashwithotherupdatecapabilities. Ifanautomaticupdatefeatureupdatesanapplication,theupdateexistsinthesandbox.IftheApplicationSync utilityattemptstoupdatetheapplicationafteranautomaticapplicationupdate,theversionupdatestoredin thesandboxtakeprecedenceoverthefilescontainedintheApplicationSyncversion.Theorderofprecedence forupdatingfilesisthefilesinthesandbox,thevirtualoperatingsystem,andthephysicalmachine. Ifyouhaveanunmanagedenvironmentthatdoesnotupdateapplicationsautomatically,usetheApplication Syncutilitytoupdateapplications.
VMware, Inc. 53

ThinApp Users Guide

Update Firefox 2.0.0.3 to Firefox 3 with Application Sync


ThisexampleshowstheApplicationSyncupdateprocessforFirefox. TheupdateprocessinvolvesmodifyingthePackage.inifile.The AppSyncURLparameterrequiresaURL path.ThinAppsupportsHTTP,HTTPS,andfileprotocols.ForinformationaboutallApplicationSync parameters,seeConfiguringApplicationUpdateswithApplicationSynconpage 93. Update Firefox 2.0.0.3 to Firefox 3 1 2 CaptureFirefox2.0.0.3andFirefox3intoseparatepackages. Verifythattheprimarydatacontainernameisthesameforbothpackages. Theprimarydatacontainer,determinedduringthesetupcaptureprocess,isthefilethatcontainsthevirtual filesystemandvirtualregistry.IfyouhaveaFirefox2.0.0.3packagethathasMozilla Firefox 2.0.0.3.exe asthenameoftheprimarydatacontainer,andyouhaveaFirefox3packagethathasMozilla Firefox 3.dat asthenameoftheprimarydatacontainer,changetheprimarydatacontainernameinthePackage.ini fileforbothpackagestoacommonname,forexampleMozilla Firefox.dat. Ifyouchangetheprimarydatacontainername,adjustanyentrypointsintheShortcutparameterthat refertothechangedname. 3 ModifythePackage.inifilefortheolderapplicationpackagetoenableandconfiguretheAppSyncutility. a OpenthePackage.inifilelocatedinthecapturedapplicationfolder. Forexample,aFirefox2.0.0.3pathtothePackage.inifilemightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\Package.ini. b UncommenttheApplicationSyncparametersyouwanttoeditbyremovingthesemicolonatthe beginningoftheline. YoumustuncommenttheAppSyncURLparametertoenabletheutility. c Changethevalueoftheparametersandsavethefile. Forexample,youcancopyanexecutablefileofthelatestFirefoxversiontoamappednetworkdrive andtypeapathtothatlocationasthevalueoftheAppSyncURLparameter.IfZ:isthemappeddrive andFirefoxisthenameofthedirectorythatstorestheexecutablefile,asamplepathis file:///Z:/Firefox/Firefox.exe. 4 Inthecapturedapplicationfolder,doubleclickthebuild.batfiletorebuildtheapplicationpackage. Forexample,aFirefox2.0.0.3pathtothebuild.batfilemightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\build.bat. 5 ToupdateFirefox2.0.0.3toFirefox3,starttheexecutablefile,suchasMozilla Firefox 2.0.0.3.exe, inthe\bindirectory. WhenyoustarttheapplicationbeforetheexpirationtimesetintheAppSyncExpirePeriodparameterof thePackage.inifile,ThinAppdownloadstheupdateinthebackgroundasyouworkwiththe application.Thenexttimeyoustarttheapplication,youcanseetheupdatedversion. Whenyoustarttheapplicationafterthepackageexpires,ThinAppdownloadstheupdateinthe foregroundandpreventsyoufromworkingwiththeapplication.Whenthedownloadisready,ThinApp restartstheapplicationwiththenewversion.

Fix an Incorrect Update with Application Sync


IfyouhavemultipleApplicationSyncdownloadupdates,suchasmultipleMicrosoftOfficeupdates,anda certainupdatehasanadverseaffectorneedstobewithdrawn,youcanaddresstheproblem. Fix an incorrect update PlacethecorrectupdateontheserverthatThinAppcanaccess. Theupdateisappliedthenexttimetheapplicationisstartedonaclientmachine.

54

VMware, Inc.

Chapter 4 Updating and Linking Applications

Application Sync Effect on Entry Point Executable Files


TheApplicationSyncutilityupdatesentrypointexecutablefiles.Forexample,assumeyoudeploya Microsoft Office2007packagethatdoesnotincludeMicrosoftPowerPoint.TheMicrosoft Office PowerPoint 2007.exeentrypointdoesnotexistfortheoriginalpackage.Ifyourebuildthe Microsoft Office 2007packagetoincludeMicrosoftPowerPoint,andyouusetheApplicationSyncutilityto updateclientmachines,theenduserscanaccessanentrypointexecutablefileforMicrosoftPowerPoint.

Updating thinreg.exe Registrations with Application Sync


Ifyouregistervirtualapplicationsonthesystemusingthinreg.exeandupdateapplicationswiththe ApplicationSyncutility,youcanupdateregistrationsbyplacingacopyofthinreg.exe,locatedin C:\Program Files\VMware\VMware ThinApp,alongsidetheupdatedpackageontheserver.

Maintaining the Primary Data Container Name with Application Sync


TheApplicationSyncutilityrequiresthatthenameoftheprimarydatacontainer,thefilethatstoresvirtual filesandregistryinformation,isthesamefortheoldandnewversionsofanapplication.Forexample,you cannothaveanoldversionwithMicrosoft Office Excel 2003.exeastheprimarydatacontainername whilethenewversionhasMicrosoft Office 2007.datastheprimarydatacontainername.Toverifythe nameoftheprimarydatacontainer,seetheReadOnlyDataparameterinthePackage.inifile.Formore informationabouttheprimarydatacontainer,seeDefiningEntryPointsasShortcutsintotheVirtual Environmentonpage 17.

Completing the Application Sync Process When Applications Create Child Processes
Whenacapturedapplicationcreateschildprocesses,ThinAppcannotcompletetheApplicationSyncprocess. Forexample,youmightcreateMicrosoftOffice2003andMicrosoftOffice2007packages,modifythe AppSyncURLparameterinthePackage.inifileforbothpackages,andcopytheMicrosoftOffice2007package toaWebserverandtheMicrosoftOffice2003packagetoaclientmachine. IfyoustarttheMicrosoftOffice2003packagebeforetheexpirationtimesetintheAppSyncExpirePeriod parameterofthePackage.inifile,ThinAppcandownloadtheupdateinthebackgroundasyouworkwith theapplicationbutunabletoshowtheupdatedversionthenexttimeyoustarttheapplication.Ifyoustartthe applicationafterthepackageexpires,ThinAppisunabletodownloadtheupdateintheforegroundandrestart theapplicationwhenthedownloadisready. MicrosoftOffice2003andMicrosoftOffice2007areexamplesofapplicationsthatcreatechildprocesses. ThinAppcannotcompleteApplicationSyncupdatesuntilallchildprocessesstop.Youcanperformoneofthe followingtaskstoresolvetheissue:

Logoutandlogintothemachinetostopthechildprocesses. Createascripttoendthechildprocesses. Forexample,youcancreateascripttoendthectfmon.exeandmdm.exechildprocessesassociatedwith MicrosoftOffice2003andMicrosoftOffice2007.

Preventthestartupofthechildprocess,suchasthectfmon.exeprocessassociatedwithMicrosoftOffice andInternetExplorerapplications.

Prevent the Startup of the ctfmon.exe Process for Microsoft Office and Internet Explorer Preventingthestartupofthectfmon.exeprocessrequiresknowledgeoftheThinAppsandboxand sbmerge.exeutility.Forinformationaboutthesbmerge.exeutility,seeUpdatingApplicationswith RuntimeChangesonpage 61.

VMware, Inc.

55

ThinApp Users Guide

Prevent the startup of the ctfmon.exe process 1 Ifyoudidnotactivatethecmd.exeentrypointduringthecaptureprocess,settheDisabledparameter forthecmd.exeentryinthePackage.inifileto0andrebuildthepackagewiththebuild.batutility. Thisgeneratesanexecutablefileforthecmd.exeentrypointinthe/bindirectory. 2 3 4 5 6 7 8 Copythe/bindirectoryinthecapturedapplicationdirectorytoacleanvirtualmachineordeletethe sandboxfortheMicrosoftOfficepackage. Doubleclickthecmd.exeentrypoint. IntheWindowscommandprocessor,runtheINTL.CPLcommand. IntheLanguagestaboftheRegionalandLanguagesdialogbox,clickDetails. IntheAdvancedtaboftheTextServicesandInputLanguagesdialogbox,selecttheTurnoffadvanced textservicescheckbox. ClickOKinalltheopendialogboxesandleavetheWindowscommandprocessoropen. UnregistertheMSIMTF.dllandMSCTF.dllfileswiththeREGSVR32.EXE/U <DLL_file>command. Seeknowledgebasearticle282599intheMicrosoftWebsite. 9 10 ClosetheWindowscommandprocessor. IfthevirtualmachinedoesnotresideonthesamemachinewhereThinAppisinstalled,copythesandbox fromthepackagetothepackagingsystem. Thedefaultsandboxlocationis%APPDATA%\Thinstall. 11 Fromthestandardcommandpromptonthepackagingsystem,usethesbmerge.exeutilitytomergethe updatedsandboxwiththepackage. AsamplecommandisSBMERGE APPLY ProjectDir "C:\Program Files\VMware \VMware ThinApp\Captures\Microsoft Office Professional 2007" SandboxDir "%APPDATA%\Thinstall\Microsoft Office Pro 2007". 12 Rebuildthepackageandtestthepackageonacleanvirtualmachinetoconfirmthatthectfmon.exe processnolongerexists.

Application Link Updates


TheApplicationLinkutilityconnectsdependentapplicationsatruntime.Youcanpackage,deploy,andupdate componentpiecesseparatelyratherthancaptureallcomponentsinthesamepackage. ThinAppcanlinkupto250packagesatatime.Eachpackagecanbeanysize. TheApplicationLinkutilityisusefulforthefollowingobjects:

LargesharedlibrariesandframeworksLinkruntimecomponents,suchas.NET,JRE,orODBCdrivers, withdependentapplications. Forexample,youcanlink.NETtoanapplicationevenifthelocalmachinefortheapplicationprevents theinstallationof.NEToralreadyhasadifferentversionof.NET. Ifyouhavemultipleapplicationsthatrequire.NET,youcansavespaceandmakeasingle.NETpackage andpointthemultipleapplicationstothe.NETpackage.Whenyouupdate.NETwithasecurityfix,you canupdateasinglepackageratherthanmultiplepackages.

AddoncomponentsandpluginsPackageanddeployapplicationspecificcomponentsandplugins separatelyfromthebaseapplication. Forexample,youmightseparateAdobeFlashPlayerorAdobeReaderfromabaseFirefoxapplication andlinkthecomponents. YoucandeployasingleMicrosoftOfficepackagetoallusersanddeployindividualaddoncomponents foreachuser.

56

VMware, Inc.

Chapter 4 Updating and Linking Applications

IfyoucaptureMicrosoftOfficeandtrytoaccessaPDFattachmentinthevirtualMicrosoftOutlook environment,youcansetupMicrosoftOfficetodetectalinkedAdobeReaderpackageonthenetwork whenAdobeReaderisnotavailablewithintheimmediatevirtualorphysicalenvironment.

HotfixesandservicepacksLinkupdatestoanapplicationandrollbacktoapreviousversionifusers experiencesignificantissueswiththenewversion.Youcandeployminorpatchestoapplicationsasa singlefileandreducetheneedforrollbacks. TheApplicationLinkutilityprovidesbandwidthsavings.Forexample,ifyouhaveMicrosoftOffice2007 ServicePack1andyouwanttoupdatetoServicePack2withoutApplicationLink,youwouldtransfer 1.5GbofdatapercomputerwiththedeploymentofanewOffice 2007ServicePack2package.The ApplicationLinkutilitytransfersjusttheupdatesandnotthewholepackagetothecomputers.

View of the Application using Application Link


Figure 41showstherunningapplicationwithamergedviewofthesystem,thebaseapplication,andall linkedcomponents.Files,registrykeys,services,COMobjects,andenvironmentvariablesfromdependency packagesarevisibletothebaseapplication. Figure 4-1. View of the System, Base Application, and Linked Components Using Application Link
Local Disk (C:) Documents and Settings Program Files Common Files ComPlus Applications

System Files

Base Application

Local Disk (C:) Program Files Base Application

Component Package

Local Disk (C:) Program Files Component1 Application Link

merged view of System Files + Base Application + Component Package

Local Disk (C:) Documents and Settings Program Files Base Application Common Files ComPlus Applications Component1

Link a Base Application to the Microsoft .NET Framework


Reviewthissampleworkflowtolinkabaseapplication,MyApp.exe,toaseparatepackagethatcontainsthe Microsoft.NET2.0Framework.Makesurethatthebaseapplicationcaptureprocessdoesnotincludethe Microsoft.NET2.0Framework.For informationabouttheprocessofcapturinganapplication,seeChapter 2, CapturingApplications,onpage 15. ForinformationaboutrequiredandoptionalApplicationLinkparametersandformatsinthePackage.ini file,seeConfiguringDependentApplicationswithApplicationLinkonpage 91.

VMware, Inc.

57

ThinApp Users Guide

Link an application to Microsoft .NET 1 Capturetheinstallationofthe.NET2.0Framework. Duringthecaptureprocess,youmustselectatleastoneuseraccessibleentrypoint. 2 Renamethe.exefilethatThinAppproducestoa.datfile. Thisrenamingpreventsusersfromaccidentallyrunningtheapplication. Thenameofthe.datfileyouselectdoesnotmatterbecauseusersdonotrunthefiledirectly. For example,usedotnet.dat. 3 4 5 6 7 Savethe.NETprojecttoC:\Captures\dotnet. Capturethebaseapplicationbyusingthesamephysicalsystemorvirtualmachinewiththe.NET frameworkalreadyinstalled. SavetheprojecttoC:\Captures\MyApp. OpenthePackage.inifileinthecapturedapplicationfolderforthebaseapplication. EnabletheRequiredAppLinksparameterforthebaseapplicationbyaddingthefollowinglineafterthe [BuildOptions]entry.
RequiredAppLinks=dotnet.dat

ApplicationLinkparametersmustreferencetheprimarydatacontaineroftheapplicationyouwantto linkto.Youcannotreferenceshortcut.exefilesbecausethesefilesdonotcontainanyapplications,files, orregistrykeys. 8 Rebuildthe.NET2.0andbaseapplicationpackages. a b Doubleclickthebuild.batfileinC:\Captures\MyApp. Doubleclickthebuild.batfileinC:\Captures\dotnet.

RunningthesebatchfilesbuildsseparateThinApppackages. 9 DeploytheapplicationstoanenduserdesktopinC:\Program Files\MyApp. a b CopyC:\Captures\MyApp\bin\MyApp.exeto \\<end_user_desktop>\<Program_Files_share>\MyApp\MyApp.exe. CopyC:\Captures\dotnet\bin\dotnet.datto \\<end_user_desktop>\<Program_Files_share>\MyApp\dotnet.dat.

Set Up Nested Links with Application Link


ThinAppsupportsnestedlinkswiththeApplicationLinkutility.Forexample,ifMicrosoftOfficelinkstoa servicepack,andtheservicepacklinkstoahotfix,ThinAppsupportsallthesedependencies. ThisprocedurereferstoAppA,whichrequiresAppB;andAppB,whichrequiresAppC.Assumethefollowing folderlayoutfortheprocedure:

C:\AppFolder\AppA\AppA.exe C:\AppFolder\AppB\AppB.exe C:\AppFolder\AppC\AppC.exe

ForinformationaboutsettinguprequiredandoptionalApplicationLinkparametersinthisprocedure,see ConfiguringDependentApplicationswithApplicationLinkonpage 91. Set up nested links 1 2 CaptureApplicationA. InthePackage.inifile,specifyApplicationBasarequiredoroptionalapplicationlink. Forexample,addRequiredLinks=\AppFolder\AppB\AppB.exetothefile.

58

VMware, Inc.

Chapter 4 Updating and Linking Applications

3 4

CaptureApplicationB. InthePackage.inifileforApplicationB,specifyApplicationCasarequiredoroptionalapplicationlink. Forexample,addRequiredLinks=\AppFolder\AppC\AppC.exetothefile.

CaptureApplicationC. IfyoustartApplicationA,itcanaccessthefilesandregistrykeysofApplicationBandApplicationBcan accessthefilesandregistrykeysofApplicationC.

Affecting Isolation Modes with Application Link


ThinApploadsanApplicationLinklayerduringapplicationstartupandmergesregistryentriesandfile systemdirectories.IfThinAppfindsaregistrysubkeyorfilesystemdirectorythatdidnotpreviouslyexistin themainpackageorlayerthatisalreadymerged,ThinAppusestheisolationmodespecifiedinthelayerbeing loaded.If theregistrysubkeyorfilesystemdirectoryexistsinthemainpackageandalayerthatisalready merged,ThinAppusesthemostrestrictiveisolationmodespecifiedinanyofthelayersormainpackage. The orderofmostrestrictivetoleastrestrictiveisolationmodesisFull,WriteCopy,andMerged.

PermittedGroups Effect on Linked Packages


IfyoulinktwoapplicationsandyouspecifyavalueforthePermittedGroupsparameter,theuseraccount usedforstartingtheapplicationmustbeamemberofatleastoneoftheActiveDirectorygroupsforthis parameterinthePackage.inifilesofbothapplications.ForinformationaboutthePermittedGroups parameter,seeConfiguringPermissionsonpage 72.

Sandbox Changes for Standalone and Linked Packages


Sandboxchangesfromlinkedpackagesarenotvisibletothebaseexecutablefile.Forexample,youcaninstall AcrobatReaderasastandalonevirtualpackageandasalinkedpackagetothebaseFirefoxapplication.When youstartAcrobatReaderasastandaloneapplicationbyrunningthevirtualpackageandyouchangethe preferences,ThinAppstoresthechangesinthesandboxforAcrobatReader.WhenyoustartFirefox,Firefox cannotdetectthosechangesbecauseFirefoxhasitsownsandbox.Openinga.pdffilewithFirefoxdoesnot reflectthepreferencechangesthatexistinthestandaloneAcrobatReaderapplication.

Import Order for Linked Packages


ThinAppimportslinkedapplicationsaccordingtotheorderofapplicationsintheRequiredAppLinksor OptionalAppLinksparameter.Ifeitherparameterspecifiesawildcardcharacterthattriggerstheimportof morethanonefile,alphabeticalorderdetermineswhichpackageisimportedfirst. TheOptionalAppLinksparametermightappearasOptionalAppLinks=a.exe;b.exe;plugins\*.exe. Usinga.exeandb.exeassampleexecutablefiles,ThinAppimportslinkedpackagesintheorderdescribed inTable 41. Table 4-1. Imported Linked Packages
Import Order 1 2 3 4 5 6 7 Linked Package Baseapplication a.exe b.exe Pluginsloadedinalphabeticalorder Nestedpluginsfora.exe Nestedpluginsforb.exe Nestedpluginsforthefirstsetofpluginsinthislist

Forinformationaboutnestedlinks,seeSetUpNestedLinkswithApplicationLinkonpage 58.

VMware, Inc.

59

ThinApp Users Guide

File and Registry Collisions in Linked Packages


Ifthebaseapplicationandadependentpackagelinkedtothebaseapplicationcontainfileorregistryentries atthesamelocation,acollisionoccurs.Whenthishappens,theorderofimportoperationsdetermineswhich packagehaspriority.Thelastpackageimportedhaspriorityinsuchcasesandthefileorregistrycontentsfrom thatpackagearevisibletotherunningapplications.

VBScript Collisions in Linked Packages


VBScriptnamecollisionsmightpreventscriptsinotherimportedpackagesfromrunning.Ifyoulinkpackages withApplicationLinkandthosepackageshavescriptswiththesamename,ThinAppplacestheVBScripts fromthelinkedpackagesintoasinglepool.Forscriptswiththesamename,ThinApprunsthescriptfromthe lastimportedpackageanddisregardstheotherscript. Forexample,abasepackagemightcontainthea.vbs andb.vbsfilesandadependentpackagemightcontain theb.vbsandc.vbsfiles.Becauseafilenamecollisionexistsbetweentheb.vbsfiles,theVBScriptinthelast importedpackagespecifiedinaRequiredAppLinksorOptionalAppLinksparameteroverridesany previouslyimportedscriptswiththesamename.Inthiscase,ThinAppcondensesthepooloffour.vbsfiles intoasinglepoolwiththea.vbsfilefromthebasepackageandb.vbsandc.vbsfilesfromthedependent package.

VBScript Function Order in Linked Packages


InapoolofVBScriptsforpackageslinkedwithApplicationLink,functionsinthemainbodiesofthescripts runinalphabeticalorderofthescriptnames.ThinAppcallbackfunctionsinthescriptsruninreverse alphabeticalorderofthescriptnamesinthepool.

Storing Multiple Versions of a Linked Application in the Same Directory


Ifthedirectoryholdsalinkedpackage,andyouaddanupdatedversionofthelinkedpackageinthesame directory,theApplicationLinkutilitydetectsandusestheupdatedversion.

Using Application Sync for a Base Application and Linked Packages


IfyouuseApplicationLinktolinkpackagestoabasepackage,andyoustartthebasepackage,Application Synccanupdateonlythebasepackage.Forexample,ifyoubuildaMicrosoftOffice2007packagewith ApplicationSyncentriesinthePackage.inifile,buildanAdobeReaderpackagewithApplicationSync entriesinthePackage.inifile,useApplicationLinktolinkthetwopackages,andstartMicrosoftOffice2007, ApplicationSynconlyupdatesMicrosoftOffice2007.YoucanupdatebothMicrosoftOffice2007andAdobe Readerbystartingeachapplicationseparately. Ifyoudonotupdatealltheapplicationsandlinkabaseapplicationtoanexpiredplugin,thebaseapplication canstillloadandusetheplugin.

Application Updates That the Administrator Triggers


ThinAppprovidestheAppSync.exeandsbmerge.exeutilitiesforadministrators. TheAppSync.exeutilityforcesanApplicationSyncupdateonaclientmachine. Thesbmerge.exeutilitymakeincrementalupdatestoapplications.Forexample,anadministratormightuse theutilitytoincorporateapluginforFirefoxortochangethehomepageofaWebsitetopointtoadifferent defaultsite.

60

VMware, Inc.

Chapter 4 Updating and Linking Applications

Forcing an Application Sync Update on Client Machines


YoucanusetheAppSynccommandtoforceanApplicationSyncupdateonaclientmachine.Youmightwant toupdateapackagestoredinalocationwherestandardusersdonothavewriteaccess.Inthissituation,you cannotuseApplicationSyncparameterstocheckforupdateswhenanapplicationstartsbecauseusersdonot havetherequiredrightstoupdatethepackage.YoucanscheduleadailyAppSync.exerununderanaccount withsufficientprivileges.TheApplicationSyncparameters,suchasAppSyncUpdateFrequency,inthe Package.inifiledonotaffecttheAppSynccommand. ToforceanApplicationSyncupdate,usetheAppSync <Application_Sync_URL> <executable_file_path>command.ThevalueoftheURListhesameastheApplicationSyncURLinthe Package.inifileandtheexecutablefilepathisthepathtotheexecutablefilethatrequirestheupdate.

Updating Applications with Runtime Changes


Thesbmerge.exeutilitymergesruntimechangesrecordedintheapplicationsandboxbackintoaThinApp project.Atypicalworkflowforthisutilityinvolvesthefollowingtasks:

Capturinganapplication. Buildingtheapplicationwiththebuild.batfile. Runningacapturedapplicationandcustomizingthesettingsandvirtualenvironment.ThinAppstores thechangesinthesandbox. Runningthesbmerge.exeutilitytomergeregistryandfilesystemchangesfromthesandboxintothe ThinAppproject. Rebuildingthecapturedapplicationwiththebuild.batfile Deployingtheupdatedapplication.

Merge Sandbox Changes with Firefox


Thisprocedureforthesbmerge.exeutilityusesFirefox2.0.0.3asanexampleofacapturedapplication. Merge sandbox changes with Firefox 2.0.0.3 1 2 CaptureFirefox2.0.0.3. Doubleclickthebuild.batfileinthecapturedapplicationfoldertorebuildtheapplicationpackage. Forexample,aFirefox2.0.0.3pathtothebuild.batfilemightbeC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3\build.bat. 3 4 CreateaThinstalldirectoryinthebindirectoryforthesandboxlocation. StartFirefoxandmakeachangetothesettings. Forexample,changethehomepage. 5 Fromthecommandline,navigatetothedirectorywheretheThinAppprojectfolderresides. Forexample,navigatetoC:\Program Files\VMware\VMware ThinApp\Captures\Mozilla Firefox 2.0.0.3. 6 Fromthecommandline,typethe"C:\Program Files\VMware\VMware ThinApp\sbmerge" Print command. ThinAppprintsthechangesthataffectedthesandboxfolderwhenusingthecapturedapplication. 7 Fromthecommandline,typethe"C:\Program Files\VMware\VMware ThinApp\sbmerge" Apply command. ThinAppemptiestheThinstallfolderandmergesthesandboxchangeswiththeapplication.

VMware, Inc.

61

ThinApp Users Guide

sbmerge.exe Commands
Thesbmerge.exe Printcommanddisplayssandboxchangesanddoesnotmakemodificationstothe sandboxororiginalproject. Thesbmerge.exe Applycommandmergeschangesfromthesandboxwiththeoriginalproject.This commandupdatestheprojectregistryandfilesystemtoreflectchangesanddeletesthesandboxdirectory. Usage
"C:\Program Files\VMware\VMware ThinApp\sbmerge" Print [<optional_parameters>] "C:\Program Files\VMware\VMware ThinApp\sbmerge" Apply [<optional_parameters>]

Optional Parameters Theoptionalsbmerge.exeparametersspecifyprojectandsandboxpathsandblockprogressmessagesand mergingofsandboxfiles. Table 4-2. Optional sbmerge.exe Parameters


Parameter -ProjectDir <project_path> Description Ifyoustartthesbmerge.execommandfromalocationotherthantheapplication projectfolder,usetheabsoluteorrelativepathtotheprojectdirectoryusingthe -ProjectDir <project_path>parameter.A samplecommandis"C:\Program Files\VMware\VMware ThinApp\sbmerge" Print ProjectDir "C:\<project_folder_path>"". Whenyoustartacapturedapplication,itsearchesforthesandboxinaparticular order.SeeSearchOrderfortheSandboxonpage 103. Ifyouuseacustomlocationforthesandbox,usetheSandboxDir <sandbox_path>parametertospecifythelocation. -Quiet -Exclude <excluded_file>.ini Blockstheprintingofprogressmessages. Preventsthemergingofspecificfilesorregistryentriesfromthesandbox. Youcanspecifya.inifiletodeterminethecontentforexclusion.Thisfile containsseparatesectionstospecifyfiles,suchastheFileSystemIgnoreList andtheRegistryIgnoreList. Thesbmerge.exeutilityusesthesnapshot.inifileintheThinAppinstallation folderbydefaulttoexcludecertaincontentfromthemergeprocess.Thisoption enablesyoutospecifyanother.inifiletoensuretheadditionalexclusionof content.

-SandboxDir <sandbox_path>

Automatic Application Updates


Ifanapplicationcanupdateautomatically,itsupdatemechanismfunctionswithThinApp.Iftheapplication downloadstheupdateandrunsaninstallerorpatchingprogram,thisactivityoccursinsidethevirtual environmentandThinAppstoresthechangesfromtheupdatesoftwareinthesandbox.Whentheapplication restarts,itusestheversionoftheexecutablefileinthesandboxandnottheexecutablefilefromtheoriginal package. Forexample,ifyoucaptureFirefox1.5,yourautoupdatemechanismmightpromptyoutoupgradetoFirefox2.0. Ifyouproceedwiththeupgrade,theapplicationdownloadstheupdates,writestheupdatestothesandbox, andpromptsyoutorestarttheapplication.Whenyourunthecapturedapplicationagain,Firefox2.0starts. If youdeletethesandbox,Firefoxrevertsbacktoversion 1.5. Tomergechangesthatanautoupdatemechanismmakeswiththeoriginalpackagetobuildanupdated executablefile,usethesbmerge.exeutility.See ApplicationUpdatesThattheAdministratorTriggerson page 60. NOTEIfyouusetheApplicationSyncutilitytoperformapplicationupdates,disabletheautoupdate capabilitiesoftheapplication.SeeUsingApplicationSyncinaManagedorUnmanagedEnvironmenton page 53.

62

VMware, Inc.

Chapter 4 Updating and Linking Applications

Dynamic Updates Without Administrator Rights


Youcanupdateapplicationsdynamicallywithoutrequiringadministratorrights.For example,.NETbased applicationsthatdownloadnewDLLfilesfromtheInternetaspartoftheirupdateprocessmustrunthe ngen.exefiletogeneratenativeimageassembliesforstartupperformance.Intypicalcircumstances,the ngen.exefilewritestoHKLMandC:\WINDOWS,bothofwhichareonlyaccessiblewithadministratoraccounts. WithThinApp,thengen.exefilecaninstallnativeimageassembliesonguestuseraccountsbutstoreschanges inauserspecificdirectory. Youcanupdatethepackageonacentralcomputerandpushthechangestoclientmachinesortocentral networksharesasanewcapturedexecutablefile.Useoneofthefollowingoptionsforapplyingupdates:

Duringthesetupcaptureprocess. Insidethevirtualenvironment. Applicationswithautoupdatecapabilitiescanundergoupdates.Iftheupdateisapatch.exefile,the patchprogramcanruninthevirtualenvironmentandrunfromacmd.exefileentrypoint.Changesoccur inthesandboxduringautomaticupdatesormanualupdatestoallowyoutoreverttotheoriginalversion bydeletingthesandbox. Ifyouapplypatchesinthevirtualenvironmentonacentralpackagingmachine,youcanusethe sbmerge.exeutilitytomergesandboxchangesmadebytheupdatewiththeapplication.See ApplicationUpdatesThattheAdministratorTriggersonpage 60.

Inthecapturedproject. Ifyoumustupdateasmallsetoffilesorregistrykeys,replacethefilesinthecapturedproject. This approachisusefulforsoftwaredeveloperswhointegrateThinAppbuildswiththeirworkflow.

Side-by-Side Upgrading of Running Applications on a Network Share


WithThinApp,youcanupgradeorrollbackanapplicationthatisrunningonanetworkshareformultiple users.Thissidebysideupgradeprocessoccurswhentheuserquitstheapplicationandstartsitasecondtime. InTerminalServerenvironments,youcanhavemultipleusersrunningdifferentversionsatthesametime duringthetransitionperiod.

File Locks
Startinganapplicationlockstheexecutablefilepackage.Youcannotreplace,delete,ormovetheapplication. Thisfilelockensuresthatanycomputeroruserwhoaccessesaspecificversionofanapplicationcontinuesto havethatversionavailableaslongastheapplicationprocessesandsubprocessesarerunning. Ifyoustoreanapplicationinacentrallocationformanyusers,thisfilelockpreventsadministratorsfrom replacingapackagedexecutablefilewithanewversionuntilallusersexittheapplicationandreleasetheir locks.

Upgrade a Running Application


Youcancopyanewversionofanapplicationintoanexistingdeploymentdirectorywithahigherfilename extension,suchas.1or.2.ThisprocedureusesFirefoxasasampleapplication. Youdonothavetoupdateshortcuts. Upgrade a running application 1 2 Deploytheoriginalversionoftheapplication,suchasFirefox.exe. Copytheapplicationtoacentralshareat\\<server>\<share>\Firefox.exe. AsamplelocationisC:\Program Files\Firefox\Firefox.exe.

VMware, Inc.

63

ThinApp Users Guide

CreateadesktoporStartmenushortcuttotheusersdesktopthatpointstoasharedexecutablefile locationat\\<server>\<share>\Firefox.exe. AssumetwousersstartFirefox.exeandlocktheapplication.

CopytheupdatedversionofFirefox.exetothecentralshareat\\<server>\<share>\Firefox.1. Ifyouareanewuser,ThinAppstartstheapplicationwiththenewpackagedatainFirefox.1.Ifyouare auserworkingwiththeoriginalversion,youcanseethenewversionafteryouexittheapplicationand restarttheapplication.

5 6

IfyoumustdeployamorecurrentupdateofFirefox,placeitinthesamedirectorywithahighernumber attheend. CopyVersion2.0ofFirefox.exetocentralshareat\\<server>\<share>\Firefox.2

AfterFirefox.1isunlocked,youcandeleteit,butFirefox.exeshouldremaininplacebecausetheuser shortcutscontinuetopointthere.ThinAppalwaysusesthefilenamethathasthehighestversionnumber. If youmustrollbacktoanearlierversionandthemostrecentversionisstilllocked,copytheoldversionso thatithasthehighestversionnumber.

Sandbox Considerations for Upgraded Applications


Whenyouupgradeanapplication,youcancontrolwhetheruserscontinuetousetheirprevioussettingsby keepingthesandboxnameconsistentinthePackage.inifile.You canpreventusersfromusinganolder sandboxwithanupgradedapplicationbypackagingtheupgradedapplicationwithanewnameforthe sandbox.Startingtheupgradedapplicationthefirsttimecreatesthesandboxwiththenewname.

Updating the ThinApp Version of Packages


Youcanusetherelink.exeutilitytoupdateanexistingpackageortreeofpackagestothelatestversionof ThinApp.AlthoughyoucaninstallthelatestversionofThinAppandrunthebuild.batutilitytorebuildeach targetpackagewiththelatestThinAppversion,therelink.exeutilityisafastermethodtoupgradethe ThinAppversionofexistingpackages.Youmightwanttoupdateyourpackagetobenefitfromthelatest ThinAppfeaturesorsupportenhancements.

relink Examples
Therelink.exeutilityhasanoptional-Recursiveflagandcantargetasinglepackageormultiplepackages.
relink [-Recursive] <target> [<target> ...]

Forexample,youcanupdateanAdobeReaderpackagetothelatestinstalledThinAppversion.
relink AdobeReader.exe

Therelink.exeutilitycanuseawildcardpattern.
relink *.exe *.dat

Therelink.exeutilitycanusedirectorynamestoprocessallThinAppfilesinthatdirectory.
relink C:MyPackages

Ifyouspecifythe-Recursiveflag,therelink.exeutilityprocessesallThinAppfilesinthedirectoryandall subdirectories.Thisflagisintendedforuseonlywithdirectorynames. Ifthetargetnamecontainsspaces,youmustusedoublequotes.


relink "Microsoft Office Professional 2007.dat"

64

VMware, Inc.

Configuring Package Parameters

Advanceduserscancustomizetheparametersofthevirtualapplicationoutsideofthecaptureprocess. ParameterscanaffecttheconfigurationofbuildoptionsthatincludeMSI,update,andentrypointsettings. ThePackage.inifileislocatedintheprojectfolderandcontainsparametersthatconfigureacaptured applicationduringthebuildprocess.TheSetupCapturewizardsetstheinitialvaluesofsomePackage.ini parameters.YoucansavethePackage.inifileandbuildtheprojecttohavetheparameterchangestakeeffect. Thisinformationincludesthefollowingtopics:


Package.iniFileStructureonpage 66 ParametersThatApplytoPackage.inior##Attributes.iniFilesonpage 66 ConfiguringtheThinAppRuntimeonpage 66 ConfiguringIsolationonpage 68 ConfiguringFileandProtocolAssociationsonpage 70 ConfiguringBuildOutputonpage 71 ConfiguringPermissionsonpage 72 ConfiguringObjectsandDLLFilesonpage 74 ConfiguringFileStorageonpage 78 ConfiguringProcessesandServicesonpage 81 ConfiguringSizesonpage 83 ConfiguringLoggingonpage 86 ConfiguringVersionsonpage 86 ConfiguringLocalesonpage 87 ConfiguringIndividualApplicationsonpage 88 ConfiguringDependentApplicationswithApplicationLinkonpage 91 ConfiguringApplicationUpdateswithApplicationSynconpage 93 ConfiguringMSIFilesonpage 96 ConfiguringSandboxStorageandInventoryNamesonpage 100

VMware, Inc.

65

ThinApp Users Guide

Package.ini File Structure


ThestructureofthePackage.inifileincludessectionsthatapplytoallapplicationsorindividualapplications. Mostparametersmustappearunderaspecificsectionheading.ThePackage.inifilecontainsthefollowing headings:

[BuildOptions] [<application>.exe] [FileList] [Compression] [Isolation]

The[BuildOptions]sectionofthePackage.inifileappliestoallapplications.Individualapplications inherittheseparametersunlesstheentriesspecifictoapplicationsoverridethesesettings.Forexample,the [Adobe Reader 8.exe]sectionofthePackage.inifileforanAdobeReaderapplicationmighthavesettings thatoverridethelarger[BuildOptions]parameters.Theapplicationspecificparametersshowthe applicationentrypointsthatyoucreateduringthebuildprocess. The[FileList],[Compression],and[Isolation]parametersactas[BuildOptions]parameters,butare groupedseparatelyforbackwardcompatibilityreasons.Youcanaddthe[FileList]headingmanuallyto thefilewhenyouaddtheExcludePatternparameter. Parametersthatdonotapplytothestandardsectionscanresideunderanyheading.Parametersdonothave toappearinalphabeticalorder.

Parameters That Apply to Package.ini or ##Attributes.ini Files


YoucanapplycertainparameterstothePackage.inifileorthe##Attributes.inifile,dependingonthe requirements,tooverridethePackage.inisettingsatthedirectorylevel. YoucanusetheDirectoryIsolationMode,CompressionType,andExcludePatternparametersinan ##Attributes.inifile.The##Attributes.inifileexistsinthefoldermacrosoftheprojectfolder. Formoreinformationaboutthe##Attributes.inifile,seeModifyingSettingsinthe##Attributes.iniFile onpage 24.

Configuring the ThinApp Runtime


YoucanmodifyThinAppparametersforruntimeconfigurationtasksthataffectapplicationstartup performanceandvirtualcomputernames.

NetRelaunch
TheNetRelaunchparameterdetermineswhethertorestartanapplicationfromthelocaldiskwhenyourun theapplicationfromanetworkshareorremovabledisk,toaddresstheslowstartupofapplications. ThinAppsetsaninitialvalueoftheNetRelaunchparameterthatdetectswhetheranapplicationrunsfroma networkdriveoraremovabledisk,andusesastubexecutablefileonthelocalharddisktorestarttheapplication. ThisprocessaddressesperformanceproblemsthatSymantecAntiVirusgenerateswhenittriestodoacomplete scanofexecutablefilesthatopenfromanetworkshareorremovabledisk,andonexecutablefilesthatmakethe initialnetworkconnections.Thescancanaffectstarttimesforlargeexecutablefiles. BecausealargenumberofdesktopshaveSymantecAntiVirus,ThinAppenablesapplicationstoopenfroma networksharewithoutincurringlengthyscantimes.Whentheapplicationrunsfromanetworkshareor removabledisk,ThinAppcreatesastubexecutablefileinthedirectorythattheCachePathparametersetson thelocaldiskandrestartstheapplicationfromthisstubexecutablefile.Thestubexecutablefilecanloadthe runtimefromthelargepackageandreadtherestoftheapplicationfromitsoriginallocationonthenetwork. SymantecAntiVirusperceivesthattheapplicationislocalanddoesnotscanthelargerexecutablefileonthe networkshareorremovabledisk.
66 VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
IfyourapplicationissmalloryouknowthatSymantecAntiVirusisnotinstalledonthedesktopstowhichyou aredeployingtheapplication,youcanmodifytheNetRelaunchparameterforstrongerinitialstartup performance.
[BuildOptions] NetRelaunch=0

RuntimeEULA
TheRuntimeEULAparametercontrolstheEndUserLicenseAgreementdisplayforthepackage. This parameteraddresseslegacyEndUserLicenseAgreementrequirements.VMwaredoesnotrequirea runtimeEULAforThinApppackages. Donotmodifythevalueofthisparameter.

Examples
TheRuntimeEULAparameterpreventsthedisplayoftheEndUserLicenseAgreement.
[BuildOptions] ;Default: do not show an Eula RuntimeEULA=0

VirtualComputerName
TheVirtualComputerNameparameterdetermineswhethertovirtualizethecomputername,toavoidnaming conflictsbetweenthedeploymentsystemandthecapturesystem. Applicationscanusethenameofthecomputeronwhichtheyareinstalled,orconnecttoadatabaseanduse thenameofthecomputerintheconnectionstring.Becausethecapturesystemisdifferentfromthe deploymentsystem,capturedapplicationsthatrequireacomputernamemustvirtualizethecomputername toensurethattheapplicationcanrunonanymachine. ThinAppcommentsouttheinitialsettingoftheVirtualComputerNameparameter.Thisparameterusesa stringthatGetComputerNameandGetComputerNameExAPIfunctionsreturninavirtualapplication.

Examples
IfthecapturesystemlackstheLOCALHOSTname,ThinAppcommentsouttheVirtualComputerName parameter.
;VirtualComputerName=<original_machine_name>

IfyourenameacleanmachineasLOCALHOSTbeforeperformingthecaptureprocess,thePackage.inifile activatestheVirtualComputerNameentry.ThevirtualapplicationworkswiththisLOCALHOSTnamebecause anycomputerthattheapplicationrunsongetsthisvalueasthecomputername.


VirtualComputerName=LOCALHOST

IfyoutypeaGetComputerNameorGetComputerNameExcommand,themachinereturnsLOCALHOST.Ifthe WindowssystemrequirestheGetComputerNameandGetComputerNameExAPIfunctionstooperateina standardwayandreturntheactualnameofthecomputerwheretheapplicationruns,donotrenamethe machineasLOCALHOST. Inadditiontospecifyingaliteralstring,suchasLOCALHOST,youcanspecifyanenvironmentvariable.


VirtualComputerName=%VCOMPNAME%

Whenyouspecifyanenvironmentvariable,thevaluereturnedisthevalueoftheenvironmentvariable.Ifthe valueoftheVirtualComputerNameparameteris%VCOMPNAME%,andthe%VCOMPNAME% environmentvariableissettoEnvCompName,theGetComputerNameAPIreturnsEnvCompName.

VMware, Inc.

67

ThinApp Users Guide

Wow64
TheWow64parametersimulatesa32bitenvironmentfor32bitapplicationsthatcannotrunona64bit Windowsoperatingsystem. Ifa32bitapplicationtriestohandleitsown64bitregistryredirection,youcanactivatethisparameterbefore buildingaproject.ThinAppcommentsouttheinitialsettingtopreventWindowsonWindows64bit (WOW64)emulation.

Examples
YoucanuncommenttheWow64parametertosimulatea32bitenvironmentfor32bitapplicationsona64bit operatingsystem.Forexample,avirtualized32bitOracleapplicationmightnotworkona64bitoperating system.
[BuildOptions] Wow64=0

QualityReportingEnabled
TheQualityReportingEnabledparameterspecifieswhetherVMwarecancollectanonymousdataona packagetoimproveThinAppapplicationsupport.VMwarecollectsapplicationinformationsuchasthe versionandnumberofapplicationfailures. Ifyouagreetoanonymousdatacollectionduringthecaptureprocess,theQualityReportingEnabled parameteruploadsdataeverytendays.

Examples
YoucanmodifytheQualityReportingEnabledparametertoturnoffThinAppdatacollection.
[BuildOptions] QualityReportingEnabled=0

LoadDotNetFromSystem
UsetheLoadDotNetFromSystemparametertosolvecompatibilityproblemsrelatedto.Netruntimescaptured aspartofaWindowsXPorWindowsVistapackagethatisrunningonWindows7byloadingthenative.Net binaryfilesinsteadofthebinaryfilescapturedinthevirtualapplicationpackage. Bydefault,thisparameteriscommentedoutinthePackage.inifile.Searchfor LoadDotNetFromSystem=Win7 andremovethecommenting.

Configuring Isolation
YoucanmodifyThinAppparameterstodeterminethereadandwriteaccesstothefilesystemandregistrykeys.

DirectoryIsolationMode
TheDirectoryIsolationModeparameterspecifiesthelevelofreadandwriteaccessfordirectoriestothe physicalfilesystem. ThecaptureprocesssetstheinitialvalueoftheDirectoryIsolationModeparameterinthePackage.inifile. Thisparametercontrolsthedefaultisolationmodeforthefilescreatedbythevirtualapplicationexceptwhen youspecifyadifferentisolationmodeinthe##Attributes.inifileforanindividualdirectory. Any unspecifieddirectories,suchasC:\myfolder,inherittheisolationmodefromthePackage.inifile. ThinAppprovidesonlytheMergedandWriteCopyisolationmodeoptionsinthecaptureprocess.Youcanuse theFullisolationmodeoutsidethewizardtosecurethevirtualenvironment.

68

VMware, Inc.

Chapter 5 Configuring Package Parameters

WithMergedisolationmode,applicationscanreadandmodifyelementsonthephysicalfilesystemoutside ofthevirtualpackage.SomeapplicationsrelyonreadingDLLsandregistryinformationinthelocalsystem image.TheadvantageofusingMergedmodeisthatdocumentsthatuserssaveappearonthephysicalsystem inthelocationthatusersexpect,insteadofinthesandbox.Thedisadvantageisthatthismodemightclutter thesystemimage.Anexampleofthecluttermightbefirstexecutionmarkersbysharewareapplications writtentorandomcomputerlocationsaspartofthelicensingprocess. WithWriteCopyisolationmode,ThinAppcaninterceptwriteoperationsandredirectthemtothesandbox. YoucanuseWriteCopyisolationmodeforlegacyoruntrustedapplications.Althoughthismodemightmake itdifficulttofinduserdatafilesthatresideinthesandboxinsteadofthephysicalsystem,thismodeisuseful forlockeddowndesktopswhereyouwanttopreventusersfromaffectingthelocalfilesystem. WithFullisolationmode,ThinAppblocksvisibilitytosystemelementsoutsidethevirtualapplication package.Thismoderestrictsanychangestofilesorregistrykeystothesandboxandensuresthatno interactionexistswiththeenvironmentoutsidethevirtualapplicationpackage.Fullisolationprevents applicationconflictbetweenthevirtualapplicationandapplicationsinstalledonthephysicalsystem.Donot usetheFullisolationmodeinthePackage.inifilebecausethatmodeblockstheabilitytodetectandload systemDLLs.YoucanuseFullisolationmodeasanoverridemechanisminthe##Attributes.inifiles. ThinAppcachestheisolationmodesfortheregistryandthefilesystematruntimeinthesandbox.Ifyou changetheisolationmodefortheprojectandrebuildtheexecutablefile,youmightdeletethesandboxforthe changetotakeeffect. Formoreinformationaboutthedefinitionsandeffectofisolationmodes,seeDefiningIsolationModesfor thePhysicalFileSystemonpage 18.

Examples
YoucanmodifytheDirectoryIsolationModeparameterwithWriteCopyisolationtoensurethatthe applicationcanreadresourcesonthelocalmachine,butnotwritetothehostcomputer.Thisisthedefault settingforthesnapshot.exeutility.Youmustplacetheparameterunderan[Isolation]heading.
[Isolation] DirectoryIsolationMode=WriteCopy

YoucanassignMergedisolationmodetoensurethattheapplicationcanreadresourcesonandwritetoany locationonthecomputerexceptwherethepackagespecifiesotherwise.ThisisthedefaultsettingfortheSetup Capturewizard.


[Isolation] DirectoryIsolationMode=Merged

RegistryIsolationMode
TheRegistryIsolationModeparametercontrolstheisolationmodeforregistrykeysinthepackage.This settingappliestotheregistrykeysthatdonothaveexplicitsettings. Thecaptureprocessdoesnotsetthevalueofthisparameter.Youcanconfiguretheregistryisolationmode onlyinthePackage.inifile.ThinAppsetstheinitialregistryisolationmodetoWriteCopy.Forinformation aboutisolationmodeoptions,seeDirectoryIsolationModeonpage 68. DonotusetheFullisolationmodeinthePackage.inifilebecausethatmodeblockstheabilitytodetectand loadsystemDLLs.YoucanuseFullisolationmodeasanoverridemechanism.Youcanplaceexceptionstothe configuredRegistryIsolationModeparameterintheregistrykeytextfilesintheprojectdirectory.An exceptionmightappearinafile,suchasHKEY_CURRENT_USER.txt,asisolation_full HKEY_CURRENT_USER\Software\Macromedia. Allruntimemodificationstovirtualfilesinthecapturedapplicationarestoredinthesandbox,regardlessof theisolationmodesetting.Atruntime,virtualandphysicalregistryfilesareindistinguishabletoan application,butvirtualregistryfilesalwayssupersedephysicalregistryfileswhenbothexistinthesame location.Ifvirtualandphysicalentriesexistatthesamelocation,isolationmodesdonotaffectaccesstothese entriesbecausetheapplicationalwaysinteractswithvirtualelements.

VMware, Inc.

69

ThinApp Users Guide

Ifexternalgrouppolicyupdatesoccurseparatelyfromthepackagethroughthephysicalregistry,youmight removevirtualregistryfilesfromapackageandverifythattheparentfileofthesevirtualregistryfilesdoes notuseFullisolation.Becausechildfilesinheritisolationmodesfromparentelements,Fullisolationina parentfilecanblockthevisibilityofphysicalchildfilestoanapplication.

Examples
YoucanmodifytheRegistryIsolationModeparametertoensurethattheapplicationcanreadkeysfromthe hostcomputer,butnotwritetothehostcomputer.
[Isolation] RegistryIsolationMode=WriteCopy

Youcanensurethattheapplicationcanwritetoanykeyonthecomputer,exceptwherethepackagespecifies otherwise.
[Isolation] RegistryIsolationMode=Merged

Configuring File and Protocol Associations


YoucanmodifyThinAppparameterstoassociatefileextensionswithapplicationsandtospecifyprotocols thatarevisibletothephysicalenvironment.

FileTypes
TheFileTypesparameterlistsfileextensionsthatthethinreg.exeutilityassociateswithanexecutablefile. Thecaptureprocessgeneratesinitialvaluesthatyoucannotaddto.Youcanremoveextensionsthatyoudo notwanttoassociatewiththevirtualpackage.Donotuseseparatorsbetweenthefileextensionsinthelist.

Examples
AMicrosoftWord2007packagespecifies.doc.docxasthevaluesoftheFileTypesparameter.Ifyoucapture Microsoft Office2007andhaveMicrosoftOffice2003installedinthephysicalenvironment,youcanremove the.docextensionfromtheFileTypesparameterandleavethe.docxextensiontoensurethat Microsoft Word2003opens.docfilesandMicrosoftWord2007opens.docxfiles.
[Microsoft Office Word 2007.exe] FileTypes=.docx

Thecaptureprocesscancreatefiletypeassociationsfor.docand.dotextensionsandlinkthemto Microsoft Word.


[Microsoft Office Word 2003.exe] ReadOnlyData=bin\Package.ro.tvr Source=%ProgramFilesDir%\Microsoft Office\OFFICE11\WINWORD.EXE FileTypes=.doc.dot

Protocols
TheProtocolsparameterspecifiestheprotocols,suchasHTTP,thatarevisibletoapplicationsinthephysical environment.ThisparameterissimilartotheFileTypesparameter,butdealswithapplicationsthathandle protocolsratherthanfiletypes. Thecaptureprocessgeneratesinitialvaluesthatyoucannotaddto.Youcanremoveentriesforbrowsersor otherapplications.

Examples
Thecaptureprocesscanspecifyprotocols,suchasthemailtoprotocolforaMicrosoftOutlookpackage,inthe Protocolsparameter.
[Microsoft Office Outlook 2007.exe] Protocols=feed;feeds;mailto;Outlook.URL.mailto;stssync;webcal;webcals

70

VMware, Inc.

Chapter 5 Configuring Package Parameters

Configuring Build Output


YoucanmodifyThinAppparameterstospecifythelocationofthebuildoutputandthefilesinthepackage.

ExcludePattern
TheExcludePatternparameterexcludesfilesordirectoriesduringtheapplicationbuildprocess.Youmust adda[FileList]headingbeforethisparameterentry. Youcanuseacommatoseparatepatternsinthelist.Wildcards (*)matchnoneofthecharactersoratleastone ofthecharactersandquestionmarks (?)matchexactlyonecharacter.ThesyntaxissimilartotheDOSdir command,butyoucanapplywildcardcharacterstodirectorynamesandfilenames. YoucanspecifytheExcludePatternparameterinthePackage.inifile,wherethepatternexclusionapplies totheentiredirectorystructure,andthe##Attributes.inifile,whereThinAppaddsthepatternexclusion tothecurrentlistofexclusions,butappliessettingsonlytothespecificdirectoryandsubdirectories.Youcan createadifferentexclusionlistfordifferentdirectoriesinyourproject.

Examples
Ifyoustorepackagesinaversioncontrolsystemandyouwanttoexcludeversioncontrolinformationfrom thevirtualfilesystem,youcanexcludeanydirectoriescalled.svnor.cvsandallthesubdirectories.
[FileList] ExcludePattern=\.svn,\.cvs

Thepatterndoesnotmatchfilenamesordirectoriesthatcontain.svnor.cvsinthemiddleofthestring. Youcanexcludeanypaththatendswith.bakor.msi.
[FileList] ExcludePattern=*.bak,*.msi

Icon
TheIconparameterspecifiestheiconfiletoassociatewiththegeneratedexecutablefile.Thisiconappearsin theapplication,suchasMicrosoftWord,andinthefilesassociatedwiththeapplication,suchas.docfiles. Eachapplicationincludesitsowniconstoredasa.icofile,withinthe.exefileoftheapplication,orwithin a.dllfile.Thecaptureprocessattachestheiconstotheexecutablefiles.Theapplicationusesthemaingroup iconfromtheexecutablefileintheSourceparameterandtheindividualiconresourcethatthegroupicon pointsto.

Examples
YoucanmodifytheIconparametertouseanalternativeiconbyspecifyinganexecutablefilethatisdifferent fromtheexecutablefileintheSourceparameter.Alternativeiconsmightbeusefulforthirdpartycompanies.
[<my_app>.exe] Source=%ProgramFilesDir%\<my_app>\app.exe Icon=%ProgramFilesDir%\<my_app>\app2.exe

Youcanspecifyaniconsetbyappending,1 ,2totheendoftheiconpath.
[<my_app>.exe] Source=%ProgramFilesDir%\<my_app>\<app>.exe Icon=%ProgramFilesDir%\<my_app>\<app2>.exe,1

Youcanusea.ico filetospecifytheapplicationicon.
[<my_app>.exe] Source=%ProgramFilesDir%\<my_app>\<app>.exe Icon=%ProgramFilesDir%\<my_app>\<my_icon>.ico

VMware, Inc.

71

ThinApp Users Guide

OutDir
TheOutDirparameterspecifiesthedirectorythatstoresthebuild.batoutput. Donotmodifythevalueofthisparameter.

Examples
ThestaticvalueoftheOutDirparameterspecifiesthebindirectoryoftheproject.
[BuildOptions] OutDir=bin

RetainAllIcons
TheRetainAllIconsparameterkeepsalloftheoriginaliconsoftheexecutablefilelistedintheSource parameterintheapplication. Theiconsthatarenotassignedtoapplicationexecutablefilesresideinthevirtualfilesystemofthepackage. TheRetainAllIconsparameterdetermineswhethertocopytheunusediconsfromthevirtualfilesystemto theexecutablefile.Tosavediskspace,ThinAppsetsaninitialvaluethatremovesunusediconsfromthe portionoftheexecutablefilethatisvisibletothephysicalenvironment.

Examples
YoucanmodifytheRetainAllIconsparametertokeepalloftheoriginaliconsoftheapplication.
[app.exe] Source=%ProgramFilesDir%\myapp\app.exe RetainAllIcons=1

Configuring Permissions
YoucanmodifyThinAppparametersforsecuritytasksthatdefineuseraccesstopackagesandchangeData ExecutionPrevention(DEP)protection.

AccessDeniedMsg
TheAccessDeniedMsgparametercontainsanerrormessagetodisplaytouserswhodonothavepermission torunapackage. ThinAppsetsaninitialmessagethatnotifiestheusertocontacttheadministrator.

Examples
YoucanmodifytheAccessDeniedMsgparametertoaddatechnicalsupportnumber.
[BuildOptions] PermittedGroups=Administrator;OfficeUsers AccessDeniedMsg=You do not have permission to execute this application, please call support @ 1-800-822-2992

AddPageExecutePermission
TheAddPageExecutePermissionparametersupportsapplicationsthatdonotworkinaDataExecution Prevention(DEP)environment. TheDEPfeatureofWindowsXP SP2,WindowsServer 2003,andlateroperatingsystemversionsprotects againstsomesecurityexploitsthatoccurwithbufferoverflow.This featurecreatescompatibilityissues. WindowsturnsoffthefeaturebydefaultonWindowsXP SP2andyoucanuseamachinespecificoptinor optoutlistoftheapplicationstowhichtoapplyDEPprotection.Optinandoptoutpoliciescanbedifficult tomanagewhenalargenumberofmachinesandapplicationsareinvolved.TheAddPageExecutePermission parameterinstructsThinApptoaddexecutionpermissiontopagesthatanapplicationallocates.The applicationcanrunonmachinesthathaveDEPprotectionenabledwithoutmodifyingtheoptoutlist. ThinAppsetsaninitialvalueoftheAddPageExecutePermissionparameterthatpreventsanychangetothe DEPprotections.
72 VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
YoucanmodifytheAddPageExecutePermissionparametertoaddexecutionpermissiontopagesthatan applicationallocates.ThinAppexecutescodefrommemorypagesthattheapplicationspecifies.Thisisuseful forapplicationsthatcombinetheprogramanditsdataintooneareaofmemory.
[BuildOptions] ;Disable some Data Execution protections for this particular application AddPageExecutionPermission=1

PermittedGroups
ThePermittedGroupsparameterrestrictsapackagetoaspecificsetofActiveDirectoryusers. Youcanspecifygroupnames,SIDstrings,oramixofgroupnamesandSIDstringsinthesamelineofthe PermittedGroupsparameter.Ifyouuseadomainbasedgroupname,youmustconnecttothatdomainwhen youbuildtheapplicationpackage.IfyouaddaSIDintheparametervalue,youarenotrequiredtoconnectto thedomainwheretheSIDisdefined. ActiveDirectoryDomainServicesdefinesecuritygroupsanddistributiongroups.Thisparametercanonly supportnestedsecuritygroups.Forexample,ifauserisamemberofsecuritygroupA,andsecuritygroupA isamemberofsecuritygroupB,ThinAppcandetecttheuserasamemberofsecuritygroupAandsecurity groupB. WhenThinAppbuildsanapplication,ThinAppassumesanyspecifiedgroupnamesarevalidandconverts thenamestoSIDvalues.ThinAppcanresolvegroupownershipatruntimeusingcachedcredentials.Youcan continuetoauthenticatelaptopusersevenwhentheyareoffline.Iftheuserdoesnothaveaccesstorunthe package,youcancustomizetheAccessDeniedMsgparametertoinstructtheuser. YoucanplacethePermittedGroupsparameterunderthe[BuildOptions]headingtoaffectthepackageor underthe[<application>.exe]headingtoaffectaspecificapplication.The[<application>.exe]value overridesthedefault[BuildOptions]valueforthespecificapplication.

Examples
YoucanmodifythePermittedGroupsparametertospecifyalistofActiveDirectoryusergroupnames, separatedbysemicolons.The[BuildOptions]parameterssetglobalsettingsfortheentireproject.
[BuildOptions] PermittedGroups=Administrator;OfficeUsers AccessDeniedMsg=You do not have permission to execute this application, please call support @ 1-800-822-2992

YoucanspecifyausergroupsettingforaspecificapplicationthatoverwritestheglobalPermittedGroups setting.
[App1.exe] PermittedGroups=Guest AccessDeniedMsg=You do not have permission to execute this application, please call support @ 1-800-822-2992

IfyoudonotspecifyaPermittedGroupssettingforanapplication,theapplicationinheritstheglobal PermittedGroupsvalueinthe[BuildOptions]section.
[App2.exe] ...

YoucanmixgroupnamesandSIDstringsinthesameentryforthePermittedGroupsparameter.
PermittedGroups=S-1-5-32-544;Office Users

VMware, Inc.

73

ThinApp Users Guide

UACRequestedPrivilegesLevel
TheUACRequestedPrivilegesLevelparameterspecifiesprivilegesforprogramsrequiringUserAccount Control(UAC)information.ThisparameteraffectsusersworkingonWindowsVistaorlateroperatingsystem versions. Youcanusethefollowingvaluestospecifyprivileges:

asInvoker ThisvalueusestheprofileinVista.

requireAdministrator highestAvailable ThisvalueusesthehighestavailableprivilegethatcanavoidtheUACprompt.

Ifyoudonotspecifyprivileges,ThinAppdoesnotassignadefaultvaluebutoperatesaccordingtothe asInvokersetting.

Examples
YoucanmodifytheUACRequestedPrivilegesLevelparametertospecifyadministratorprivilegesfora program.
[BuildOptions] UACRequestedPrivilegesLevel=requireAdministrator

UACRequestedPrivilegesUIAccess
TheUACRequestedPrivilegesUIAccessparameterspecifiesuserinterfaceaccessonWindowsVistaorlater operatingsystemversions.Theseoperatingsystemsprotectsomeelementsoftheuserinterface. ThinAppassignsaninitialvalueoftheUACRequestedPrivilegesUIAccessparametertoblockapplication accesstoprotectedelements.Althoughyoucanassignatrueorfalsevaluetothe UACRequestedPrivilegesUIAccessparametertospecifyuserinterfaceaccess,theparameterexiststo supportMicrosoftsettings.

Examples
YoucankeeptheinitialvalueoftheUACRequestedPrivilegesUIAccessparametertoensurethatthevirtual applicationcannotaccessprotectedelements.
[BuildOptions] UACRequestedPrivilegesUiAccess=false

Configuring Objects and DLL Files


YoucanmodifyThinAppparameterstospecifyCOMobjectaccessandDLLloadingrequirements.

ExternalCOMObjects
TheExternalCOMObjectsparameterdetermineswhetherWindowscreatesandrunsCOMobjectsinthe physicalenvironmentratherthanthevirtualenvironmenttofacilitateapplicationcompatibilitywith ThinApp.COMobjectsthatareexternaltothevirtualenvironmentalwaysruninthephysicalenvironment. ThinAppsetsaninitialvalueoftheExternalCOMObjectsparameterthatcreatesandrunstheCOMobjects inthevirtualenvironment. COMsupportsoutofprocessexecutableserversandservicebasedCOMobjects.Ifanapplicationcancreate COMobjectsthatgeneratemodificationsonthehostcomputer,theintegrityofthehostcomputerisatrisk.If ThinApprunsoutofprocessandservicebasedCOMobjectsinthevirtualenvironment,ThinAppstoresin thesandboxallchangesthattheCOMobjectsmake. Thecaptureprocessdoesnotgeneratethisparameter.YoucanaddthisparametertothePackage.inifile.
74 VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
WhenyoutroubleshootaproblemwithVMwaresupportanddeterminethatanapplicationimplementsCOM objectsthatisnotcompatiblewithThinApp,youcanmodifytheExternalCOMObjectsparametertorunthe COMobjectsoutsideofthevirtualenvironment.YoucanlisttheCLSIDkeys.
[BuildOptions] ExternalCOMObjects={8BC3F05E-D86B-11D0-A075-00C04FB68820};{7D096C5F-AC08-4F1F-BEB7-5C22C517CE39}

ExternalDLLs
TheExternalDLLsparametercanforceWindowstoloadspecificDLLfilesfromthevirtualfilesystem. ThinAppsetsaninitialvaluethatloadsDLLfilesfromthevirtualfilesystemandpassestheloadingprocess toWindowsforDLLfilesonthephysicalfilesystem.In somecircumstances,WindowsmustloadaDLLfile inthevirtualfilesystem.YoumighthaveaDLLfilethatinsertsitselfintootherprocessesusingWindows hooks.TheDLLfilethatimplementsthehookmustbeavailableonthehostfilesystemandWindowsmust loadthatfile.WhenyouspecifyaDLLfileintheExternalDLLsparameter,ThinAppextractsthefilefromthe virtualfilesystemtothesandboxandinstructsWindowstoloadit. Virtualdictationsoftwareisatypeofsoftwarethatmightinterfacewithnativeapplicationsthatpass informationbetweenDLLs.ThinAppcanpasstheloadingofDLLsinthevirtualenvironmenttoWindowsto ensurethatlocalapplicationscaninterfacewiththeDLLs. TheExternalDLLsparameterdoesnotsupportaDLLfilethatdependsonotherDLLfilesinthevirtualfile system.Inthiscase,WindowscannotloadtheDLLfile.

Examples
YoucanmodifytheExternalDLLsparametertoforceWindowstoloadtheinject.dllandinjectme2.dll filesfromthevirtualfilesystem.
[BuildOptions] ExternalDLLs=inject.dll;injectme2.dll

ForcedVirtualLoadPaths
TheForcedVirtualLoadPathsparameterinstructsThinApptoloadDLLfilesasvirtualDLLfilesevenifthe filesresideoutsidethepackage.ThisparameterisusefulwhentheapplicationmustloadexternalsystemDLL filesthatdependonDLLfileslocatedinthepackage. TheDLLpathscancontainmacros.Usesemicolonstoseparatemultiplepaths. ThisparameterachievesthesameresultastheAddForcedVirtualLoadPathAPIfunction.See AddForcedVirtualLoadPathonpage 119.

Examples
YoucanmodifytheForcedVirtualLoadPathsparameterwhenyouhaveanapplicationthatdependson externalDLLfiles.WhenyoucaptureMicrosoftOfficewithoutMicrosoftOutlookandanativeversionof MicrosoftOutlookexistsonthelocalsystem,youcannotsendemailfromthevirtualversionofMicrosoftExcel becausethenativeenvelope.dllfilethatisinstalledwithMicrosoftOutlookdependsonthemso.dllfile thatThinApploadsinthevirtualenvironment.YoucanforceThinApptoloadtheenvelope.dllfileinthe virtualenvironmentinsteadofinthenativeenvironment.
[BuildOptions] ForcedVirtualLoadPaths=%ProgramFilesDir%\Microsoft Office\Office10\envelope.dll

VMware, Inc.

75

ThinApp Users Guide

IsolatedMemoryObjects
TheIsolatedMemoryObjectsparameterliststhesharedmemoryobjectstoisolatefromotherapplicationsor fromsystemobjects. ApplicationsthatuseCreateFileMappingandOpenFileMappingWindowsfunctionscreatesharedmemory objects.Whenyoudonotisolatememoryobjects,conflictscanoccurbetweenvirtualapplicationsandnative applicationssharingthoseobjects.Forexample,youmighthaveatwoversionsofanapplicationwithone versioninthenativeenvironmentandoneversioninthevirtualenvironment.Whentheseapplication versionsuseinformationinthesamememoryobject,theapplicationscaninterferewitheachotherandfail. Youmightwanttoisolatesharedmemoryobjectstoensurethatvirtualapplicationsandsystemobjectscannot detecteachother. TheIsolatedMemoryObjectsparameterdoesnotappearinthePackage.inifilebutyoucanaddthe parameter.ThinAppsetsaninitialvaluethatisolatesthememoryobjectsthatanativeversionofInternet Explorerusesinthevirtualenvironment.Thevalueaddressesa conflictbetweentheexplorer.exeand iexplore.exeutilitieswhentheutilitiesmapsandboxfiles.YoucanusetheIsolatedMemoryObjects parametertoisolateadditionalnamedsharedmemoryobjectstoensurethattheobjectsarevisibleonlytoother virtualapplicationsusingthesamesandbox. TheIsolatedMemoryObjectsparameteracceptsalistofentriesthatareseparatedbythesemicolon(;). Each entrycancontainasterisk(*) andquestionmark(?)wildcardcharacterstomatchvariablepatterns.

Examples
YoucanmodifytheIsolatedMemoryObjectsparametertoisolatethememoryobjectwiththeMy Shared Objectnameandanymemoryobjectwithoutlookinthename.
[BuildOptions] IsolatedMemoryObjects=*outlook*;My Shared Object

IsolatedSynchronizationObjects
TheIsolatedSynchronizationObjectsparameterliststhesynchronizationobjectstoisolatefromother applications. Synchronizationobjectscoordinateactionsbetweenapplications.ThefollowingWindowssynchronization objectsmightappearinlogsforapplicationerrors:

OpenMutex CreateMutex OpenSemaphore CreateSemaphore OpenEvent CreateEvent

Iftheseobjectsappearinlogfiles,youmightisolatetheobjectsinthevirtualenvironmenttoavoidacollision withsynchronizationobjectsthatnativeapplicationscreate.Youcanisolatesynchronizationobjectsfrom applicationsthatdonotruninthesamevirtualnamespace.If twoapplicationssharethesamesandboxpath, theapplicationshavethesamenamespaceforisolatedsynchronizationobjects.Iftwoapplicationshavethe samesandboxnamebutdifferentsandboxpaths,theapplicationshaveseparatenamespaces. TheIsolatedSynchronizationObjectsparameterdoesnotappearinthePackage.inifilebutyoucan addtheparameter.ThinAppsetsaninitialvaluethatmakessynchronizationobjectsaccessibletoother applications.Virtualapplicationswithdifferentsandboxescandetectthesynchronizationobjects. TheIsolatedSynchronizationObjectsparameteracceptsalistofentriesthatareseparatedbythesemicolon(;). Eachentrycanusetheasterisk(*) andquestionmark(?)aswildcardcharacterstomatchvariablepatterns.

76

VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
YoucanmodifytheIsolatedSynchronizationObjectsparametertoisolatethesynchronizationobjectwith theMy Shared Objectnameandthesynchronizationobjectwithoutlookinthename.
[BuildOptions] IsolatedSynchronizationObjects=*outlook*;My Shared Object

NotificationDLLs
TheNotificationDLLsparametermakescallstothirdpartyDLLfilestoprovidenotificationofevents,such asapplicationstartuporshutdown.TheDLLscanresideonthephysicalfilesystemorthevirtualpackage. If ThinAppcannotloadaDLLfile,thepackagegenerateserrors. ThisparameterdoesnotappearinthePackage.inifile.ThinAppSDKuserscanaddthisparametertothefile.

Examples
YoucanmodifytheNotificationDLLsparametertomakecallstotheFirst.dllandSecond.dllfiles.
[BuildOptions] NotificationDLLs=First.dll;Second.dll

NotificationDLLSignature
TheNotificationDLLSignatureparameterworkswiththeNotificationDLLsparameterandverifiesthat aspecifiedDLLfilehasasignature.IftheDLLdoesnothaveasignature,ThinAppdoesnotloadthefile.

Example
YoucanmodifytheNotificationDLLSignatureparameterwithanasterisk(*)toensurethattheDLLfileis authenticodesigned.
[BuildOptions] NotificationDLLSignature=*

YoucansetanentitytoensurethattheDLLissignedbythatentity.
[BuildOptions] NotificationDLLSignature=VMware, Inc.

ObjectTypes
TheObjectTypesparameterspecifiesalistofvirtualCOMobjecttypesthatarevisibletootherapplicationsin thephysicalenvironment.Youcanusescripts,suchasVBScripts,tocallobjectsthatstartcapturedapplications. Anobjecttypeisregisteredtoonlyonenativeorvirtualapplicationatatime.IfyouinstallOffice2003onthe nativemachineandwanttouseavirtualOffice2007package,youmustdeterminewhethertohavethevirtual ornativeapplicationhandletheobjecttypes. IfyouwantthevirtualOffice2007tohandletheobjecttypes,youcanleavetheObjectTypessettinginthe Package.inifile,buildthepackage,andregisteritusingthethinreg.exeutility.Ifyouwantthenative Office2003tohandletheobjecttypes,youmustremovetheObjectTypessettingfromthePackage.inifile beforebuildingandregisteringthepackage.YoucannotaddrandomentriestotheObjectTypesparameter. Youcanonlyremoveentriesgeneratedbythecaptureprocess.

Examples
IfascriptoranativeapplicationcreatesanExcel.ApplicationCOMobjectorotherCOMobjectslistedin theObjectTypesparameter,ThinAppstartsthevirtualpackage.
[Microsoft Office Excel 2007.exe] ObjectTypes=Excel.Application;Excel.Application.12;Excel.Chart; Excel.Macrosheet;Excel.Sheet; Excel.Workspace

VMware, Inc.

77

ThinApp Users Guide

SandboxCOMObjects
TheSandboxCOMObjectsparameterindicateswhetherapplicationsinthephysicalenvironmentcanaccess COMobjectsthatthevirtualapplicationregistersatruntime. ThinAppsetsaninitialvaluethatpreventsnativeapplicationsinthephysicalenvironmentfromaccessing COMobjectsthatthevirtualapplicationregisters.ThinAppplacesCOMobjectsthatthevirtualapplication registersinthesandbox.

Examples
YoucanmodifytheSandboxCOMObjectsparametertomakevisibletheCOMobjectsthatthevirtual applicationregistersoutsidethesandbox.Forexample,ifyouinstallnativeMicrosoftOffice2003andvirtual MicrosoftOffice2007,andyourunacustommailmergeprograminthenativeenvironmentthatstarts MicrosoftWordandinstructsittoopen,change,andsaveadocument,youcangenerateMicrosoftWord2007 documentswhenvirtualMicrosoftWordisrunning.ThenativeapplicationcanaccessCOMobjectsfromthe virtualapplication.
SandboxCOMObjects=0

VirtualizeExternalOutOfProcessCOM
TheVirtualizeExternalOutOfProcessCOMparametercontrolswhetheroutofprocessCOMobjectscan runinthevirtualenvironment.COMobjectsthatareexternaltothevirtualenvironmentalwaysruninthe physicalenvironment. ThisparameteraddressedoutofprocessCOMobjectsthatarenotpartofaThinApppackageandarenot registeredinthevirtualregistry.ThinAppsetsaninitialvalueoftheVirtualizeExternalOutOfProcessCOM parametertorunexternaloutofprocessCOMobjectsinthevirtualenvironmenttoensurethatCOMobjects cannotmodifythehostcomputer.IfacompatibilityproblemexistswithanexternalCOMobjectrunningin thevirtualenvironment,youcancreateandrunCOMobjectsonthehostsystem.TorunonlyspecificCOM objectsoutsideofthevirtualenvironment,youcanusetheExternalCOMObjectsparametertolisttheCLSID ofeachCOMobject.

Examples
YoucanmodifytheVirtualizeExternalOutOfProcessCOMparametertorunallexternaloutofprocess COMobjectsinthephysicalenvironmentratherthanthevirtualenvironment.Forexample,youmightuse virtualMicrosoftAccess2003tosendemailthroughanativeIBMLotusNotessession.
[BuildOptions] VirtualizeExternalOutOfProcessCOM=0

Configuring File Storage


YoucanmodifyThinAppparameterstoconfigurefilestorageandsetupvirtualdrives. Forinformationaboutstoragerelatedtosandboxconfiguration,seeConfiguringSandboxStorageand InventoryNamesonpage 100.

CachePath
TheCachePathparametersetsthedeploymentsystempathtoacachedirectoryforfontfilesandstub executablefiles. Becauseofthefrequentuseoffontandstubexecutablefiles,ThinAppmustextractfilesinthecachequickly andplacethemonthephysicaldisk.Ifyoudeletethecache,ThinAppcanreconstructthecache.

78

VMware, Inc.

Chapter 5 Configuring Package Parameters

YoucanusetheTHINSTALL_CACHE_DIRenvironmentvariabletooverridetheCachePathparameterat runtime.IfyoudonotsettheTHINSTALL_CACHE_DIRenvironmentvariableortheCachePathparameter, ThinAppsetsaninitialvalueoftheCachePathparameterbasedontheSandboxPathparameteraccordingto thefollowingrules:

IftheSandboxPathparameterispresentinthePackage.inifileandusesarelativepath,theCachePath parameterusesthesandboxpathandstoresthecacheatthesamedirectorylevelasthesandbox. IftheSandboxPathparameterispresentinthePackage.inifileandusesanabsolutepath,orifthe SandboxPathparameterdoesnotexistinthePackage.inifile,theCachePathparameterusesthe %Local AppData%\Thinstall\Cachelocation.Thisplacesthecachedirectoryonthelocalmachine, regardlessoftheretheusertravelswiththesandbox.ThinAppcreatesaStubsdirectorywithinthecache.

Examples
YoucanmodifytheCachePathparametertouseanabsolutepath.
CachePath=C:\VirtCache

YoucansetarelativepaththatThinAppdetectsasthepathrelativetothedirectorywheretheapplication executablefileresides.IfthepackageresidesinC:\VirtAppsandtheCachePathparameterhasavalueof Cache,thecachedirectoryisC:\VirtApps\Cache.


CachePath=Cache

WhenyouuseaUSBdeviceandmovethesandboxontotheUSBdevice,youmightmovethecachetotheUSB devicetoavoidinterferingwiththelocalmachine.Inthisexample,thecacheandsandboxexistinthesame directorylevel.


CachePath=<sandbox_path>

UpgradePath
TheUpgradePathparameterspecifiesthelocationofinformationandfilesforApplicationSyncand sidebysideintegerupdates. ThedefaultUpgradePathlocationisthesamedirectoryasthatinwhichtheapplicationexecutablefileis locatedonthelocalmachine. TheApplicationSyncutilityaccumulateslogandcachefilesandconstructstheupdatedexecutablefileinthe UpgradePathlocation.ForinformationabouttheApplicationSyncutility,seeApplicationSyncUpdateson page 53. SidebysideintegerupdatinglooksforupdatedversionsoftheapplicationintheUpgradePathlocation.For informationaboutsidebysideupgrading,seeSidebySideUpgradingofRunningApplicationsona NetworkShareonpage 63.

Examples
Whenthedefaultlocationhaslimitedspace,suchasaUSBdevice,oryouwanttoisolateupgradesfromthe applicationexecutablefile,youcanmodifytheUpgradePathparametertospecifyanalternativelocationfor storageofsidebysideupdates.Theparametercanincludeenvironmentvariablesinthepathbutdoesnot supportfoldermacros.
[BuildOptions] UpgradePath=C:\Program Files\<my_app_upgrades>

VMware, Inc.

79

ThinApp Users Guide

VirtualDrives
TheVirtualDrivesparameterspecifiesadditionaldrivelettersthatareavailabletotheapplicationat runtime. ThinAppmakesthevirtualenvironmentresemblethephysicalcaptureenvironmentandmimicsthephysical drivesthatareavailableonthecapturesystem.ThinApprepresentsvirtualdrivesthroughthe VirtualDrivesparameterandaprojectfolder,suchas%drive_<drive_letter>%,thatcontainsthevirtual filesonthedrive.Thisprojectfoldercanresideinthereadonlyfilesystemofthepackageandinthesandbox whenwriteoperationscannotoccuronthephysicaldrive. TheVirtualDrivesparameterpresentsthedrivestotheapplicationatruntime.TheVirtualDrives parameterdisplaysmetadataaboutthedrive,suchasatheserialnumberandtypeofdrive.Forexample, ThinAppdetectsthephysicalC:driveonthecapturesystemandentersitintotheparameterasaFIXEDtype ofdrivewiththeserialnumber. TheVirtualDrivesparameterincludesthefollowinginformation:

DriveSinglecharacterbetweenAandZ. Serial8digithexnumber. TypeFIXED,REMOVABLE,CDROM,orRAMDISK.

FIXEDIndicatesfixedmedia. Forexample,aharddriveorinternalFlashdrive.

REMOVABLEIndicatesremovablemedia. Forexample,adiskdrive,thumbdrive,orflashcardreader.

CDROMIndicatesaCDROMdrive. RAMDISKIndicatesaRAMdisk.

Virtualdrivesareusefulwhenapplicationsrelyonhardcodedpathstodrivelettersthatmightnotbe availableonthedeploymentsystems.Forexample,legacyapplicationsmightexpectthattheD:driveisa CDROMandthatthedatafilesareavailableatD:\media. Virtualdrivesettingsoverridethephysicalpropertiesofthedriveonthephysicaldeploymentsystem.Ifthe VirtualDrivesparameterdefinesadrivetypeasCDROM,andthephysicaldriveisaharddisk,the applicationonthedeploymentsystemdetectsthatdriveasaCDROMdrive.

Isolation Modes for Virtual Drives


Virtualdrivesarevisibleonlytoapplicationsrunninginthevirtualenvironment.Virtualdrivesdonotaffect thephysicalWindowsenvironment.Virtualdrivesinheritisolationmodesfromthedefaultisolationmodeof theprojectunlessyouoverridethemodewitha##Attributes.inifileinthedrivefolderwithintheproject directory. Ifyoucopyfilestothe%drive_D%folderbeforebuildingtheapplication,youcanuseFullisolationmodefor thisdrive.Theapplicationalwaysreadsfromthevirtualdriveanddoesnottrytoreadfromany correspondingphysicalCDROMdriveonthedeploymentsystem. Ifyoudonotcopyfilestothe%drive_D%folderbeforebuildingtheapplication,youcanuseMergedor WriteCopyisolationmodesforvirtualdrivefoldersdependingonwhetheryouwanttoreadfromandwrite tothephysicaldriveonthedeploymentsystem. IfyouassignMergedisolationmodetoyourvirtualdrive,anywriteoperationstothatdrivefailifthatdrive doesnotexistonthephysicaldeploymentsystem.ThinAppdoesnotdirectchangestothesandboxbecause MergedisolationmodeinstructsThinApptowritetothephysicaldrive.Whentheapplicationcannotwriteto thephysicaldriveasdirected,thewriteoperationsfail. TheVirtualDrivesparameterdoesnotoverrideisolationmodesettings.Avirtualapplicationmightnot detectfilesonaphysicaldrivebecauseofisolationmodesettings.

80

VMware, Inc.

Chapter 5 Configuring Package Parameters

Modify Virtual Drive Isolation Modes


Youmightmodifyisolationmodesforvirtualdriveswhenyouwanttooverridethedefaultisolationmodeof theproject. Modify virtual drive isolation modes 1 2 Addthe%Drive_<letter>%directorytoyourThinAppproject. Createa##Attributes.inifilethatincludesanisolationmodeentryforthedriveletter.
[Isolation] DirectoryIsolationMode=<isolation_mode>

Placethe##Attributes.inifileinthe%Drive_<letter>%directory.

Examples
TheVirtualDrivesparameterisasinglestringthatcanholdinformationaboutmultipledriveletters,and optionalparametersforthosedriveletters.Theparameterusessemicolonstoseparateinformationassigned todifferentdrivelettersandcommastoseparateparametersforindividualdriveletters.ThinAppassignsa serialnumberandtheFIXEDtypetothedrive.
[BuildOptions] VirtualDrives= Drive=A, Serial=12345678, Type=REMOVABLE; Drive=B, Serial=9ABCDEF0, Type=FIXED

YoucanspecifytheX,D,andZvirtualdriveletters.
[BuildOptions] VirtualDrives=Drive=X, Serial=ff897828, Type=REMOVABLE; Drive=D, Type=CDROM; Drive=Z

DriveXisaremovablediskwiththeff797828serialnumber. DriveDisaCDROMdrivewithanassignedserialnumber. DriveZisaFIXEDdiskwithanassignedserialnumber.

Configuring Processes and Services


YoucanmodifyThinAppparameterstoconfigureprocessesandservicesthatmightspecifywriteaccesstoa nativeprocessorthestartupandshutdownofvirtualservices.

AllowExternalKernelModeServices
TheAllowExternalKernelModeServicesparametercontrolswhetherapplicationscancreateandrun nativekerneldriverservices.Theserviceexecutablefilemustexistonthephysicalfilesystem. ThinAppdoesnotdisplaythedefaultparameterinthePackage.inifilebutassignsaninitialvaluethat preventstheapplicationfromstartinganativeWindowskerneldriverservice.

Examples
YoucanaddtheAllowExternalKernelModeServicesparametertothePackage.inifileandmodifythe defaultvalueof0to1toallowtheapplicationtocreateoropenanativeWindowskerneldriverservice.
[BuildOptions] AllowExternalKernelModeServices=1

AllowExternalProcessModifications
TheAllowExternalProcessModificationsparameterdetermineswhethercapturedapplicationscanwrite toanativeprocess.Somevirtualizedapplicationsrequireamethodtointeractwithnativeapplications. ThinAppblocksanyattemptbythecapturedapplicationtoinjectitselfintoanativeapplication.Thecaptured applicationcanstillinjectitselfintovirtualapplicationsrunninginthesamesandbox.ThinAppdoesnot displaythedefaultparameterinthePackage.inifile.

VMware, Inc.

81

ThinApp Users Guide

WhenThinAppblocksacapturedapplicationfrominjectingitselfintoanativeapplication,LogMonitor generatestracelogsthatrefertotheAllowExternalProcessModificationsparameter.

Examples
YoucanaddtheAllowExternalProcessModificationsparametertothePackage.inifiletosupportwrite operationsfromvirtualprocessestonativeprocesses.Forexample,aspeechrecognitionapplicationmust injectitselfintonativeapplicationstovoicethetext.
[BuildOptions] AllowExternalProcessModifications=1

AllowUnsupportedExternalChildProcesses
TheAllowUnsupportedExternalChildProcessesparameterspecifieswhethertorun64bitchildprocesses inthephysicalenvironment.ThinAppruns64bitapplicationsinthephysicalenvironmentbecauseThinApp doesnotsupport64bitprocessesandcannotvirtualizea64bitapplication. ThinAppsetsaninitialvalueoftheAllowUnsupportedExternalChildProcessesparameterthatruns64bit applicationsinthephysicalenvironment.Youcanrun64bitchildprocesstasksonapplicationsthatrunon 64bitsystems.Runningtheprintspoolerisanexampleofa64bitchildprocesstask.

Examples
Toprotectthephysicalfilesystemfromanychanges,youcanmodifythe AllowUnsupportedExternalChildProcessesparameterandblockThinAppfromgenerating64bitchild processesoutsideofthevirtualenvironment.ThinAppcannotrunany64bitprocessesbecauseThinAppdoes notsupporttheprocessesinthevirtualenvironment.
[BuildOptions] AllowUnsupportedExternalChildProcesses=0

AutoShutdownServices
TheAutoShutdownServicesparametercontrolswhethertoshutdownvirtualserviceswhenthelast nonserviceprocessexits. ThinAppsetsaninitialvaluetostopvirtualserviceswhenthelastnonserviceprocessexits.Theparameter doesnotaffectservicesoutsidethevirtualcontext.

Examples
YoucanmodifytheAutoShutdownServicesparameterwhenyourunApacheWebServerandwanttokeep thevirtualservicerunningaftertheapplicationthatstartstheserviceexits.
[BuildOptions] AutoShutdownServices=0

AutoStartServices
TheAutoStartServicesparametercontrolswhethertostartthevirtualserviceswhenthefirstvirtual applicationstarts. ThinAppsetsaninitialvaluethatstartsthevirtualservicesthatareinstalledwiththestartuptypeof Automatic.Thevirtualservicesstartwhentheuserrunsthefirstparentprocess.

Examples
Whenapplicationsinstallaservicebutdonotuseit,you canmodifytheAutoStartServicesparameterto preventthestartofthevirtualserviceandsavetime.
[BuildOptions] AutoStartServices=0

82

VMware, Inc.

Chapter 5 Configuring Package Parameters

ChildProcessEnvironmentDefault
TheChildProcessEnvironmentDefaultparameterdetermineswhetherThinApprunsallchildprocessesin thevirtualenvironment. ThinAppcreatesallchildprocessesinthevirtualenvironment.Iftheprocessesareslow,youmightwantto movechildprocessestothephysicalenvironment.Asachildprocess,MicrosoftOutlookmightaffect performancewhenitcopiesthewholemailboxtothevirtualenvironment. YoucancreatespecificexceptionswiththeChildProcessEnvironmentExceptionsparameter. See ChildProcessEnvironmentExceptionsonpage 83.

Examples
Ifyoudonotwantthechildprocesstooperateinorslowdownthevirtualenvironment,youcanmodifythe ChildProcessEnvironmentDefaultparametertocreatechildprocessesinthephysicalenvironment.
[BuildOptions] ChildProcessEnvironmentDefault=External

ChildProcessEnvironmentExceptions
TheChildProcessEnvironmentExceptionsparameternotesexceptionstothe ChildProcessEnvironmentDefaultparameterwhenyouwanttospecifychildprocesses. WhenyousettheChildProcessEnvironmentDefaultparametertoVirtual,the ChildProcessEnvironmentExceptionsparameterliststheapplicationsthatrunoutsideofthevirtual environment.WhenyousettheChildProcessEnvironmentDefaultparametertoExternal,the ChildProcessEnvironmentExceptionsparameterliststheapplicationsthatruninthevirtualenvironment.

Examples
Youcanspecifyexceptionstorunningchildprocessesinthevirtualenvironment.Whenthevirtualapplication startsanotepad.exechildprocess,thechildprocessrunsoutsidethevirtualenvironment.
[BuildOptions] ChildProcessEnvironmentExceptions=AcroRd.exe;notepad.exe ChildProcessEnvironmentDefault=Virtual

Configuring Sizes
YoucanmodifyThinAppparameterstocompressfileandblocksizesforapplications.

BlockSize
TheBlockSizeparametercontrolsthesizeofcompressionblocksonlywhenThinAppcompressesfilesfora build. Alargerblocksizecanachievehighercompression.Largerblocksizesmightslowtheperformancebecause ofthefollowingreasons:

Thebuildprocessslowsdownwithlargerblocksizes. Thestartuptimeandreadoperationsforapplicationsslowdownwithlargeblocksizes. Morememoryisrequiredatruntimewhenyouuselargerblocksizes.

YoucanspecifytheBlockSizeparameterinthePackage.inifileandinthe##Attributes.inifile.Youcan usedifferentblocksizesfordifferentdirectorieswithinasingleproject.

VMware, Inc.

83

ThinApp Users Guide

Examples
Youcanincreasethedefaultsizeof64KBintheBlockSizeparametertoasupportedblocksizeof128KB, 256KB,512KB,or1MB.Youcanaddkafterthenumbertoindicatekilobytesormtoindicatemegabytes.
[Compression] BlockSize=128k

CompressionType
TheCompressionTypeparametercancompressallfilesinapackageexceptforPortableExecutablefiles. Youcancompressfileswhenyouhavealargepackageanddiskspaceisatoppriority.Compressionhasa quickrateofdecompressionandlittleeffectonmostapplicationstartuptimesandmemoryconsumptionat runtime.CompressionachievessimilarcompressionratiosastheZIPalgorithm. Table 51listssamplecompressionratiosandstartuptimesforaMicrosoft Office 2003packagethatrunsfrom alocalharddrive. Table 5-1. Sample Compression Ratios and Startup Times
Compression Type Size Compressionratio Startuptime(firstrun) Startuptime(secondrun) Buildtime(firstbuild) Buildtime(secondbuild) None 448,616KB 100% 6seconds 0.1seconds 3minutes 2minutes Fast 257,373KB 57% 6seconds 1seconds 19minutes 1.2minutes

Compressionhassomeperformanceconsequencesandcanaffectthestartuptimeonoldercomputersorin circumstanceswhereyoustarttheapplicationmultipletimesanddependontheWindowsdiskcacheto providedataforeachstart. TheCompressionTypeparameterdoesnotaffectMSIfiles.ForinformationaboutcompressingMSIfiles,see MSICompressionTypeonpage 85.

Examples
ThinAppsetsdefaultvaluesfortheOptimizeForparameterandtheCompressionTypeparameterthatwork togethertoachievemaximummemoryperformanceandstartuptime.ThinAppstoresalldatain uncompressedformat.
[Compression] CompressionType=None [BuildOptions] OptimizeFor=Memory

Youcanusethisconfigurationwhendiskspaceismoderatelyimportant.Thinappstoresexecutablefilesin uncompressedformatbutcompressesalltheotherdata.
[Compression] CompressionType=Fast [BuildOptions] OptimizeFor=Memory

Youcanusethisconfigurationwhendiskspaceisthetoppriority.ThinAppcompressesallfiles.
[Compression] CompressionType=Fast [BuildOptions] OptimizeFor=Disk

84

VMware, Inc.

Chapter 5 Configuring Package Parameters

MSICompressionType
TheMSICompressionTypeparameterdetermineswhethertocompressMSIfilesforpackagedistribution. CompressionimprovesperformancewhenopeningMSIfilesandusingtheThinAppSDK. IfyoucreateanMSIfileduringthecaptureprocess,ThinAppaddstheMSICompressionTypeparameterto thePackage.inifileandsetstheinitialvalueofFasttocompressthefile.Decompressionoccursatthetime ofinstallation. YoudonothavetosettheMSICompressionTypeparametertoFastwhenyousettheCompressionType parametertoFast.Settingbothparametersdoesnotincreasetheamountofcompression.

Examples
Ifyouareworkingwithlargebuildsandperformanceisnotapriority,youcanmodifythe MSICompressionTypeparametertopreventMSIfilecompression.
[Compression] MSICompressionType=none

OptimizeFor
TheOptimizeForparametercontrolswhethertocompressexecutablefilesortoreducememoryconsumption andpagefileusageontheharddrivetoimprovestartupperformance.Youcanusethisparameterwiththe CompressionTypeparametertocustomizethepackagesize,memoryallocation,andapplicationstartuptime. VMwarerecommendsleavingthedefaultsettingoftheOptimizeForparameterandtheCompressionType parametertoimprovestartupperformanceandmemoryconsumption.Youcanchangetheparameterstofavor smallerpackagesizeswhendisksizeisthepriorityconcern.ThinAppcompressesexecutablefilesonlywhen yousettheOptimizeForparametertoDiskandtheCompressionTypeparameterisFast.Executablefiles storedincompressedformatinsideapackagecanadverselyaffectperformanceandmemoryconsumption. WhenThinApploadsexecutablefilesfromcompressedformat,ThinAppcannotsharethefilememoryacross similarsuitesofapplicationsorwithotherusersinamultiuserenvironmentsuchasTerminalServer. WhenyouwanttocompressallthepackagefilesexceptforPortableExecutablefiles,youcanleavethedefault OptimizeForparameterandonlysettheCompressionTypeparameterisFast.Whenyouwanttocompress onlyMSIfiles,usetheMSICompressionTypeparameter.

Examples
VMwarerecommendsthedefaultconfigurationoftheOptimizeForparameterandtheCompressionType parametertomaximizeperformance.ThinAppstoresalldatainuncompressedformat.TheOptimizeFor parametercanbeineithertheCompressionsectionortheBuildOptionssectionofthe Package.inifile.
[Compression] CompressionType=None [BuildOptions] OptimizeFor=Memory

VMwarerecommendsthisconfigurationwhendiskspaceismoderatelyimportant.Thinappstoresexecutable filesinuncompressedformatbutcompressesalltheotherdata.
[Compression] CompressionType=Fast [BuildOptions] OptimizeFor=Memory

VMwarerecommendsthisconfigurationwhendiskspaceisthetoppriority.ThinAppcompressesallfiles.
[Compression] CompressionType=Fast [BuildOptions] OptimizeFor=Disk

VMware, Inc.

85

ThinApp Users Guide

Configuring Logging
YoucanmodifyThinAppparameterstopreventloggingactivityorcustomizethelocationofthelogfiles.

DisableTracing
TheDisableTracingparameterprevents.tracefilegenerationwhenyourunLogMonitorforsecurityand resourcepurposes. Youmightblockstandard.tracefilegenerationtohidetheapplicationhistoryfromauser.Inatesting environment,youmightturnofftracingforapplicationsthatyouknowworkproperly.Producingextra .tracefileswastesdiskspaceandCPUtime.

Examples
YoucansettheDisableTracingparametertopreventthegenerationof.tracefilesinLogMonitor.
[BuildOptions] DisableTracing=1

LogPath
TheLogPathparametersetsthelocationtostore.tracefilesduringloggingactivity. Thedefaultlocationisthesamedirectorythatstorestheapplicationexecutablefile.Youmightchangethe defaultlocationtofindadirectorywithmorespaceortoredirectthelogsfromaUSBdevicetotheclient computer.UnlikemostpathsinThinApp,thelogpathcannotcontainmacrossuchas%AppData%or%Temp%.

Examples
YoucansettheLogPathparametertostorelogfilesinC:\ThinappLogs.
[BuildOptions] LogPath=C:\ThinappLogs

Configuring Versions
ThinAppparametersprovideinformationabouttheversionsofapplicationexecutablefilesandThinApp.

CapturedUsingVersion
TheCapturedUsingVersionparameterdisplaystheversionofThinAppforthecaptureprocessand determinesthefilesystemmacrosthatThinAppmustexpand. DonotmodifyordeletethisparameterfromthePackage.inifile.ThinAppusesthisparameterforbackward compatibilityandtechnicalsupport.

Examples
TheCapturedUsingVersionparametermightdisplayThinAppversion4.0.02200.
[BuildOptions] CapturedUsingVersion=4.0.0-2200

StripVersionInfo
TheStripVersionInfoparameterdetermineswhethertoremoveallversioninformationfromthesource executablefilewhenThinAppbuildstheapplication.ThesourceexecutablefileisthefilelistedintheSource parameter. VersioninformationforexecutablefilesappearsinWindowsproperties.Propertiesinformationincludesthe copyright,trademark,andversionnumber.TheStripVersionInfoparametercanremovetheVersiontabof Windowsproperties.

86

VMware, Inc.

Chapter 5 Configuring Package Parameters

ThinAppsetsaninitialvalueoftheStripVersionInfoparameterthatcopiesallversioninformationfrom thesourceexecutablefile.

Examples
Inrarecases,youcanmodifytheStripVersionInfoparametertogenerateanapplicationwithoutversion information.Forexample,youmightwanttocircumventversiondetectionscansthatcompareversions againstadatabaseofoutdatedsoftware.
[app.exe] Source=%ProgramFilesDir%\myapp\app.exe StripVersionInfo=1

Version.XXXX
TheVersion.XXXXparameteroverridesapplicationversionstringsoraddsnewversionstringsintheVersion tabofWindowsproperties. Thecaptureprocessdoesnotgeneratethisparameter.YoucanaddthisparametertothePackage.inifile.

Examples
YoucansetanewproductnamewiththeVersion.XXXXparameter.YoumightwantThinApp Officerather thanOfficeastheproductname.UsetheVersion.<string_name>=<string_value>format.
[<app>.exe] Version.ProductName=ThinApp Office Version.Description=This Product is great!

Configuring Locales
YoucanuseThinAppparameterstoverifylocaleinformation.

AnsiCodePage
TheAnsiCodePageparameterdisplaysanumericalvaluethatrepresentsthelanguageoftheoperatingsystem onwhichyoucapturetheapplication.ThinAppusesthevaluetomanagemultibytestrings. Thisparameterdoesnotperformlanguagetranslation.Thevaluethataffectsthedisplayoftextstringsand useofthestringswithintheapplication.

Examples
Whentheoperatingsystemsofthedeployandcapturecomputershavedifferentlanguages,youmightcheck theAnsiCodePageparameter.
[BuildOptions] AnsiCodePage=1252

LocaleIdentifier
TheLocaleIdentifierparameterdisplaysanumericIDforthelocalethataffectslayoutandformatting. The valuelocatesthecorrectlanguageresourcesfromtheapplication. ThinApprunspackagesaccordingtotheregionalandlanguagesettingsofthecapturesystemratherthanthe settingsofthesystemthatrunspackages.Ifyoucaptureanapplicationthatrequiresalocaleformat,suchas adateformat,onasystemthatdoesnothavetherequiredformat,youcancommentoutthisparameterto ensurethattheapplicationcanrunonasystemthathasthesupportedformat.

VMware, Inc.

87

ThinApp Users Guide

Examples
WhentheregionallanguageoftheoperatingsystemisU.S.English,thecaptureprocesssetsthe LocaleIdentifierparameterto1033.
[BuildOptions] LocaleIdentifier=1033

LocaleName
TheLocaleNameparameterdisplaysthenameofthelocalewhenyoucaptureanapplicationon Microsoft Vista.

Examples
TheLocaleNameparametercandisplayaJapaneselocalename.
[BuildOptions] LocaleName=ja-JP

Configuring Individual Applications


YoucanmodifyThinAppparameterstoconfigurespecificapplications. Parametersspecifictoentrypointsfallunderthe[<application>.exe]sectionsofthePackage.inifile. For example,theentriesunder[Adobe Reader 8.exe]foranAdobeReaderapplicationmightaffect commandlineargumentsandapplicationshortcuts.

CommandLine
TheCommandLineparameterspecifiesthecommandlineargumentsthatstartashortcutexecutablefile.While theSourceparameterspecifiesthepathtotheshortcutexecutablefile,theCommandLineparameterspecifies thefilewiththerequiredoptionsorparameterstostartit. IftheStartmenushortcutfortheapplicationhascommandlineoptions,thecaptureprocesssetstheinitial valueoftheCommandLineparameterbasedonthoseoptions.Inraretroubleshootingcaseswithtechnical support,youmightalterthisparameter. Theoptionsandparametersfollowthebaseapplicationname.Dependingontheapplication,use/or-before theoptionorparameter.Usefoldermacrosforthepathnameconventions.

Examples
YoucanmodifytheCommandLineparameterwithanentrybasedonthe C:\Program Files\Mozilla Firefox\firefox.exe" -safe-modeStartmenushortcut.
CommandLine="C:\Program Files\Mozilla Firefox\firefox.exe" -safe-mode

Commandlineargumentscanusethe/<option> <parameter>format.
[<app>.exe] Source=%ProgramFilesDir%\<base_app>\<app>.exe Shortcut=<primary_data_container>.exe CommandLine="%ProgramFilesDir%\<base_app>\<app>.exe" /<option> <parameter>

Disabled
TheDisabledparameterdetermineswhethertheapplicationbuildtargetisonlyaplaceholderandprevents ThinAppfromgeneratingtheexecutablefileinthe/bindirectory. ThinAppenablesentrypointswhentheapplicationinstallerhasshortcutsonthedesktopandintheStart menu.WhenyoudonotselectanentrypointthatappearsintheSetupCapturewizard,ThinAppsetsaninitial valueoftheDisabledparameterthatpreventsthegenerationofthatapplicationexecutablefileduringthe buildprocess.

88

VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
Ifyoudonotselectthecmd.exe,regedit.exe,oriexplore.exetroubleshootingentrypointsduringthe captureprocess,andyoudevelopaneedtodebugtheenvironment,youcanmodifytheDisabledparameter togeneratetheseentrypoints.
[app.exe] Source=%ProgramFilesDir%\<my_app>\<app>.exe Disabled=0

ReadOnlyData
TheReadOnlyDataparameterspecifiesthenameofthereadonlyvirtualregistryfilecreatedduringthe applicationbuildanddesignatestheprimarydatacontainerforanapplication. Donotmodifythisparameter.ThePackage.inifiledisplaysthisparameterincaseyouwanttofindthe primarydatacontainer. Whentheprimarydatacontainerislessthan200MB,ThinAppstoresthecontainerwithinanentrypoint executablefile.Whentheprimarydatacontainerismorethan200MB,ThinAppstoresthecontainerasa.dat filethatcannotserveasanentrypointfortheapplication.

Examples
ThinAppsetstherequiredvalueoftheReadOnlyDataparameterthatspecifiesPackage.ro.tvrasthename ofthevirtualregistryfile.
ReadOnlyData=bin\Package.ro.tvr

ReserveExtraAddressSpace
TheReserveExtraAddressSpaceparameterindicatestheamountofextraaddressspacetoreserveforthe capturedexecutablefile. ThinAppusestheexecutablefilelistedintheSourceparametertodeterminetheamountofmemoryaddress spacetoallocateforanapplication.Whenyoubuildapackagethatincludesasourceexecutablefilethatisnot includedinthepackage,suchasacmd.exeentrypoint,oryouactivateautomaticupdatesforanapplication thatdirectsthenewversionoftheapplicationtothesandbox,ThinAppadjuststotheneedformorememory butdoesnotreserveasetamountofextraaddressspace.Inrarecasesthatmightinvolvetechnicalsupport, youcanusetheReserveExtraAddressSpaceparametertoaddmemoryspace.

Examples
YoucaninstructtheWindowsloadertoreserveextraaddressspace.AddKafterthenumbertoindicate kilobytesorMtoindicatemegabytes.
[<app>.exe] Source=%ProgramFilesDir%\<my_app>\<app>.exe ReserveExtraAddressSpace=512K

Shortcut
TheShortcutparameterpointsashortcutexecutablefiletotheprimarydatacontainerthatcontainsthe virtualfilesystemandvirtualregistry.Youcandistinguishaprimarydatacontainerfromotherentrypoints inthePackage.inifilebecausetheprimarydatacontainercontainstheReadOnlyDataentryandtheother entrypointscontaintheShortcutentry. To ensurethattheapplicationcanstart,theshortcutexecutablefilemustresideinthedirectorythatstoresthe primarydatacontainerfile.Forinformationabouttheprimarydatacontainer,seeReadOnlyDataon page 89. DonotmodifythevalueoftheShortcutparameter.ThinAppdetectstheprimarydatacontainerduringthe captureprocess.

VMware, Inc.

89

ThinApp Users Guide

Examples
ThinAppcanpointAcroRd32.exe,theshortcutexecutablefile,toAdobe Reader 8.exe,theprimarydata containerfile.
[AcroRd32.exe] Shortcut=Adobe Reader 8.exe Source=%ProgramFilesDir%\Adobe\Reader 8.0\Reader\AcroRd32.exe

ThinAppcanpointMicrosoft Office Word 2007.exe,theshortcutexecutablefile,toMicrosoft Office Enterprise 2007.dat,theprimarydatacontainerfile.


[Microsoft Office Word 2007.exe] Source=%ProgramFilesDir%\Microsoft Office\Office12\WINWORD.EXE Shortcut=Microsoft Office Enterprise 2007.dat

Shortcuts
TheShortcutsparameterliststhelocationswherethethinreg.exeutilitycreatesashortcuttoavirtual application. ThecaptureprocessdeterminesShortcutsentriesbasedontheshortcutstheapplicationinstaller implements.MSIfilesusetheShortcutsparametertodeterminetheshortcutstocreate.

Examples
YoucanmodifytheShortcutsparametertocreateashortcutintheMicrosoftOfficefolderoftheStartmenu totheMicrosoftWord 2003application.Ifyouaddshortcutlocations,usesemicolonstoseparatetheentries. Eachentrycancontainfoldermacros.
[Microsoft Office Word 2003.exe] ReadOnlyData=bin\Package.ro.tvr Source=%ProgramFilesDir%\Microsoft Office\OFFICE11\WINWORD.EXE Shortcuts=%Programs%\Microsoft Office

Source
TheSourceparameterspecifiestheexecutablefilethatThinApploadswhenyouuseashortcutexecutable file.Theparameterprovidesthepathtotheexecutablefileinthevirtualorphysicalfilesystem. ThinAppspecifiesthesourceforeachexecutablefile.Ifanapplicationsuitehasthreeuserentrypoints,such asWinword.exe,Powerpnt.exe,andExcel.exe,thePackage.inifileliststhreeapplicationentries.Each entryhasauniquesourceentry. IfThinAppcannotfindthesourceexecutablefileinthevirtualfilesystem,ThinAppsearchesthephysicalfile system.Forexample,ifyouusenativeInternetExplorerfromthevirtualenvironment,ThinApploadsthe sourceexecutablefilefromthephysicalfilesystem. TheSourceparameterandthe/bindirectoryintheprojectarenotrelatedtoeachother.The/bindirectory storesthegeneratedexecutablefileandtheSourcepathpointstotheinstalledexecutablefilestoredinthe readonlyvirtualfilesystem. DonotmodifytheSourcepath.Thecaptureprocessdeterminesthepathbasedonwheretheapplication installerplacestheexecutablefileinthephysicalfilesystemofthecapturemachine.ThinAppcreatesavirtual filesystempathbasedonthephysicalfilesystempath.

Examples
TheSourceparametercanpointtoanentrypointinC:\Program Files\<base_app>\<app>.exe.
[<app>.exe] Source=%ProgramFilesDir%\<base_app>\<app>.exe

90

VMware, Inc.

Chapter 5 Configuring Package Parameters

WorkingDirectory
TheWorkingDirectoryparameterdeterminesthefirstlocationinwhichanapplicationlooksforfilesand placesfiles. ThinAppdoesnotincludethisparameterbydefaultinthePackage.inifilebecauseThinappassumesthe workingdirectoryisthedirectorywheretheexecutablefileresides.ThetypicallocationinaThinApp environmentisonthedesktopofthedeploymentmachine. Youcansettheworkingdirectoryforindividualapplications.Theworkingdirectorycanexistinthevirtual filesystem,thesandbox,orthephysicalsystemdependingontheisolationmodesetting.Youcanusefolder macrosforthepathnameconventions. TheWorkingDirectoryparametersetstheinitialvalueoftheworkingdirectorybutthedirectoryisdynamic asyounavigatetootherlocations.

Examples
IfyouhaveanapplicationonaUSBdrive,youcanmodifytheWorkingDirectoryvaluefromthedefaultUSB locationtotheMy Documentsdirectoryonthedesktop.
[<app>.exe] WorkingDirectory=%Personal%

ThelocationoftheMy Documentsdirectorydependsontheisolationmodesetting.Tomaptheworking directorytotheMy Documentsdirectoryonthephysicalsystem,usetheMergedisolationmodesetting.Tomap theworkingdirectorytothesandboxonthelocalmachine,usetheWriteCopyorFullisolationmodesetting.

Configuring Dependent Applications with Application Link


TheApplicationLinkutilitykeepssharedcomponentsordependentapplicationsinseparatepackages.Inthe Package.inifile,youcanusetheOptionalAppLinksandRequiredAppLinksentriestodynamically combineThinApppackagesatruntimeonendusercomputers.Thisprocessenablesyoutopackage,deploy, andupdatecomponentpiecesseparatelyandkeepthebenefitsofapplicationvirtualization. ThinAppcanlinkupto250packagesatatime.Eachpackagecanbeanysize.Thelinksmustpointtothe primarydatacontainerofapackage. Sandboxchangesfromlinkedpackagesarenotvisibletothebasepackage.Forexample,youcaninstall AcrobatReaderasastandalonevirtualpackageandasalinkedpackagetothebaseFirefoxapplication.When youstartAcrobatReaderasastandaloneapplicationbyrunningthevirtualpackageandyouchangethe preferences,ThinAppstoresthechangesinthesandboxforAcrobatReader.WhenyoustartFirefox,Firefox cannotdetectthosechangesbecauseFirefoxhasitsownsandbox.Openinga.pdffilewithFirefoxdoesnot reflectthepreferencechangesthatexistinthestandaloneAcrobatReaderapplication. FormoreinformationabouttheApplicationLinkutility,seeApplicationLinkUpdatesonpage 56, OptionalAppLinksonpage 93,andRequiredAppLinksonpage 92.

Application Link Pathname Formats


TheApplicationLinkutilitysupportsthefollowingpathnameformats:

Pathnamescanberelativetothebaseexecutablefile.Forexample, RequiredAppLinks=..\SomeDirectoryresultsinC:\MyDir\SomeDirectorywhenyoudeploythe baseexecutablefiletoc:\MyDir\SubDir\ Dependency.exe. Pathnamescanbeabsolutepathnames.AnexampleisRequiredAppLinks=C:\SomeDirectory. PathnamescanuseanetworkshareoraUNCpath.Anexampleis RequiredAppLinks=\\share\somedir\Dependency.exe.

VMware, Inc.

91

ThinApp Users Guide

Pathnamescancontainsystemoruserenvironmentvariablesthatdynamicallyexpandtoaspecific locationforeachuserorcomputer.Anexampleis RequiredAppLinks=%MyEnvironmentVariable%\Package.dat. Theriskofusingenvironmentvariablesisthatausermightchangethevaluesbeforestartingthe applicationandcreateanApplicationLinkdependencyotherthantheonethattheadministratorsetup.

PathnamescancontainThinAppfoldermacros.Anexampleis RequiredAppLinks=%SystemSystem%\Package.dat. Pathnamescanincludespaces. Pathnamescanspecifymultiplelinksordependencieswithasemicolonthatseparatesindividual filenames.AnexampleisRequiredAppLinks=Dependency1.exe; Dependency2.exe;. Pathnamescancontainasteriskandquerywildcardcharacters(*and?)infilenamesanddirectorypaths. Forexample,RequiredAppLinks=WildPath*\WildFilename*.dat. Ifapathcontainingawildcardcharactermatchesmorethanonedirectoryinthefilesystem,each matchingdirectorynamewillbereturned,toenableadditionalpathorfilenamematching. Wildcardsthatareusedincombinationwithenvironmentvariablescanprovidepowerfulcustomized recursivesearchingfordependentapplications.Forexample, OptionalAppLinks=%HOMEPATH%\OfficePlugins\*\*.

RequiredAppLinks
TheRequiredAppLinksparameterspecifiesalistofrequiredpackagestoimporttothebasepackageat runtime.YoucanconfigurethisparameterinthePackage.inifileofthebasepackage. Iftheimportoperationforanydependentpackagefails,anerrormessageappearsandthebaseexecutablefile exits.YoucanusetheOptionalAppLinksparameterinsteadtocontinueevenwhenloaderrorsoccur.Ifyou useawildcardpatterntospecifyapackageandfilesdonotmatchthewildcardpattern,ThinAppdoesnot generateanerrormessage. Importingpackagesinvolvesthefollowingoperations:

RunningVBScriptsfromimportedpackages Startingautostartservicesfromimportedpackages Registeringfontsfromimportedpackages RelocatingSxSDLLfilesfromWindowsXPtoWindowsVista

Youmustcreatealinktotheprimarydatacontainerofapackage.Youcannotlinktoothershortcutpackages. Pathnamesareonthedeploymentmachinebecausethelinkingtakeseffectatruntimeontheclientmachine. Usesemicolonstoseparatethelinkedpackages.Forinformationaboutpathnameformats,seeApplication LinkPathnameFormatsonpage 91.

Examples
Ifyoupackagethe.NETframeworkinthedotnet.exepackageandyouhavea.NETapplication,youcan specifythattheapplicationneedstolinktothedotnet.exefilebeforeitcanstart.
RequiredAppLinks=C:\abs\path\dotnet.exe

Youcanspecifyarelativepath.
RequiredAppLinks=<relative_path>\dotnet.exe

YoucanspecifyaUNCpath.
RequiredAppLinks=\\server\share\dotnet.exe

YoucanuseThinAppfoldermacrosinthepathvalue.
RequiredAppLinks=%SystemSystem%\Package.dat

92

VMware, Inc.

Chapter 5 Configuring Package Parameters

Youcanuseenvironmentvariablesinthepathvalue.Theriskofusingenvironmentvariablesisthatauser mightchangethevaluesbeforestartingtheapplicationandcreateanApplicationLinkdependencyotherthan theonethattheadministratorsetup.


RequiredAppLinks=%MyEnvironmentVariable%\Package.dat

Youcanimportasinglepackagelocatedinthesamedirectoryasthebaseexecutablefile.
RequiredAppLinks=Plugin.exe

Youcanimportasinglepackagelocatedinasubdirectoryofthebaseexecutablefile.
RequiredAppLinks=plugins\Plugin.exe

Youcanimportallexecutablefileslocatedinthedirectoryforpluginfiles.IfThinAppcannotimportany executablefilebecausethefileisnotavalidThinapppackageorbecauseasecurityproblemexists,thebase executablefilefailstoload.


RequiredAppLinks=plugins\*.exe

Youcanimportallexecutablefileslocatedatthen:\pluginsabsolutepath.
RequiredAppLinks=n:\plugins\*.exe

YoucanexpandthePLUGINSenvironmentvariableandimportallexecutablefilesatthislocation.
RequiredAppLinks=%PLUGINS%\*.exe

Youcanloadtwospecifiedpluginfilesandalistofexecutablefileslocatedunderthepluginlocation.
RequiredAppLinks=plugin1.exe;plugin2.exe;plugins\*.exe

OptionalAppLinks
TheOptionalAppLinksparameterissimilartotheRequireAppLinksparameterbutignoreserrorsandstarts themainapplicationevenwhenanimportoperationfails. Youmustcreatealinktotheprimarydatacontainerofapackage.Youcannotlinktoothershortcutpackages. Pathnamesareonthedeploymentmachinebecausethelinkingtakeseffectatruntimeontheclientmachine. Youcanspecifyabsolutepaths,suchasC:\abs\path\dotnet.exe,relativepaths,suchas relpath\dotnet.exe,andUNCpaths,suchas\\server\share\dotnet.exe. RequiredAppLinksandOptionalAppLinksparametersusethesamesyntax.Forinformationaboutthe RequireAppLinksparameterandexamples,seeRequiredAppLinksonpage 92. WhenusingtheApplicationLinkutilityviatheOptionalAppLinksparameter,thebasepackageandlinked dependenciesmustbebuiltwiththesameversionofThinApp.Toupgradeolderpackagestoincludethelatest versionoftheThinAppruntime,usetherelink.execommandlineutilityincludedwithThinApp.

Configuring Application Updates with Application Sync


TheApplicationSyncutilitykeepsdeployedvirtualapplicationsuptodate.Whenanapplicationstarts, ApplicationSynccanqueryaWebservertodetermineifanupdatedversionofthepackageisavailable.Ifan updateisavailable,ThinAppdownloadsthedifferencesbetweentheexistingpackageandthenewpackage andconstructsanupdatedversionofthepackage. TheApplicationSyncutilitydownloadsupdatesinthebackground.Youcancontinuetouseanoldversionof theapplication.Iftheuserquitstheapplicationbeforethedownloadiscomplete,thedownloadresumeswhen thevirtualapplicationstartsagain.Whenthedownloadisfinished,ThinAppactivatesthenewversionthe nexttimetheapplicationstarts. YoumustuncommenttheAppSyncURLparametertoactivateallApplicationSyncparameters.Thefollowing entriesarethedefaultsettingsforApplicationSyncparameters:
AppSyncURL=https://example.com/some/path/PackageName.exe AppSyncUpdateFrequency=1d AppSyncExpirePeriod=30d AppSyncWarningPeriod=5d AppSyncWarningFrequency=1d

VMware, Inc.

93

ThinApp Users Guide

AppSyncWarningMessage=This application will become unavailable for use in AppSyncWarningPeriod days if it cannot contact its update server. Check your network connection to ensure uninterrupted service AppSyncExpireMessage=This application has been unable to contact its update server for AppSyncExpirePeriod days, so it is unavailable for use. Check your network connection and try again AppSyncUpdatedMessage= AppSyncClearSandboxOnUpdate=0

AppSyncClearSandboxOnUpdate
TheAppSyncClearSandboxOnUpdateparameterdetermineswhethertoclearthesandboxafteranupdate. ThinAppsetsaninitialvalueoftheAppSyncClearSandboxOnUpdateparameterthatkeepsthecontentsofthe sandbox.

Examples
YoucanmodifytheAppSyncClearSandboxOnUpdateparametertoclearthesandboxafterapplication updates.
AppSyncClearSandboxOnUpdate=1

AppSyncExpireMessage
TheAppSyncExpireMessageparametersetsthemessagethatappearswhentheconnectiontotheWebserver failsaftertheexpirationperiodendsandavirtualapplicationstarts.Theapplicationquitswhenthemessage appears.

Examples
ThinAppprovidesadefaultmessagefortheAppSyncExpireMessageparameter.
AppSyncExpireMessage=This application has been unable to contact its update server for <AppSyncExpirePeriod_value> days, so it is unavailable for use. Check your network connection and try again.

IfthevalueoftheAppSyncExpirePeriodparameterisinhoursorminutes,changethemessagetoindicate hoursorminutesratherthandays.

AppSyncExpirePeriod
TheAppSyncExpirePeriodparametersetstheexpirationofthepackageinminutes (m),hours (h),ordays (d). IfThinAppcannotreachtheWebservertocheckforupdates,thepackagecontinuestoworkuntilthe expirationperiodendsandtheuserclosesit.Evenaftertheexpirationperiodends,ThinApptriestoreachthe Webserverateachsubsequentstartupattempt.

Examples
Youcanpreventthepackagefromexpiringwiththedefaultnevervalue.
AppSyncExpirePeriod=never

AppSyncURL
TheAppSyncURLparametersetstheWebserverURLorfilesharelocationthatstorestheupdatedversionofan application.ThinAppchecksthislocationanddownloadstheupdatedpackage. ApplicationSyncworksovertheHTTP(unsecure),HTTPS(secure),andFileprotocols.PartoftheHTTPS protocolinvolvescheckingtheidentityoftheWebserver.Youcanincludeausernameandapasswordinthe AppSyncURLparameterforbasicauthentication.ThinAppadherestothestandardInternetExplorerproxy setting. YoumustuncommenttheAppSyncURLparametertoactivateallApplicationSyncparameters.

94

VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
YoucanassignanHTTPorHTTPSvaluetotheAppSyncURLparameteraccordingtothefollowingformat.
AppSyncURL=https://<site.com>/<path>/<primary_data_container_name>

Youcanspecifylocalandnetworkdrivepaths.Aprimarydatacontainercanbeeithera.exeor.datfile.
file:///C:/<path>/<primary_data_container_name>

YoucanuseaUNCpathandaccesslocationsofnetworkresources.
file://<server>/<share>/<path>/<primary_data_container_name>

AppSyncUpdateFrequency
TheAppSyncUpdateFrequencyparameterspecifieshowoftenThinAppcheckstheWebserverforapplication updates.Youcansettheupdatefrequencyinminutes (m),hours (h),ordays (d). ThinAppsetsaninitialvalueof1dthatconnectsapackagetotheWebserveronceadaytocheckforupdates. ThinAppdoesnotcheckforanupdatewhenanotherrunningapplicationsharesthesamesandbox.

Examples
YoucanmodifytheAppSyncUpdateFrequencyparameterwithavalueof0tosettheapplicationtocheckfor updateseverytimeyoustartit.
AppSyncUpdateFrequency=0

AppSyncUpdatedMessage
TheAppSyncUpdatedMessageparametersetsthemessagethatappearswhenanupdatedpackagefirststarts.

Examples
YoucanusetheAppSyncUpdatedMessageparametertoconfirmthattheapplicationisupdated.
AppSyncUpdatedMessage=Your application has been updated.

AppSyncWarningFrequency
TheAppSyncWarningFrequencyparameterspecifieshowoftenawarningappearsbeforethepackage expires.Youcanspecifyminutes (m),hours (h),ordays (d). ThinAppsetsaninitialvalueof1dthatsetsthewarningmessagetoappearonceaday.

Examples
YoucanmodifytheAppSyncWarningFrequencyparametertoconfigurethewarningtoappeareachtimethe applicationstarts.
AppSyncWarningFrequency=0

AppSyncWarningMessage
TheAppSyncWarningMessageparametersetsthemessagethatappearswhenthewarningperiodstarts.The firsttimeyoustarttheapplicationinthewarningperiod,awarningmessageappearsandThinApptriesto accesstheupdatefromtheserver.IfThinAppcannotupdatethepackage,ThinApptriesagaineverytimethe applicationstarts.ThewarningmessageappearsonlyaftereachAppSyncWarningFrequencyperiodexpires.

Examples
ThinAppincludesadefaultmessagefortheApplicationSyncutilitywarning.
AppSyncWarningMessage=This application will become unavailable for use in %%remaining_days%% day(s) if it cannot contact its update server. Check your network connection to ensure uninterrupted service.

The%%remaining_days%%variableisthenumberofdaysremaininguntiltheexpirationofthepackage.

VMware, Inc.

95

ThinApp Users Guide

IfthevalueoftheAppSyncWarningPeriodparameterisinhoursorminutes,changethemessagetoindicate hoursorminutesratherthandays.

AppSyncWarningPeriod
TheAppSyncWarningPeriodparametersetsthestartofthewarningperiodbeforeapackageexpires.Youcan specifyminutes (m),hours (h),ordays (d).Whenthewarningperiodstarts,ThinAppcheckstheWebserver everytimeanapplicationstartsandsetsthevalueoftheAppSyncUpdateFrequencyparameterto0.

Examples
ThedefaultperiodoftheAppSyncWarningPeriodparameterisfivedays.
AppSyncWarningPeriod=5d

Configuring MSI Files


YoucanmodifyThinAppparameterstoconfigureMSIfilesfordeploymentthroughdesktopmanagement systems. ForinformationaboutworkingwithMSIfiles,seeBuildinganMSIDatabaseonpage 43. InformationaboutcompressionofMSIfilesappearswithotherparametersthatcontrolfilesizes.See MSICompressionTypeonpage 85.

MSIArpProductIcon
TheMSIArpProductIconparameterspecifiestheiconstorepresenttheapplicationintheWindows Add or RemoveProgramsdialog.TheiconcanresideinICO,DLL,orexecutablefiles. Donotmodifythisparameter.IfanMSIpackagedoesnothaveanapplicationicon,theapplicationappears withagenericicon.

Examples
TheMSIArpProductIconparametercanspecifyaniconforMicrosoftOffice2007.Thisexampleusesanindex numbertopointtothefirsticoninsideaDLLfile.
MSIArpProductIcon=%Program Files Common%\Microsoft Shared\OFFICE12\ Office Setup Controller\OSETUP.DLL,1

The<icon_index_number>entryinthis MSIArpProductIcon=<path_to_icon_file>[,<icon_index_number>]formatisapplicableonlywhen multipleiconsareavailableinaDLLfileorexecutablefile.

MSIDefaultInstallAllUsers
TheMSIDefaultInstallAllUsersparametersetstheinstallationmodeoftheMSIdatabase.Youcaninstall a.msifileforallusersonacomputerandforindividualusers. ForinformationaboutforcinganMSIinstallationforeachuseroreachmachine,seeForceMSIDeployments forEachUserorEachMachineonpage 44. TheparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database.

96

VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
ThinAppsetsaninitialvaluefortheMSIDefaultInstallAllUsersparameterthatinstallstheMSIdatabase withshortcutsandfiletypeassociationsforalluserswhologintothecomputer.Theuserwhoinstallsthe databasemusthaveadministratorrights.Youcanusethisapproachtopushtheapplicationtodesktopsforall users.
[BuildOptions] MSIFilename=<my_msi>.msi MSIDefaultInstallAllUsers=1

AnindividualusercaninstalltheMSIdatabasewithshortcutsandfiletypeassociationsforonlythatuser.You donotneedadministratorrightsforanindividualuserinstallation.Usethisapproachwhenyouwanteach usertodeploytheapplicationseparately.


[BuildOptions] MSIFilename=<my_msi>.msi MSIDefaultInstallAllUsers=0

AnadministratorcaninstalltheMSIdatabaseforallusersonamachineoranindividualuserwithout administratorrightscaninstallthedatabaseforonlythatuser.
[BuildOptions] MSIFilename=<my_msi>.msi MSIDefaultInstallAllUsers=2

MSIFilename
TheMSIFilenameparametertriggersthegenerationofanMSIdatabaseandspecifiesitsfilename.OtherMSI parameterscanworkonlywhenyouuncommenttheMSIFilenameparameter. ThisparameterproducesaWindowsInstallerwiththespecifiedfilenameintheoutputdirectory.Youcan createanMSIfilewhenyouwanttodeliverpackagestoremotelocationsthroughdesktopmanagement systems.Unlikeexecutablefilesthatrequirethemanualuseofthethinreg.exeutility,MSIfilesautomatethe creationofshortcutsandfiletypeassociationsforeachuser. ThinAppcommentsouttheMSIFilenameparameterunlessyouspecifyMSIgenerationduringthecapture process.

Examples
TheinventorynameisthedefaultnameintheMSIFilenameparameter.
[BuildOptions] ;MSIFilename=<inventory_name>.msi

YoucangenerateanMSIfileduringthebuildprocessandreplacethefilenamewithyourownfilename.
[BuildOptions] MSIFilename=<my_msi>.msi

MSIInstallDirectory
TheMSIInstallDirectoryparameterspecifiestherelativepathoftheMSIinstallationdirectory.Thepathis relativeto%ProgramFilesDir%forinstallationsoneachmachineandrelativeto%AppData%forinstallations foreachuser. WhenyouinstalltheMSIdatabaseforallusers,ThinAppplacesapplicationsinthe C:\%ProgramFilesDir%\<InventoryName> (VMware ThinApp)directoryduringtheinstallationoneach machine. WhenyouinstalltheMSIdatabaseforindividualusers,ThinAppplacesapplicationsinthe C:\%AppData%\<InventoryName> (VMware ThinApp)directory. TheparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database.

VMware, Inc.

97

ThinApp Users Guide

Examples
IfyoudonotwanttheMSIInstallDirectoryparametertousealocationbasedontheinventoryname,you caninstalla.msifileintheC:\Program Files\<my_application>directory.
[BuildOptions] MSIFilename=<my_msi>.msi MSIInstallDirectory=<my_application>

MSIManufacturer
TheMSIManufacturerparameterspecifiesthemanufacturerorpackagingcompanyoftheMSIdatabaseand displaysthevalueintheWindowsAddorRemoveProgramsdialogbox. ThinAppsetstheinitialvalueoftheMSIManufacturerparametertothenameofthecompanythatyourcopy ofWindowsisregisteredto. TheparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database.

Examples
YoucanmodifytheMSIManufacturerparametertodisplaythenameofaspecificdepartment.Forexample, userscanseeadepartmentnameintheWindowsAddorRemoveProgramsdialogboxandcontactthehelp deskforthatdepartment.
[BuildOptions] MSIFilename=<my_msi>.msi MSIManufacturer=<department_or_company_name>

MSIProductCode
TheMSIProductCodeparameterspecifiesaproductcodefortheMSIdatabase.WindowsInstallerusesthe codetoidentifyMSIpackages. Thecaptureprocessgeneratesarandomanduniqueproductcodethatisnottakenfromtheapplication.The valuemustbeavalidGloballyUniqueIdentifier(GUID). The parameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database. DonotmodifytheMSIProductCodeparameter.

Examples
ThecaptureprocesscancreateanMSIfilewith590810CE65E63E0B08EF9CCF8AE20D0Eastheproduct code.
[BuildOptions] MSIFilename=<my_msi>.msi MSIProductCode={590810CE-65E6-3E0B-08EF-9CCF8AE20D0E}

MSIProductVersion
TheMSIProductVersionparameterspecifiesaproductversionnumberfortheMSIdatabasetofacilitate versioncontrol.ThisversionnumberisunrelatedtotheapplicationversionortheThinAppversion. ThinAppassignsaninitialversionof1.0.Thisversionappearsinthepropertiesofthedatabase. Whenyoudeployapackagetoamachinethatalreadyhasthepackageinstalled,WindowsInstallerchecksthe versionnumbersandblockstheinstallationofanolderversionoveranupdatedversion.Inthissituation,you mustuninstallthenewversion. TheMSIProductVersionparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationof aWindowsInstallerdatabase.

98

VMware, Inc.

Chapter 5 Configuring Package Parameters

Examples
YoucanchangethevalueoftheMSIProductVersionparameterwhenyouchangetheMSIpackage.Avalue of2.0causesThinApptouninstalla1.0versionofthepackageandinstallthe2.0versionofthepackage.
[BuildOptions] MSIFilename=<my_msi>.msi MSIProductVersion=2.0

TheformatoftheMSIProductVersionvalueisX.Y.Z.ThevaluesofXandYrangefrom0to255,andthevalue ofZrangesfrom0to65536.

MSIRequireElevatedPrivileges
TheMSIRequireElevatedPrivilegesparameterappliestoWindowsVistaandspecifieselevatedprivilege requirementsfortheMSIdatabase. MostuserswhologintoWindowsVistahaverestrictedprivileges.ToinstallMSIpackagesforalluserswho musthaveshortcutsandfiletypeassociations,theusersmusthaveelevatedprivileges. ThinAppsetsaninitialvalueoftheMSIRequireElevatedPrivilegesparameterthatmarkstheMSI databaseasrequiringelevatedprivileges.IfyoursystemissetupforUACprompts,aUACpromptappears whenyouinstallanapplication. TheparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database.

Examples
YoucanmodifytheMSIRequireElevatedPrivilegesparametertoblocktheUACpromptandthe installationacrossallcomputers.
[BuildOptions] MSIFilename=<my_msi>.msi MSIRequireElevatedPrivileges=0

MSIUpgradeCode
TheMSIUpgradeCodeparameterspecifiesacodefortheMSIdatabasethatfacilitatesupdates.Whentwo packages,suchastheversion1.0packageandtheversion2.0package,havethesameupgradecode,theMSI installerdetectsthislink,uninstallstheearlierpackage,andinstallstheupdatedpackage. Thecaptureprocessgeneratesarandomupgradecodebasedontheinventoryname.ToensurethattheMSI databaseversionshavethesameupgradecode,keepthesameinventorynameacrossversionsoftheMSI wrapper.Forinformationabouttheinventoryname,seeInventoryNameonpage 100. TheparameterworksonlywhentheMSIFilenameparameterrequeststhegenerationofaWindowsInstaller database. DonotmodifytheUpgradeCodevalueunlessthenewvalueisavalidGUID.

Examples
ThecaptureprocesscancreateanMSIfilewithD89F1994A24B3E110C947FD1E13AB93Fastheupgrade code.
[BuildOptions] MSIFilename=mymsi.msi MSIUpgradeCode={D89F1994-A24B-3E11-0C94-7FD1E13AB93F}

VMware, Inc.

99

ThinApp Users Guide

MSIStreaming
TheMSIStreamingparameterdeterminestheuseof.cabfilesthatcanaffectapplicationperformance. ThinAppsetsaninitialvaluethatcompressesthepackagefilesina.cabfileandmakesiteasiertomovethe file.The .cabfileisintheMSIfile. ThedefaultsettingisMSIStreaming=0.Withthisvalue,thepackaged .exefilesand .datfilesare compressedinthe .cabfile.DisablingtheparameterinPackage.inihasthesameeffectassettingthevalue toO.WhentheMSIruns,thepackagedfilesareextractedtotheProgram FilesfolderoftheWindows operatingsystem,andregisteredeithertotheuserorthesystem,dependingonotherPackage.inisettings. SettingtheparametervalueMSIStreaming=1,resultsinthepackaged .exefilesand .datfilesbeing excludedfromthe .cabfile,andsubsequentlyfromthe .msifile.Thisvalueenablesachoicetobemade duringdeploymentbetweenregisteringtheapplicationfromanetworkshareorinstallingittheProgram FilesfolderoftheWindowsoperatingsystem. Ifyousetthisvalue,ensurethatboththeMSIandthe.exeand.datfilesoftheThinApppackageareavailable onthenetworkshare.

Examples
YoucanmodifytheMSIStreamingparametertoavoida.cabfilewhenitslowsdowntheinstallationprocess forapplications.YoucandistributetheMSIfileandindividualexecutablefilesinthe/bindirectorytoinstall theapplication.
[BuildOptions] MSIStreaming=1

Configuring Sandbox Storage and Inventory Names


YoucanmodifyThinAppparameterstoconfigurethesandboxwhereallchangesthatthecapturedapplication makesarestored.TheThinAppinventorynamemightaffecttheneedtochangethesandboxname. Formoreinformationaboutthesandboxplacementandstructure,seeChapter 6,LocatingtheThinApp Sandbox,onpage 103.

InventoryName
TheInventoryNameparameterisastringthatinventorytrackingutilitiesuseforpackageidentification. This parameterdeterminesthedefaultnamesoftheprojectfolderandsandboxduringtheapplicationcapture process. TheapplicationcaptureprocesssetsadefaultvaluefortheInventoryNameparameterbasedonnewstrings createdunderoneofthefollowinglocations:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Thethinreg.exeutilityandThinAppMSIfilesreferencetheinventorynametodeterminetheproductname fordisplayintheAddorRemoveProgramscontrolpanel.Forexample,iftheinventorynameisSuperAppand youinstallanMSIfileorregisterapackagewiththethinreg.exeutility,theAddorRemoveprogramslist displaysaninstalledapplicationwiththeSuperApp (VMware ThinApp)string.ThinAppappendsVMware ThinApptotheinventorynametodistinguishapplicationsthatarevirtualizedduringinventoryscans. Youcanusethesameinventorynameacrossdifferentversionsofthesameapplicationtoensurethatonlythe mostrecentversionappearsinAddorRemoveProgramslist.Theapplicationsoverwriteeachotherinthe AddorRemoveProgramslistandpreventyoufromuninstallingalloftheregisteredpackages.Touninstall morethanoneversion,useadifferentinventorynameforeachversion.Forexample,useMicrosoftOffice2003 andMicrosoftOffice2007asinventorynamesratherthanjustMicrosoftOffice.Whenyoumaintaindifferent versionsofavirtualapplicationinthesameenvironment,youmightwanttochangetheSandboxName parametertoensurethatanewversionhasisolatedusersettingsinadifferentsandbox.

100

VMware, Inc.

Chapter 5 Configuring Package Parameters

Ifyouhaveapackagethatincludesotherapplications,youmightupdatetheinventorynamemanuallyto reflectthetruecontentsofthepackage.Forexample,ifyoucapturetheSuperAppapplicationandthepackage includesJavaRuntime,theInventoryNamevaluemightappearasJava Runtime Environment 1.5instead ofSuperApp.TheAddorRemoveProgramslistdisplaysthefirstapplicationinstalledwithinthepackage.

Examples
YoucanmodifytheInventoryNameparametertoMicrosoftOffice2003.
[BuildOptions] InventoryName=Microsoft Office 2003

RemoveSandboxOnExit
TheRemoveSandboxOnExitparameterdeletesthesandboxandresetstheapplicationwhenthelastchild processexits. ThinAppstoresallapplicationchangestotheregistryandfilesystemlocationswithWriteCopyorFull isolationmodeinthesandbox.ThinAppsetsaninitialvalueoftheRemoveSandboxOnExitparameterthat maintainsconsistentsettingsforthesandboxdirectoryacrossmultipleapplicationruns. Iftheapplicationcreateschildprocesses,ThinAppdoesnotdeletethesandboxuntilallchildprocessesexit. Applicationsmightbedesignedtoleavechildprocessesinplacethatcanblockthecleanupoperation. For example,MicrosoftOffice2003leavesthectfmon.exeprocess.Youcanuseascripttoendthe ctfmon.exeprocessandchildprocessestoforcethecleanupoperationtooccur. YoucandecideatruntimewhethertousetheRemoveSandboxOnExitscriptAPIfunctiontodeletethe sandboxonexit.

Examples
YoucanmodifytheRemoveSandboxOnExitparametertodeletethesandboxwhentheapplicationexits.When multipleusersshareanapplicationunderoneusername,youcandeletethesandboxtoeliminatetheprevious usersregistryandfilesystemchanges.
[BuildOptions] RemoveSandboxOnExit=1

SandboxName
TheSandboxNameparameterspecifiesthenameofthedirectorythatstoresthesandbox. Thinappsetsaninitialvaluethatusestheinventorynameasthesandboxname. Whenyouupgradeanapplication,thesandboxnamehelpsdeterminewhetheruserskeeppreviouspersonal settingsorrequirenewsettings.Changingthesandboxnamewithnewdeploymentsaffectstheneedtocreate asandboxwithdifferentsettingsorkeepthesamesandbox.

Examples
Whenyouupdateanapplicationandwanttousenewuserpreferencesfortheapplication,youcanmodifythe SandboxNameparametertoreflecttheupdatedversion.
[BuildOptions] SandboxName=My Application 2.0

SandboxNetworkDrives
TheSandboxNetworkDrivesparameterdetermineswhetherThinAppdirectswriteoperationstoanetwork driveortothesandbox,regardlessofisolationmodesettings. Whenyouusethisparametertodirectwriteoperationstonetworkdrives,theresultisthesameassettingthe isolationmodeforthedrivetoMergedmode.

VMware, Inc.

101

ThinApp Users Guide

Examples
Whenyouwanttosavespaceorsharefilesforcollaborativework,leavethedefaultsettingofthe SandboxNetworkDrivesparametertodirectwriteoperationstonetworkdriveswithoutstoringchangesina sandbox.
[BuildOptions] SandboxNetworkDrives=0

Youcanstorechangesinthesandboxandpreventtheuserfrommakingchangestonetworkdrives.
[BuildOptions] SandboxNetworkDrives=1

SandboxPath
TheSandboxPathparameterdeterminesthepathtothesandbox. Thepathtothesandboxcanberelativeorabsolute,canincludefoldermacrosorenvironmentvariables,and canexistonanetworkdrive.ForadvancedinformationabouthowThinAppsetsaninitialsandboxlocation orsearchesforthesandbox,seeSearchOrderfortheSandboxonpage 103. YoumightworkwiththeSandboxPathparametertoaddresslocal,USBdrive,ornetworkneeds,toaddress spacelimitationsintheinitialsandboxlocation,ortomovethesandboxtothedesktopfortroubleshooting purposes. ThesandboxpathdoesnotincludethesandboxnamebecausetheSandboxNameparameterdeterminesthat name.

Examples
YoucanmodifytheSandboxPathparametertocreatethesandboxinthesamedirectoryastheexecutablefile. IfMozilla Firefox 3.0isthevalueoftheSandboxNameparameter,youcancreatetheMozilla Firefox 3.0sandboxinthesamedirectorythatFirefoxrunsfrom.
[BuildOptions] SandboxPath=.

Youcancreatethesandboxinasubdirectorysubordinatetotheexecutablefilelocation.
[BuildOptions] SandboxPath=LocalSandbox\Subdir1

Youcancreatethesandboxinthe%AppData%folderoftheuserundertheThinstalldirectory.
[BuildOptions] SandboxPath=%AppData%\Thinstall

Youcanstorethesandboxonamappeddrivetobackupthesandboxortokeepapplicationsettingsforusers whologintoanymachine.IfMozilla Firefox 3.0isthevalueoftheSandboxNameparameter,youcan createthesandboxinZ:\Sandbox\Mozilla Firefox 3.0.


[BuildOptions] SandboxPath=Z:\Sandbox

SandboxRemovableDisk
TheSandboxRemovableDiskparameterdetermineswhethertheapplicationcanwriteremovabledisk changestothedisksortothesandbox.RemovabledisksincludeUSBflashdevicesandremovableharddrives. ThinAppsetsaninitialvaluethatinstructstheapplicationtowriteremovablediskfilechangestothedisk.

Examples
Tosavespace,youcanmodifytheSandboxRemovableDiskparametertodirectremovablediskchangestothe sandbox.Dependingontheisolationmodefortheremovabledisk,changestofilesstoredonthediskcan resideinthesandboxorontheremovabledisk.
[BuildOptions] SandboxRemovableDisk=1

102

VMware, Inc.

Locating the ThinApp Sandbox

Thesandboxisthedirectorywhereallchangesthatthecapturedapplicationmakesarestored.Thenexttime youstarttheapplication,thosechangesareincorporatedfromthesandbox.Whenyoudeletethesandbox directory,theapplicationrevertstoitscapturedstate. Thisinformationincludesthefollowingtopics:


SearchOrderfortheSandboxonpage 103 ControllingtheSandboxLocationonpage 105 SandboxStructureonpage 106

Search Order for the Sandbox


Duringstartupofthecapturedapplication,ThinAppsearchesforanexistingsandboxinspecificlocationsand inaspecificorder.ThinAppusesthefirstsandboxitdetects.If ThinAppcannotfindanexistingsandbox, ThinAppcreatesoneaccordingtocertainenvironmentvariableandparametersettings.Reviewthesearch orderandsandboxcreationlogicbeforechangingtheplacementofthesandbox. ThesearchorderusesMozillaFirefox3.0asanexamplewiththefollowingvariables:

<sandbox_name>isMozillaFirefox3.0 TheSandboxNameparameterinthePackage.inifiledeterminesthename.See SandboxNameon page 101.

<sandbox_path>isZ:\sandboxes TheSandboxPathparameterinthePackage.inifiledeterminesthepath.See SandboxPathon page 102.

<exe_directory>isC:\Program Files\Firefox Theapplicationrunsfromthislocation.

<computer_name>isJOHNDOECOMPUTER %AppData%isC:\Documents and Settings\JohnDoe\Application Data ThinApprequeststheApplication Datafolderlocationfromtheoperatingsystem.Thelocation dependsontheoperatingsystemorconfiguration.

VMware, Inc.

103

ThinApp Users Guide

ThinAppstartsthesandboxsearchbytryingtofindthefollowingenvironmentvariablesinthisorder:

%<sandbox_name>_SANDBOX_DIR% Thisenvironmentvariablechangesthesandboxlocationforspecificapplicationsonthecomputer. For example,iftheMozilla Firefox 3.0_SANDBOX_DIRenvironmentvariableexists,itsvalue determinestheparentdirectorysandboxlocation.Ifthevalueisz:\FirefoxSandboxbeforeyourunthe application,ThinAppstoresthesandboxinz:\FirefoxSandbox.JOHNDOE-COMPUTERifthedirectory alreadyexists.Ifthedirectorydoesnotexist,ThinAppcreatesasandboxinz:\FirefoxSandbox.

%THINSTALL_SANDBOX_DIR% Thisenvironmentvariablechangesthelocationofallsandboxesonacomputer.Forexample,ifthe THINSTALL_SANDBOX_DIRenvironmentvariableexists,itsvaluedeterminestheparentdirectorysandbox location.Ifthevalueisz:\MySandboxesbeforeyouruntheapplication,ThinAppcreatesasandboxin z:\MySandboxes.

IfThinAppdoesnotdetectthe%<sandbox_name>_SANDBOX_DIR%or%THINSTALL_SANDBOX_DIR% environmentvariable,ThinAppchecksforthefollowingfilesystemdirectoriesandcreatesasandboxinthe firstdirectoryitdetects:

<exe_directory>\<sandbox_name>.<computer_name> Forexample,C:\Program Files\Firefox\Mozilla Firefox 3.0.JOHNDOE-COMPUTER

<exe_directory>\<sandbox_name> Forexample,C:\Program Files\Firefox\Mozilla Firefox 3.0

<exe_directory>\Thinstall\<sandbox_name>.<computer_name> Forexample,C:\Program Files\Firefox\Thinstall\Mozilla Firefox 3.0.JOHNDOE-COMPUTER

<exe_directory>\Thinstall\<sandbox_name> Forexample,C:\Program Files\Firefox\Thinstall\Mozilla Firefox 3.0

<sandbox_path>\<sandbox_name>.<computer_name> Forexample,Z:\sandboxes\Mozilla Firefox 3.0.JOHNDOE-COMPUTER

<sandbox_path>\<sandbox_name> Forexample,Z:\sandboxes\Mozilla Firefox 3.0

%AppData%\Thinstall\<sandbox_name>.<computer_name> Forexample,C:\Documents and Settings\JohnDoe\Application Data\Thinstall\Mozilla Firefox 3.0.JOHNDOE-COMPUTER

%AppData%\Thinstall\<sandbox_name> Forexample,C:\Documents and Settings\JohnDoe\Application Data\Thinstall\Mozilla Firefox 3.0

IfThinAppdoesnotdetectthe%<sandbox_name>_SANDBOX_DIR%or%THINSTALL_SANDBOX_DIR% environmentvariable,anddoesnotdetectthespecifiedfilesystemdirectories,ThinAppcreatesasandbox usingthefollowingguidelinesinthisorder:


IftheSANDBOXPATHPackage.iniparameterisset,thevaluedeterminesthesandboxlocation. IfThinAppcompletesthesandboxsearchwithoutanyresults,ThinAppcreatesasandboxinthedefault %AppData%\Thinstalldirectoryoftheuser.

NOTEOnlyonecomputeratatimecanuseasharedsandbox.Ifacomputerisalreadyusingasandbox, ThinAppcreatesanewsandboxtoallowyoutocontinueworkinguntilthepreviouscopyofthesandbox closes.

104

VMware, Inc.

Chapter 6 Locating the ThinApp Sandbox

Controlling the Sandbox Location


ThesetupcaptureprocessaddstheSandboxNameparametertothePackage.inifile.IfyoucaptureFirefox andMozilla Firefox 3.0isthevalueofthisparameter,thedefaultlocationofthesandboxforthe applicationis%AppData%\Thinstall\Mozilla Firefox 3.0.Thetypical%AppData%locationis C:\Documents and Settings\<user_name>\Application Data.%AppData%isoftenmappedtoashared networkdrive.

Store the Sandbox on the Network


YoucanusetheSandboxPathparametertostorethesandboxonamappeddrive.Anetworklocationisuseful forbackingupthesandboxandforuserswhologintoanymachineandkeeptheirapplicationsettings.For moreinformationabouttheSandboxPathparameter,seeSandboxPathonpage 102. Store the sandbox on a mapped drive 1 2 OpenthePackage.inifile. UndertheSandboxNameparameter,settheSandboxPathparametertothenetworklocation.
SandboxName=Mozilla Firefox 3.0 SandboxPath=Z:\Sandbox

Forexample,ifMozilla Firefox 3.0isthevalueoftheSandboxNameparameter,thecapturedFirefox applicationcreatesthesandboxinZ:\Sandbox\Mozilla Firefox 3.0.

Store the Sandbox on a Portable Device


YoucanusetheSandboxPathparametertosetaportabledevicelocationforthesandbox.Youcanuseany portabledevice,suchasaUSBdrive,thatappearsasadiskdriveintheMy Computersystemfolder.Aportable devicelocationisusefultokeepthesandboxdataonthedevicewheretheapplicationresides. FormoreinformationabouttheSandboxPathparameter,seeSandboxPathonpage 102. Store the sandbox in the same directory on a USB drive where the executable file resides 1 2 OpenthePackage.inifile. UndertheSandboxNameparameter,settheSandboxPathparametertothisvalue.
SandboxName=Mozilla Firefox 3.0 SandboxPath=.

Forexample,ifMozilla Firefox 3.0isthevalueoftheSandboxNameparameter,thecapturedFirefox applicationcreatestheMozilla Firefox 3.0sandboxinthesamedirectorythatFirefoxrunsfrom.

Store the Sandbox in a Thinstall Directory on a USB Drive at the Same Level as the Executable File
ThesandboxinaThinstalldirectorylocatedonaUSBdrivemustbestoredatthesamelevelatwhichthe executablefileisstored. Store the sandbox in a Thinstall directory on a USB drive at the same level as the executable file 1 2 Ifthe%THINSTALL_SANDBOX_DIR%or%<sandbox_name>_SANDBOX_DIR% environmentvariablesareset, unsetthevariables. Ontheportabledevice,createaThinstalldirectoryinthesamedirectoryasyourcapturedapplication. Thenexttimethepackagedapplicationstartsfromtheportabledevice,theapplicationcreatesasandbox intheThinstalldirectory. 3 Iftheapplicationandsandboxoriginallyranfromanotherlocation,suchasacomputer,andyouneedthe samesandboxonaportabledevice,copytheThinstalldirectoryfrom%AppData%tothedirectorywhere theexecutablefileresidesonthedevice. ThinAppnolongerusesthesandboxintheoriginallocation.

VMware, Inc.

105

ThinApp Users Guide

Sandbox Structure
ThinAppstoresthesandboxusingafilestructurealmostidenticaltothebuildprojectstructure.ThinAppuses macronamesforshellfolderlocations,suchas%AppData%,insteadofhardcodedpaths.Thisstructureenables thesandboxtomigratetodifferentcomputersdynamicallywhentheapplicationrunsfromnewlocations. Thesandboxincludesvirtualregistryfilesthatareconfiguredtoensurethatdatacorruptiondoesnotoccurif anapplicationintentionallyorunintentionallyterminates. Thesandboxcontainsthefollowingregistryfiles:

Registry.rw.tvrContainsallregistrymodificationsthattheapplicationmakes. Registry.rw.lckPreventsothercomputersfromsimultaneouslyusingaregistrylocatedonanetwork share. Registry.tvr.backupContainsabackupofthe.tvrfilethatThinAppuseswhentheoriginal.tvr fileiscorrupted. Registry.rw.tvr.transactRealtimecachethatcontainsalltransactionsfromthetimethattheyare written,regardlessofwhethertheyarecommittedtotherealregistryfile. Registry.tlog.cacheRealtimecachethatcontainsalltransactionsthatarenotyetcommittedtothe realregistryfile. Registry.tlogTransactionlogthatcontainsalltransactionsduringtheperiodthattheyarebeing writtentotherealregistrylog.Followingsuccessfulwritingtotherealregistrylog,thetransactionsare removedfromthisfile.

Inadditiontotheseregistryfiles,thesandboxcontainsdirectoriesthatinclude%AppData%, %ProgramFilesDir%,and%SystemRoot%.Eachofthesefolderscontainsmodificationstorespectivefolders inthecapturedapplication.

Making Changes to the Sandbox


ThinAppstoresfilesysteminformationinthevirtualregistry.ThevirtualregistryenablesThinAppto optimizefilesystemaccessinthevirtualenvironment.For example,whenanapplicationtriestoopenafile, ThinAppdoesnothavetoconsulttherealfilesystemfortherealsystemlocationandagainforthesandbox location.Instead,ThinAppcancheckfortheexistenceofthefilebyconsultingonlythevirtualregistry.This abilityincreasestheThinAppruntimeperformance. VMwaredoesnotsupportmodifyingoraddingfilesdirectlytothesandbox.Ifyoucopyfilestothesandbox directory,thefilesarenotvisibletotheapplication.Ifthefilealreadyexistsinthesandbox,youcanoverwrite andupdatethefile.VMwarerecommendsthatyouperformallmodificationsfromtheapplicationitself.

Listing Virtual Registry Contents with vregtool


Becausethesandboxcontainsthemodificationstotheregistry,youmightneedthevregtoolutilitytoview modifiedvirtualregistrychanges.YoumusthaveaccesstothevregtoolutilityinC:\Program Files\VMware\VMware ThinApp. Asamplecommandtolistthecontentsofavirtualregistryfileisvregtool registry.rw.tvr printkeys.

106

VMware, Inc.

Creating ThinApp Snapshots and Projects from the Command Line

Thesnapshot.exeutilitycreatesasnapshotofacomputerfilesystemandregistryandcreatesaThinApp projectfromtwopreviouslycapturedsnapshots.Youdonothavetostartthesnapshot.exeutilitydirectly becausetheSetupCapturewizardstartsit.Onlyadvancedusersandsystemintegratorswhoarebuilding ThinAppcapabilityintootherplatformsmightmakedirectuseofthisutility. Creatingasnapshotofacomputerfilesystemandregistryinvolvesscanningandsavingacopyofthe followingdata:

Fileinformationforalllocaldrives Thisinformationincludesdirectories,filenames,fileattributes,filesizes,andfilemodificationdates.

HKEY_LOCAL_MACHINEandHKEY_USERSregistrytrees ThinAppdoesnotscanHKEY_CLASSES_ROOTandHKEY_CURRENT_USER registryentriesbecausethose entriesaresubsetsofHKEY_LOCAL_MACHINEandHKEY_USERSentries.

Thesnapshot.iniconfigurationfilespecifieswhatdirectoriesandsubkeystoexcludefromaThinApp projectwhenyoucaptureanapplication.Youmightcustomizethisfileforcertainapplications. Thisinformationincludesthefollowingtopics:


MethodsofUsingthesnapshot.exeUtilityonpage 107 Samplesnapshot.exeCommandsonpage 109 CreateaProjectWithouttheSetupCaptureWizardonpage 109 Customizingthesnapshot.iniFileonpage 110

Methods of Using the snapshot.exe Utility


Youcanusethesnapshot.exeutilitytocreatesnapshotfilesofmachinestates,createthetemplatefileforthe Package.inifile,createaThinAppproject,anddisplaythecontentsofasnapshotfile. ForinformationaboutthefullproceduretocreateaThinAppprojectfromthecommandline,seeCreatea ProjectWithouttheSetupCaptureWizardonpage 109.

Creating Snapshots of Machine States


Thesnapshot.exeutilitycreatesasnapshotfileofamachinestate.ThinAppcapturesthemachinestateand savesittoasinglefiletocreateaproject.Thesnapshot.exeutilitysavesacopyofregistrydataandfilesystem metadatathatincludespaths,filenames,sizes,attributes,andtimestamps.

Usage
snapshot.exe SnapshotFileName.snapshot [-Config ConfigFile.ini][BaseDir1][BaseDir2][BaseReg1]

VMware, Inc.

107

ThinApp Users Guide

Examples
Snapshot My.snapshot Snapshot My.snapshot Config MyExclusions.ini Snapshot My.snapshot C:\MyAppDirectory HKEY_LOCAL_MACHINE\Software\MyApp

Options
Theoptionsspecifythedirectoriesorsubkeysinthesnapshot. Table 7-1. Snapshot Directories and Subkeys
Option -Config ConfigFile.ini Description Specifiesdirectoriesorregistrysubkeystoexcludeduringsnapshotcreation. If youdonotspecifyaconfigurationfile,ThinAppusesthesnapshot.inifile fromtheThinAppinstallationdirectory. Specifiesoneormorebasedirectoriestoincludeinthescan.Ifyoudonotspecify basedirectories,thesnapshot.exeutilityscansC:\andallsubdirectories. IfyouscanamachinewhereWindowsorprogramfilesareinstalledondifferent disks,includethesedrivesinthescan. Ifyouknowthatyourapplicationinstallationcreatesormodifiesfilesinfixed locations,specifythesedirectoriestoreducethetotaltimerequiredtoscana machine. BaseReg1 Speciesoneormorebaseregistrysubkeystoincludeinthescan.Ifyoudonot specifyregistrysubkeys,thesnapshot.exeutilityscansthe HKEY_LOCAL_MACHINEandHKEY_USERSkeys.

BaseDir1

Creating the Template Package.ini file from Two Snapshot Files


Thesnapshot.exeutilitygeneratesatemplatePackage.inifile.Theutilityscansthetwosnapshotfilesfor allapplicationsthatarecreatedandreferencedfromshortcutlinksortheStartmenu.Thetemplate Package.inifilebecomesthebasisofthePackage.inifileinaThinAppproject.

Usage
snapshot.exe Snap1.snapshot -SuggestProject Snap2.snapshot OutputTemplate.ini

Examples
Snapshot Start.snapshot SuggestProject End.snapshot Template.ini

ThinApprequiresalloftheparameters.

Creating the ThinApp Project from the Template Package.ini File


Thesnapshot.exeutilitycreatestheThinAppprojectfilefromthetemplatePackage.inifile.

Usage
snapshot.exe Template.ini -GenerateProject OutDir [-Config ConfigFile.ini]

Examples
Snapshot Template.ini GenerateProject C:\MyProject Snapshot Template.ini GenerateProject C:\MyProject Config MyExclusions.ini

-Config ConfigFile.iniisoptional.Theconfigurationfilespecifiesdirectoriesorregistrysubkeysfor exclusionfromtheproject.Ifyoudonotspecifyaconfigurationfile,ThinAppusesthesnapshot.inifile.

108

VMware, Inc.

Chapter 7 Creating ThinApp Snapshots and Projects from the Command Line

Displaying the Contents of a Snapshot File


Thesnapshot.exeutilityliststhecontentsofthesnapshotfile.

Usage
snapshot.exe SnapshotFileName.snapshot -Print

Examples
Snapshot Start.snapshot Print

ThinApprequiresalloftheparameters.

Sample snapshot.exe Commands


Table 72describessamplecommandsforthesnapshot.exeutility.Theparametersarenotcasesensitive. ThecommandsarewrappedintheCommandcolumnbecauseofspacerestraints. Table 7-2. snapshot.exe Sample Commands
Command snapshot C:\Capture.snapshot snapshot C:\Capture.snapshot C:\ E:\ snapshot C:\Capture.snapshot C:\data.snapshot C:\ HKEY_LOCAL_MACHINE snapshot C:\Original.snapshot -Diff C:\NewEnvironment.snapshot C:\MyProject snapshot Original.snapshot -DiffPrint NewEnvironment.snapshot snapshot C:\data.snapshot C:\ HKEY_LOCAL_MACHINE snapshot C:\start.snapshot -diffprint C:\end.snapshot snapshot C:\start.snapshot -print snapshot C:\start.snapshot -SuggestProject C:\end.snapshot C:\project.ini Description Capturesacompletesnapshotoflocaldrivesand registrytothefileC:\Capture.snapshot. CapturesacompletesnapshotoftheC:\andE:\drives. ThinAppdoesnotcaptureregistryinformation. CapturesacompletesnapshotoftheC:\driveandallof theHKEY_CLASSES_ROOTregistrysubtree. GeneratesaThinAppprojectdirectorybycomparing twosnapshots. Displaysdifferencesbetweentwocapturedsnapshots. Savesthestateofthecomputerfilesystemandregistry. Comparestworecordedstates. Printsthecontentsofasavedstate. GeneratesaThinAppprojectbycomparingtwosaved states.

Create a Project Without the Setup Capture Wizard


Youcanusethesnapshot.exeutilityfromthecommandlineinsteadofusingtheSetupCapturewizardthat runsthesnapshot.exeutilityinthebackground.Thecommandlineutilityisusefultopackagealarge numberofapplicationsorautomateThinAppprojectcreation.Thetypicallocationofthesnapshot.exe utilityisC:\Program Files\VMware\VMware ThinApp\snapshot.exe. Thesnapshotprocessmakesacopyoftheallregistryentriesonthesystemandfilesystemmetadata. File systemmetadataincludespath,filename,attribute,size,andtimestampinformationbutexcludesactual filedata. Create a project with the snapshot.exe command-line utility 1 Saveaninitialsnapshotofthecurrentmachineconfigurationtodisk.
snapshot.exe C:\Start.snapshot

Installtheapplicationandmakeanynecessarymanualsystemchanges.

VMware, Inc.

109

ThinApp Users Guide

Savetodiskasnapshotofthenewmachineconfiguration.
snapshot.exe C:\End.snapshot

GenerateatemplatePackage.inifile.
snapshot.exe C:\Start.snapshot SuggestProject C:\End.snapshot C:\Template.ini

ThinAppusesthetemplatefiletogeneratethefinalPackage.inifile.Thetemplatefilecontainsalistof alldetectedexecutablefileentrypointsandPackage.iniparameters.Ifyouwriteyourownscriptto replacetheSetupCapturewizard,usethetemplatePackage.inifiletoselecttheentrypointstokeepor customizePackage.iniparameterssuchasInventoryName. 5 GenerateaThinAppproject.


snapshot.exe C:\Template.ini GenerateProject C:\MyProjectDirectory

6 7

(Optional)DeletethetemporaryC:\Start.snapshot, C:\End.snapshot,andC:\Template.inifiles. (Optional)Togeneratemultipleprojectswithdifferentconfigurations,reusetheoriginal Start.snapshotfileandrepeattheprocedurefromStep 2.

Customizing the snapshot.ini File


Thesnapshot.iniconfigurationfilespecifieswhatregistrykeystoexcludefromaThinAppprojectwhen youcaptureanapplication. Forexample,ifyouuseInternetExplorer7,youmightneedThinApptocapturethefollowingregistrykeys:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\Components HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings

Ifthesnapshot.inifileexcludesthe HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connectionskeybydefault,youcanremovethiskeyfromthesnapshot.inifiletoensurethat ThinAppcapturesthekeyinthecaptureprocess. Ifyoudonotcustomizethesnapshot.inifile,thesnapshotprocessloadsthefilefromoneoftheselocations:

Application Data\Thinapp\snapshot.ini ThislocationistheAppDatadirectoryoftheuser.

C:\Program Files\VMware\VMWare Thinapp\snapshot.ini ThisisthelocationfromwhichThinApprunsthesnapshot.exeutility.

110

VMware, Inc.

ThinApp File System Formats and Macros

ThinAppstoresthedifferencesbetweensnapshotsduringthesetupcaptureprocessinavirtualfilesystemand virtualregistry.ThevirtualfilesystemusesfoldermacrostorepresentWindowsshellfolderlocations. Thisinformationaboutthevirtualfilesystemincludesthefollowingtopics:


VirtualFileSystemFormatsonpage 111 ThinAppFolderMacrosonpage 111

Virtual File System Formats


ThinAppgeneratesthefollowingvirtualfilesystemformats:

Build Thesetupcaptureprocessgeneratesthisformatfromfilesfounddirectlyonthephysicalfilesystem. ThinAppusesfoldermacrostorepresentWindowsshellfolderlocations.

Embedded Thebuild.batfiletriggersabuildprocessthatembedsareadonlyfilesysteminexecutablefiles. The executablefilesprovideblockbasedstreamingtoclientcomputers.ThinAppcompressesthefile system.

Sandbox Runningthecapturedapplicationgeneratesthereadwritedirectorystructurethatholdsfiledatathatthe applicationmodifies.FilemodificationsthatpromptThinApptoextractembeddedvirtualfilestothe sandboxincludethefollowingoperations:


Changingthetimestamporattributesofafile Openingafilewithwriteaccess Truncatingafile Renamingormovingafile

Theembeddedandsandboxfilesystemsusefoldermacrostoenablefilepathstodynamicallyexpandat runtime.

ThinApp Folder Macros


ThinAppusesmacrostorepresentfilesystempathlocationsthatmightchangewhenvirtualizedapplications runondifferentWindowsoperatingsystemsorcomputers.Theuseofmacrosenablessharedapplication profileinformationtoinstantlymigratetodifferentoperatingsystems. Forexample,youmightcaptureanapplicationonasystemthathasC:\WINNTastheWindowsdirectoryand deploytheapplicationonasystemthathasC:\WindowsastheWindowsdirectory.ThinApptransparently convertsC:\WINNTto%SystemRoot%duringthecaptureprocessforthatsystemandexpands%SystemRoot% toC:\Windowsduringruntimeforthatsystem.
VMware, Inc. 111

ThinApp Users Guide

IfanapplicationregistersDLLstoC:\winnt\system32whilerunningonWindows 2000,theusercanquit theapplicationandlogintoaWindowsXPmachine.OntheWindowsXPmachine,thefilesappeartoexistat C:\windows\system32andallrelatedregistrykeyspointtoC:\windows\system32. OnWindowsVista,ThinAppmovesWindowsSxSDLLsandpolicyinformationtomatchWindowsVista insteadofusingWindowsXPfilepathstyles.Thisfeatureenablesmostapplicationstomigratetoupdatedor olderoperatingsystems. ThinAppprovidesSxSsupportforapplicationsrunningonWindows2000eventhoughtheunderlying operatingsystemdoesnot.ThissupportenablesmostapplicationscapturedonWindowsXPtorunon Windows2000withoutchanges.

List of ThinApp Macros


ThinAppusestheshfolder.dllfiletoobtainthelocationofshellfolders.Olderversionsofthe shfolder.dllfiledonotsupportsomemacronames. Macrosrequiringshfolder.dllversion5.0orlaterinclude%ProgramFilesDir%,%Common AppData%, %Local AppData%,%My Pictures%,and%Profile%. Macrosrequiringshfolder.dllversion6.0orlaterinclude%My Videos%,%Personal%,and%Profiles%. Table 81liststheavailablefoldermacros. Table 8-1. Folder Macros
Macro Name %AdminTools% %AppData% %CDBurn Area% %Common AdminTools% %Common AppData% %Common Desktop% %Common Documents% %Common Favorites% %Common Programs% %Common StartMenu% %Common Startup% %Common Templates% %Cookies% %Desktop% %Drive_c% %Drive_m% %Favorites% %Fonts% %History% %Internet Cache% %Local AppData% %My Pictures% Typical Location C:\Documents and Settings\<user_name>\Start Menu\Programs\Administrative Tools C:\Documents and Settings\<user_name>\Application Data C:\Documents and Settings\<user_name>\Local Settings\Application Data\Microsoft\CD Burning C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools C:\Documents and Settings\All Users\Application Data C:\Documents and Settings\All Users\Desktop C:\Documents and Settings\All Users\Documents C:\Documents and Settings\All Users\Favorites C:\Documents and Settings\All Users\Start Menu\Programs C:\Documents and Settings\All Users\Start Menu C:\Documents and Settings\All Users\Start Menu\Programs\Startup C:\Documents and Settings\All Users\Templates C:\Documents and Settings\<user_name>\Cookies C:\Documents and Settings\<user_name>\Desktop C:\ M:\ C:\Documents and Settings\<user_name>\Favorites C:\Windows\Fonts C:\Documents and Settings\<user_name>\Local Settings\History C:\Documents and Settings\<user_name>\Local Settings\Temporary Internet Files C:\Documents and Settings\<user_name>\Local Settings\Application Data C:\Documents and Settings\<user_name>\My Documents\My Pictures

112

VMware, Inc.

Chapter 8 ThinApp File System Formats and Macros

Table 8-1. Folder Macros (Continued)


Macro Name %My Videos% %NetHood% %Personal% %PrintHood% %Profile% %Profiles% %Program Files Common% %ProgramFilesDir% %Programs% %Recent% %Resources% %Resources Localized% %SendTo% %Startup% %SystemRoot% %SystemSystem% %TEMP% %Templates% Typical Location C:\Documents and Settings\<user_name>\My Documents\My Videos C:\Documents and Settings\<user_name>\NetHood C:\Documents and Settings\<user_name>\My Documents C:\Documents and Settings\<user_name>\PrintHood C:\Documents and Settings\<user_name> C:\Documents and Settings C:\Program Files\Common Files C:\Program Files C:\Documents and Settings\<user_name>\Start Menu\Programs C:\Documents and Settings\<user_name>\My Recent Documents C:\Windows\Resources C:\Windows\Resources\<language_ID> C:\Documents and Settings\<user_name>\SendTo C:\Documents and Settings\<user_name>\Start Menu\Programs\Startup C:\Windows C:\Windows\System32 C:\Documents and Settings\<user_name>\Local Settings\Temp C:\Documents and Settings\<user_name>\Templates

Processing %SystemRoot% in a Terminal Services Environment


ATerminalServicesenvironmenthasasharedWindowsdirectory,suchasC:\Windows,andaprivate Windowsdirectory,suchasC:\Documents and Settings\User\Windows.Inthisenvironment,ThinApp usestheuserspecificdirectoryfor%SystemRoot%.

VMware, Inc.

113

ThinApp Users Guide

114

VMware, Inc.

Creating ThinApp Scripts

Scriptsmodifythebehaviorofvirtualapplicationsdynamically.Youcancreatecustomcodebeforestartingan applicationpackagedwithThinApporafteranapplicationexits.Youcanusescriptstoauthenticateusersand loadconfigurationfilesfromaphysicaltovirtualenvironment. Callbackfunctionsruncodeduringspecificevents.Ifapplicationscreatechildprocesses,usecallback functionstoruncodeonlyinthemainparentprocess. APIfunctionsrunThinAppfunctionsandinteractwiththeThinAppruntime.APIfunctionscanauthenticate usersandpreventthestartofapplicationsforunauthorizedusers. AddingscriptstoyourapplicationinvolvescreatinganANSItextfilewiththe.vbsfileextensionintheroot applicationprojectdirectory.TherootprojectdirectoryisthesamedirectorythatcontainsthePackage.ini file.Duringthebuildprocess,ThinAppaddsthescriptfilestotheexecutablefileandrunseachofthescript filesatruntime. ThinAppusesVBScripttorunscriptfiles.ForinformationaboutVBScript,seetheMicrosoftVBScript documentation.YoucanuseVBScripttoaccessCOMcontrolsregisteredonthehostsystemorwithinthe virtualpackage. NOTEYoucannotusewscript.<command>callsinThinAppVBScript.Forexample, wscript.CreateObjectorwscript.Sleepwillgenerateerrors. Thisinformationincludesthefollowingtopics:

CallbackFunctionsonpage 115 ImplementScriptsinaThinAppEnvironmentonpage 116 APIFunctionsonpage 119

Callback Functions
Callbackfunctionscanrunundercertainconditions.For example,callbackfunctionsrunscriptcodeonly whenanapplicationstartsorquits. Callbackfunctionnamesincludethefollowingnames:

OnFirstSandboxOwnerCalledonlywhenanapplicationfirstlocksthesandbox.Thiscallbackisnot calledifasecondcopyofthesameapplicationusesthesamesandboxwhilethefirstcopyruns.Ifthefirst applicationspawnsasubprocessandquits,thesecondsubprocesslocksthesandboxandpreventsthis callbackfromrunninguntilallsubprocessesquitandtheapplicationrunsagain. OnFirstParentStartCalledbeforerunningaThinAppexecutablefileregardlessofwhetherthe sandboxissimutaneouslyownedbyanothercapturedexecutablefile. OnFirstParentExitCalledwhenthefirstparentprocessexits.Ifaparentprocessrunsachildprocess andquits,thiscallbackiscalledevenifthechildprocesscontinuestorun.

VMware, Inc.

115

ThinApp Users Guide

OnLastProcessExitCalledwhenthelastprocessowningthesandboxexits.If aparentprocessrunsa childprocessandquits,thiscallbackiscalledwhenthelastchildprocessexits.

ThefollowingcallbackexampleshowstheOnFirstSandboxOwnerandOnFirstParentExitfunctions.
------------------------example.vbs --------------------------------Function OnFirstSandboxOwner msgbox "The sandbox owner is: " + GetCurrentProcessName End Function Function OnFirstParentExit msgbox "Quiting application: " + GetCurrentProcessName End Function msgbox "This code will execute for all parent and child processes" ---------------------------------------------------------------------

Implement Scripts in a ThinApp Environment


Youmightimplementascriptinthefollowingcircumstances:

Timingoutanapplicationonaspecificdate. Runninga.batfilefromanetworkshareinsidethevirtualenvironment. Modifyingthevirtualregistry. Importingthe.regfileatruntime. Stoppingavirtualservicewhenthemainapplicationquits. Copyinganexternalsystemconfigurationfileintothevirtualenvironmentonstartup.

Implement a script 1 Savethescriptcontentsinaplaintextfilewiththe.vbsextensioninthesamedirectoryasyour Package.inifile. Youcanuseanyfilename.ThinAppaddsall.vbsfilestothepackageatbuildtime. 2 Rebuildtheapplication.

.bat Example
Thefollowingscriptrunsanexternal.batfilefromanetworkshareinsidethevirtualenvironment.The .bat filemakesmodificationstothevirtualenvironmentbycopyingfiles,deletingfiles,orapplyingregistry changesusingregedit /s regfile.reg.Runthisscriptonlyforthefirstparentprocess.Ifyourunthisscript forotherprocesses,eachcopyofthecmd.exeutilityrunsthescriptandaninfiniterecursiondevelops.
Function OnFirstParentStart Set Shell = CreateObject("Wscript.Shell") Shell.Run "\\jcdesk2\test\test.bat" End Function

Timeout Example
Thefollowingscriptpreventstheuseofanapplicationafteraspecifieddate.TheVBSdateusesthe #mm/dd/yyyy#format,regardlessoflocale. Thischeckoccursuponstartupoftheparentprocessandanychildprocesses.
if Date >= #03/20/2007# then msgbox "This application has expired, please contact Administrator" ExitProcess 0 end if

116

VMware, Inc.

Chapter 9 Creating ThinApp Scripts

Modify the Virtual Registry


ThefollowingscriptproceduremodifiesthevirtualregistryatruntimetoloadanexternalODBCdriverfrom thesamedirectorywherethepackageexecutablefileislocated. Modify the registry 1 Obtainthepathtothepackageexecutablefiles.
Origin = GetEnvironmentVariable("TS_ORIGIN")

Findthelastslashinthepathandobtainthecharactersthatprecedetheslash.
LastSlash = InStrRev(Origin, "\") SourcePath = Left(Origin, LastSlash)

FormanewpathtotheODBC DLLfilelocatedoutsideofthepackage.
DriverPath=SourcePath + "tsodbc32.dll"

Modifythevirtualregistrytopointittothislocation.
Set WSHShell = CreateObject("Wscript.Shell") WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Transoft ODBC Driver\Driver," DriverPath

ThismodificationcausestheapplicationtoloadtheDLLfromanexternallocation.

.reg Example
Thefollowingscriptimportstheregistryvaluesfromanexternal.regfileintothevirtualregistryatruntime.
Function OnFirstParentStart ExecuteVirtualProcess "regedit /s C:\tmp\somereg.reg" End Function

Stopping a Service Example


Thefollowingscriptstopsavirtualornativeservicewhenthemainapplicationquits.
Function OnFirstParentExit Set WshShell = CreateObject("WScript.Shell") WshShell.Run "net stop ""iPod Service""" End Function

Copying a File Example


Thefollowingscriptsectionsshowshowtocopyaconfigurationfilelocatedinthesamedirectoryasthe capturedexecutablefileintothevirtualfilesystemeachtimetheapplicationstarts.Thisscriptisusefulforan externalconfigurationfilethatiseasytoeditafterdeployment.Becausethecopyoperationoccurseachtime youruntheapplication,anychangestotheexternalversionarereflectedinthevirtualversion. Forexample,ifyourcapturedexecutablefileisrunningfrom\\server\share\myapp.exe,thisscript searchesforaconfigurationfilelocatedat\\server\share\config.iniandcopiesittothevirtualfile systemlocationatC:\Program Files\my application\config.ini. ByputtingthiscodeintheOnFirstParentStartfunction,itisonlycalledonceeachtimethescriptruns. Otherwiseitrunsforeverychildprocess.
Function OnFirstParentStart

VMware, Inc.

117

ThinApp Users Guide

ThinAppsetsupTS_ORIGINtoindicatethefullpathtoacapturedexecutablefilepackage.Avirtual applicationsetstheTS_ORIGINvariabletothephysicalpathoftheprimarydatacontainer.Ifyouhaveavirtual applicationconsistingofthemain.exeandshortcut.exefiles,bothfilesresideinC:\VirtApp.Whenyou runthemain.exefile,TS_ORIGIN varissettoC:\VirtApp\main.exe.Whenyouruntheshortcut.exefile, theTS_ORIGINenvironmentvariableissettoC:\VirtApp\main.exe.Theenvironmentvariableisalwaysset totheprimarydatacontainer,evenwhenyoucreateashortcut.WhenyourunVBScriptsthatareincludedin thepackage,thevariableisalreadysetandavailabletothescripts.


Origin = GetEnvironmentVariable("TS_ORIGIN")

YoucanseparatethefilenamefromTS_ORIGINbyfindingthelastbackslashandremovingallofthecharacters followingit.
LastSlash = InStrRev(Origin, "\") SourcePath = Left(Origin, LastSlash)

Thesourcefiletocopyintothevirtualenvironmentisthepackagepathplusconfig.ini.
SourceFile = SourcePath + "Config.ini"

ThelocationtocopytomightbeadifferentlocationondifferentcomputersiftheProgram Filesdirectoryis mappedtoalocationotherthanC:\.ThefollowingcallletsThinAppexpandamacrotoobtainthecorrect locationforthelocalcomputer.


DestFile = ExpandPath("%ProgramFilesDir%\MyApplication\Config.ini")

UsethefilesystemObjectparametertocheckthesourcefileexists.
Set objFSO = CreateObject("Scripting.filesystemObject") If objFSO.FileExists(SourceFile) Then

Ifthesourcefileexists,copyitintothevirtualfilesystem.The%ProgramFilesDir%\MyApplicationvirtual directoryisinthepackage.
objFSO.CopyFile SourceFile, DestFile, TRUE End if End Function

Add a Value to the System Registry


Thisscriptprocedureaddsavaluetothephysicalsystemregistry. Add a value to the system registry 1 Createa.regfileandruntheregedit /scommandasanexternalprocessthataccessesthesystem registryinsteadofthevirtualregistry.
Function OnFirstParentStart

Createthe.regfileinalocationthathastheIsolationModeparametersettoMergedsothatthevirtual environmentcanaccessitwiththisscriptandthephysicalenvironmentcanitwiththeregedit /s command.


RegFileName = ExpandPath("%Personal%\thin.reg") Set fso = CreateObject("Scripting.filesystemObject") Set RegFile = fso.CreateTextFile(RegFileName, true)

The%Personal%directoryisadirectorythathasMergedisolationmodebydefault. 3 Constructthe.regfile.
RegFile.WriteLine("Windows Registry Editor Version 5.00") RegFile.WriteBlankLines(1) RegFile.WriteLine("[HKEY_CURRENT_USER\Software\Thinapp\demo]") RegFile.WriteLine(chr(34) and "InventoryName" and chr(34) and "=" and chr(34) and GetBuildOption("InventoryName") and chr(34)) RegFile.Close

118

VMware, Inc.

Chapter 9 Creating ThinApp Scripts

Addtheinformationinthesystemregistry.
RegEditPid = ExecuteExternalProcess("regedit /s " & chr(34) & RegFileName & chr(34)) WaitForProcess RegEditPid, 0

Waituntiltheprocessiscomplete. 5 Cleantheenvironment.
fso.DeleteFile(RegFileName) End Function

API Functions
YoucanuseAPIfunctionsthatinstructThinApptocompleteoperationssuchasloadDLLsasvirtualDLLS, convertpathsfrommacroformattosystemformat,andruncommandsinsideofthevirtualenvironment.

AddForcedVirtualLoadPath
TheAddForcedVirtualLoadPath(Path)functioninstructsThinApptoloadallDLLsfromthespecifiedpath asvirtualDLLseveniftheyarenotlocatedinthepackage. UsethisfunctioniftheapplicationneedstoloadexternalDLLsthatdependonDLLslocatedinsidethe package. YoucanusetheForcedVirtualLoadPathsparameterinthePackage.inifiletoachievethesameresultas thisAPIfunction.SeeForcedVirtualLoadPathsonpage 75.

Parameters
Path [in]ThefilenameorpathforDLLstoloadasvirtual.

Examples
YoucanloadanyDLLlocatedinthesamedirectoryastheexecutablefileasavirtualDLL.
Origin = GetEnvironmentVariable("TS_ORIGIN")

TS_ORIGINisthepathfromwhichtheexecutablefileisrunning. YoucandeletethefilenamefromTS_ORIGINbyfindingthelastbackslashandremovingallofthecharacters thatfollowit.


LastSlash = InStrRev(Origin, "\") SourcePath = Left(Origin, LastSlash)

YoucaninstructThinApptoloadallDLLsinthesameorlowerdirectoryfromwherethesourceexecutable fileresides.
AddForcedVirtualLoadPath(SourcePath)

ThisprocessenablesyoutodropadditionalfilesintheSourcePathtreeandhavethemresolveimport operationsagainstvirtualDLLs.

ExitProcess
TheExitProcessExitCodefunctionquitsthecurrentprocessandsetsthespecifiederrorcode.

Parameters
ExitCode [in]Theerrorcodetoset.Thisinformationmightbeavailabletoaparentprocess.Avalueof0indicatesno error.

VMware, Inc.

119

ThinApp Users Guide

Examples
Youcanexittheprocessandindicatesuccess.
ExitProcess 0

Whentheprocessexits,thescriptingsystemreceivesitsOnLastProcessExistfunctioncallback.Anyloaded DLLsrunterminationcodetocleanuptheenvironment.

ExpandPath
TheExpandPath(InputPath)functionconvertsapathfrommacroformattosystemformat.

Parameters
InputPath [in]Apathinmacroformat.

Returns
Theexpandedmacropathinsystemformat.

Examples
Path=ExpandPath("%ProgramFilesDir%\Myapp.exe") Path=C:\Program Files\myapp.exe Allmacropathsmustescapethe%and#charactersbyreplacingthesecharacterswith#25and#23. Path=ExpandPath("%ProgramFilesDir%\FilenameWithPercent#25.exe") ThisexpandstoC:\Program Files\FileNameWithPercent%.exe.

ExecuteExternalProcess
TheExecuteExternalProcess(CommandLine)functionrunsacommandoutsideofthevirtual environment.Youcanusethisfunctiontomakephysicalsystemchanges.

Parameters
CommandLine [in]Representationoftheapplicationandcommandlineparameterstorunoutsideofthevirtual environment.

Returns
IntegerprocessID.YoucanusetheprocessIDwiththeWaitForProcessfunction.SeeWaitForProcesson page 125.

Examples
ExecuteExternalProcess("C:\WINDOWS\system32\cmd.exe /c copy C:\systemfile.txt C:\newsystemfile.txt")

Youcanrunacommandthatrequiresquotationmarksinthecommandline.
ExecuteExternalProcess("regsvr32 /s " & chr(34) & "C:\Program Files\my.ocx" & chr(34))

120

VMware, Inc.

Chapter 9 Creating ThinApp Scripts

ExecuteVirtualProcess
TheExecuteVirtualProcess(CommandLine)functionrunsacommandinsideofthevirtualenvironment. Youcanusethisfunctiontomakechangestothevirtualenvironment.

Parameters
CommandLine [in]Representationoftheapplicationandcommandlineparameterstorunoutsideofthevirtual environment.

Returns
IntegerprocessID.YoucanusetheprocessIDwiththeWaitForProcessfunction.SeeWaitForProcesson page 125.

Examples
ExecuteVirtualProcess("C:\WINDOWS\system32\cmd.exe /c copy C:\systemfile.txt C:\virtualfile.txt")

Youcanrunacommandthatrequiresquotationmarksinthecommandline.
ExecuteVirtualProcess("regsvr32 /s " & chr(34) & "C:\Program Files\my.ocx" & chr(34))

GetBuildOption
TheGetBuildOption(OptionName)functionreturnsthevalueofasettingspecifiedinthe[BuildOptions] sectionofthePackage.inifileusedforcapturingapplications.

Parameters
OptionName [in]Nameofthesetting.

Returns
Thisfunctionreturnsastringvalue.Iftherequestedoptionnamedoesnotexist,thefunctionreturnsanempty string().

Examples
Package.ini contains: [BuildOptions] CapturedUsingVersion=4.0.1-2866

ThefollowinglineappearsinaVBSfile:
Value = GetBuildOption("CapturedUsingVersion")

GetFileVersionValue
TheGetFileVersionValue(Filename, Value)functionreturnsversioninformationvaluefromfilessuch asaspecificDLL,OCX,orexecutablefile.Youcanusethisfunctiontodeterminetheinternalversionnumber ofaDLLorretrieveDLLinformationaboutthecopyrightowneroraproductname.

Parameters
Filename [in]Thenameofthefilenamewhoseversioninformationisbeingretrieved. Value [in]Thenameofthevaluetoretrievefromtheversioninformationsectionofthespecifiedfile.

VMware, Inc.

121

ThinApp Users Guide

YoucanretrievethefollowingvaluesfrommostDLLs:

Comments InternalName ProductName CompanyName LegalCopyright ProductVersion FileDescription LegalTrademarks PrivateBuild FileVersion OriginalFilename SpecialBuild

Returns
Thisfunctionreturnsastringvalue.Iftherequestedfilenamedoesnotexist,orthefunctioncannotlocatethe specifiedvalueinthefile,thefunctionreturnsanemptystring().

Examples
FileVersion = GetFileVersionValue("C:\windows\system32\kernel32.dll," "FileVersion") if FileVersion = "1.0.0.0" then MsgBox "This is Version 1.0!" End if

GetCommandLine
TheGetCommandLinefunctionaccessesthecommandlineparameterspassedtotherunningprogram.

Returns
Thisfunctionreturnsastringthatrepresentsthecommandlineargumentspassedtothecurrentrunning program,includingtheoriginalexecutablefile.

Examples
MsgBox "The command line for this EXE was " + GetCommandLine

GetCurrentProcessName
TheGetCurrentProcessNamefunctionaccessesthefullvirtualpathnameofthecurrentprocess.

Returns
Thisfunctionreturnsastringthatrepresentsthefullexecutablepathnameinsideofthevirtualenvironment. Inmostcircumstances,thispathisC:\Program Files\...,evenifthepackagesourcerunsfromanetwork share.

Examples
MsgBox "Running EXE path is " + GetCurrentProcessName

122

VMware, Inc.

Chapter 9 Creating ThinApp Scripts

GetOSVersion
TheGetOSVersion()functionreturnsinformationaboutthecurrentversionofWindows.

Parameters
Thisfunctionhasnoparameters.

Returns
ThisfunctionreturnsastringintheMAJOR.MINOR.BUILD_NUMBER.PLATFORM_ID OS_STRINGformat. MAJORisonethefollowingvalues: WindowsVista WindowsServer2008 WindowsServer2003 WindowsXP Windows2000 WindowsNT4.0 6 6 5 5 5 4

MINORisoneofthefollowingvalues: WindowsVista WindowsServer2008 WindowsServer2003 WindowsXP Windows2000 WindowsNT4.0 WindowsNT3.51 0 0 2 1 0 0 51

BUILD_NUMBERisthebuildnumberoftheoperatingsystem. PLATFORM_IDassignsoneofthefollowingvalues:

Value = 1forWindowsMe,Windows98,orWindows95(Windows95basedOS) Value = 2forWindowsServer2003,WindowsXP,Windows2000,orWindowsNT.(WindowsNT based OS)

OS_STRINGrepresentsinformationabouttheoperatingsystemsuchasService Pack 2.

Examples
if GetOSVersion() = "5.1.0.2 Service Pack 2" then MsgBox "You are running on Windows XP Service Pack 2!" endif

VMware, Inc.

123

ThinApp Users Guide

GetEnvironmentVariable
TheGetEnvironmentVariable(Name)functionreturnstheenvironmentvariableassociatedwiththeName variable.

Parameters
Name [in]Thenameoftheenvironmentvariableforwhichthevalueisretrieved.

Returns
ThisfunctionreturnsthestringvalueassociatedwiththeNameenvironmentvariable.

Examples
MsgBbox "The package source EXE is " + GetEnvironmentVariable("TS_ORIGIN")

RemoveSandboxOnExit
TheRemoveSandboxOnExit(YesNo)functionsettogglesthatdeterminewhethertodeletethesandboxwhen thelastchildprocessexits. IfyousettheRemoveSandboxOnExitparameterto1inthePackage.inifile,thedefaultcleanupbehaviorfor thepackagewithisYes.YoucanchangethecleanupbehaviortoNobycallingRemoveSandboxOnExitwith thevalueof0.IfyoudonotmodifytheRemoveSandboxOnExit=1entryinthePackage.inifile,thedefault cleanupbehaviorforthepackageisNo.YoucanchangethecleanupbehaviortoYesbycalling RemoveSandboxOnExitwiththevalueof1.

Parameters
Yes No [in]Doyouwanttocleanupwhenthelastprocessshutsdown?1=Yes,0=No

Examples
Thefollowingexampleturnsoncleanup.
RemoveSandboxOnExit 1

Thefollowingexampleturnsoffcleanup.
RemoveSandboxOnExit 0

SetEnvironmentVariable
TheSetEnvironmentVariable(Name, Value)functionsetthevalueofanenvironmentvariable.

Parameters
Name [in]Thenameoftheenvironmentvariabletostorethevalue. Value [in]Thevaluetostore.

Examples
SetEnvironmentVariable "PATH", "C:\Windows\system32"

124

VMware, Inc.

Chapter 9 Creating ThinApp Scripts

SetfileSystemIsolation
TheSetfile systemIsolation(Directory, IsolationMode)functionsetstheisolationmodeofa directory.

Parameters
Directory [in]Fullpathofthedirectorywhoseisolationmodeistobeset. IsolationMode [in]Isolationmodetoset. 1=WriteCopy 2=Merged 3=Full

Examples
YoucansettheMergedisolationmodeforthetempdirectory.
Setfile systemIsolation GetEnvironmentVariable("TEMP"), 2

SetRegistryIsolation
TheSetRegistryIsolation(RegistryKey, IsolationMode)functionsetstheisolationmodeofaregistry key.

Parameters
RegistryKey [in]Theregistrykeyonwhichtosettheisolationmode.StartwithHKLMforHKEY_LOCAL_MACHINE,HKCUfor HKEY_CURRENT_USER,andHKCRforHKEY_CLASSES_ROOT. IsolationMode [in]Isolationmodetoset. 1=WriteCopy 2=Merged 3=Full

Examples
YoucansettheFullisolationmodeforHKEY_CURRENT_USER\Software\Thinapp\Test.
SetRegistryIsolation "HKCU\Software\Thinapp\Test," 3

WaitForProcess
TheWaitForProcess(ProcessID, TimeOutInMilliSeconds)functionwaitsuntiltheprocessIDis finishedrunning.

Parameters
ProcessID [in]TheprocessIDtoend.TheprocessIDcancomefromExecuteExternalProcessor ExecuteVirtualProcess. TimeOutInMilliSeconds [in]Themaximumamountoftimetowaitfortheprocesstofinishrunningbeforecontinuing.Avalueof0 specifiesINFINITE.
VMware, Inc. 125

ThinApp Users Guide

Returns
Thisfunctionreturnsaninteger. 0=Timeoutfails 1=Processexits 2=Processdoesnotexistorsecurityisdenied

Examples
id = ExecuteExternalProcess("C:WINDOWS\system32\cmd.exe") WaitForProcess(id, 0)

126

VMware, Inc.

10

Monitoring and Troubleshooting ThinApp

10

YoucanuseLogMonitortogeneratetracefilesandtroubleshoottheThinAppenvironment.LogMonitoris compatibleonlywithanapplicationcapturedusingthesameversionofThinApp. Thisinformationincludesthefollowingtopics:


ProvidingInformationtoTechnicalSupportonpage 127 LogMonitorOperationsonpage 127 TroubleshootingSpecificApplicationsonpage 134

Providing Information to Technical Support


VMwaretechnicalsupportrequiresthefollowinginformationfromyoutotroubleshootaThinApp environment:

Stepbystepreproductionoftheprocedurethatyouperformedwhenyouencounteredtheproblem. Informationonthehostconfiguration.SpecifytheWindowsoperatingsystem,theuseofTerminalServer orCitrixXenapp,andanyprerequisiteprogramsthatyouinstalledonthenativemachine. CopiesoftheLogMonitortracefiles.SeeLogMonitorOperationsonpage 127. Exactcopyofthecapturefolderandallcontent.Donotincludethecompiledexecutablefilesfromthe /binsubfolder. Descriptionoftheexpectedandaccuratebehavioroftheapplication. (Optional)Copiesoftheapplicationsthatyoucaptured.Includetheservercomponentsconfigurationfor OracleServerorActiveDirectory. (Optional)Nativeorphysicalfilesorregistrykeysettingsthatmightberelevanttotheproblem. (Optional)Systemservicesorrequireddevicedrivers. (Optional)Virtualmachinethatreproducesthedefect.VMwaresupportmightrequestthisifthesupport contactisunabletoreproducetheproblem. (Optional)OneormoreWebExsessionstofacilitatedebugginginyourenvironment.

Log Monitor Operations


LogMonitorcapturesdetailedchronologicalactivityforexecutablefilesthatthecapturedapplicationstarts. LogMonitorinterceptsandlogsnames,addresses,parameters,andreturnvaluesforeachfunctioncallby targetexecutablefilesorDLLs.LogMonitorcapturesthefollowingactivity:

Win32APIcallsfromapplicationsrunningintheThinAppvirtualoperatingsystem. Potentialerrors,exceptions,andsecurityeventswithintheapplication. AllDLLsloadedbytheapplicationandaddressranges.


127

VMware, Inc.

ThinApp Users Guide

Thegeneratedlogfilescanbelargeandover100MBdependingonhowlongtheapplicationrunswithLog Monitorandhowbusyanapplicationis.TheonlyreasontorunLogMonitorforanapplicationistocapture tracefiles.Tracefilesarecriticalfortroubleshootingproblemsbyanalyzingandcorrelatingmultipleentries withinthetracefile.

Troubleshoot Activity with Log Monitor


YoucanuseLogMonitortoperformbasictroubleshooting. Troubleshoot ThinApp logs 1 2 Shutdownthecapturedapplicationtoinvestigate. Onthecomputerwhereyoucapturedtheapplication,selectStart>Programs>VMware>ThinAppLog Monitor. TostartLogMonitoronadeploymentmachine,copythelog_monitor.exe,logging.dll,andSetup Capture.exefilesfromC:\Program Files\VMware\VMware ThinApptothedeploymentmachineand doubleclickthelog_monitor.exefile. 3 Startthecapturedapplication. Astheapplicationstarts,anewentryappearsintheLogMonitorlist.LogMonitorshowsoneentryfor eachnewtracefile.Eachfiledoesnotnecessarilycorrespondwithasingleprocess. 4 5 Endtheapplicationassoonasitencountersanerror. Generatelogsforeachtracefileyouwanttoinvestigate. a b Selectthe.tracefileinthelist. ClickGeneratetexttracereport.

Childprocessesthattheparentprocessgeneratesresideinthesamelog.Multipleindependentprocesses donotresideinthesamelog. ThinAppgeneratesa.tracefile.LogMonitorconvertsthebinary.tracefileintoa.txtfile. 6 7 (Optional)Openthe.txtfilewithatexteditorandscantheinformation.Insomecircumstances,the.txt fileistoolargetoopenwiththetexteditor. Zipthe.txtfilesandsendthefilestoVMwaresupport.

Perform Advanced Log Monitor Operations


AdvancedoperationsinLogMonitorincludestoppingapplicationsordeletingtracefiles.Ifanapplicationis busyorexperiencingslowperformancewithaspecificaction,youcanperformsuspendandresume operationstocapturelogsforaspecificduration.Theresultinglogfileissmallerthanthetypicallogfileand easiertoanalyze.Evenwhenyouusethesuspendandresumeoperations,thecauseofanerrormightoccur outsideofyourdurationwindow.Suspendandresumeoperationsareglobalandaffectallapplications. Formoreinformationaboutusingtheseoptions,contactVMwaresupport. Perform advanced Log Monitor operations 1 2 Shutdownthecapturedapplicationtoinvestigate. Onthecomputerwhereyoucapturedtheapplication,selectStart>Programs>VMware>ThinAppLog Monitor. TostartLogMonitoronadeploymentmachine,copythelog_monitor.exe,logging.dll,andSetup Capture.exefilesfromC:\Program Files\VMware\VMware ThinApptothedeploymentmachineand doubleclickthelog_monitor.exefile.

128

VMware, Inc.

Chapter 10 Monitoring and Troubleshooting ThinApp

(Optional)Capturelogsforaspecificdurationtotroubleshootanexactissue. a b c SelecttheSuspendcheckbox. Startthecapturedapplicationandletitruntothepointwheretheerroroccursortheperformance problemstarts. InLogMonitor,deselecttheSuspendcheckboxtoresumetheloggingprocess. Youcanchecktheapplicationbehaviortoisolatetheissue. d SelecttheSuspendcheckboxtostoptheloggingprocess.

4 5 6

(Optional)SelectafileinthetracefilelisttodeleteandclickDeleteFile. (Optional)ClickKillApptostoparunningprocess. (Optional)ClicktheCompresscheckboxtodecreasethesizeofatracefile. Thisoperationslowstheperformanceoftheapplication.

(Optional)Generateatracefilereport. a b c Selectatracefileinthefilelist,typeatracefilename,orclickBrowsetoselectatracefileonyour system. (Optional)Typeorchangethenameoftheoutputreport. ClickGeneratetexttracereporttocreateareport. YoucanviewthefilewithatexteditorthatsupportsUNIXstylelinebreaks.

Locating Errors
ThinApploggingprovidesalargeamountofinformation.Thefollowingtipsmighthelpadvancedusers investigateerrors:

ReviewthePotential Errors Detectedsectionofthe.txttracefile. Entriesmightnotindicateerrors.ThinApplistseachWin32APIcallwheretheWindowserrorcode changed.

Reviewexceptionsthattheapplicationsgenerate. Exceptionscanindicateerrors.ExceptiontypesincludeC++and.NET.Thetracefilerecordstheexception typeandDLLthatgeneratestheexception.Iftheapplication,suchasa.NETorJavaapplication,creates anexceptionfromselfgeneratingcode,thetracefileindicatesanunknownmodule. Thefollowingexampleisa.traceentryforanexception.


*** Exception EXCEPTION_ACCESS_VIOLATION on read of 0x10 from unknown_module:0x7c9105f8

Ifyoufindanexception,scantheearlierpartofthetracefileforthesourceoftheexception.Ignorethe floatingpointexceptionsthatVirtualBasic6applicationsgenerateduringtypicaluse.

Reviewchildprocesses. LogMonitorproducesone.tracefileforeachprocess.Ifanapplicationstartsseveralchildprocesses, determinewhichprocessiscausingtheproblem.Sometimes,suchasincircumstancesinvolving outofprocessCOM,aparentapplicationusesCOMtostartachildprocess,runsafunctionremotely,and continuestorunfunctions.

Whenyourunapplicationsfromanetworksharethatgeneratestwoprocesses,ignorethefirstprocess. ThinAppaddressestheslowperformanceofSymantecantivirusapplicationsbyrestartingprocesses.

VMware, Inc.

129

ThinApp Users Guide

Searchfortheerrormessagedisplayedindialogboxes. SomeapplicationscalltheMessageBoxWin32APIfunctiontodisplayunexpectederrorsatruntime.You cansearchatracefileforMessageBoxorthecontentsofthestringdisplayedintheerroranddetermine whattheapplicationwasrunningjustbeforethedialogboxappeared.

NarrowthefocusoncallsoriginatingfromaspecificDLLandthread. ThelogformatspecifiestheDLLandthreadthatmakesacall.Youcanoftenignorethecallsfromsystem DLLs.

Log Format
Atracefileincludesthefollowingsections:

Systemconfiguration Thissectionincludesinformationabouttheoperatingsystem,drives,installedsoftware,environment variables,processlist,services,anddrivers. TheinformationstartswithaDump started onstringandendswithaDump ended onstring.

Header ThissectionshowscontextualinformationfortheinstanceoftheprocessthatLogMonitortracks.Some ofthedisplayedattributesshowloggingoptions,addressrangeswhentheoperatingsystemruntimeis loaded,andmacromappingtoactualsystempaths. ThinAppmarksthebeginningoftheheadersectionwithsequencenumber000001.Intypical circumstances,ThinAppmarkstheendofthissectionwithamessageabouttheApplicationSyncutility.

Body Thissectionincludestraceactivityastheapplicationstartsandperformsoperations.Eachlinerepresents functioncallsthattargetexecutablefilesoroneoftheDLLsmake. ThesectionstartswithaNew Modules detected in memoryentry,followedbytheSYSTEM_LOADED moduleslist.ThesectionendswithaModules Loadedentry.

Summary Thissectionincludesmodulesthatthecapturedapplicationloads,potentialerrors,andaprofileofthe 150slowestcalls. ThesectionstartswiththeModules Loadedmessage.

General API Log Message Format


ThefollowingmessageshowsaformatexampleforAPIcalls.
000257 0a88 mydll.dll :4ad0576d->kernel32.dll:7c81b1f0 SetConsoleMode (IN HANDLE hConsoleHandle=7h, IN DWORD dwMode=3h) 000258 0a88 mydll.dll :4ad0576d<-kernel32.dll:7c81b1f0 SetConsoleMode ->BOOL=1h ()

Thisexampleincludesthefollowingentries:

000257indicatesthelogentrynumber.Eachlogentryhasauniquenumber. 0a88indicatesthecurrentrunningthreadID.Iftheapplicationhasonethread,thisnumberdoesnot change.Iftwoormorethreadsrecorddatatothelogfile,youmightusethethreadIDtofollow threadspecificsequentialactionsbecauseThinApprecordslogentriesintheorderinwhichtheyoccur. mydll.dllindicatestheDLLthatmakestheAPIcall. 4ad0576dindicatesthereturnaddressfortheAPIcallthatmydll.dllmakes.Intypicalcircumstances, thereturnaddressistheaddressinthecodewherethecalloriginates. -> indicatestheprocessofenteringthecall.Forthecallentrylogelement,ThinAppdisplaystheinput parameters.Theseparametersareinandin/outparameters.

130

VMware, Inc.

Chapter 10 Monitoring and Troubleshooting ThinApp

<-indicatestheprocessofthecallreturningtotheoriginalcaller.Forcallexitlogentries,ThinApp displaystheoutputparameters.Theseparametersareoutandin/outparameters. kernel32.dllindicatestheDLLwheretheAPIcalllands. 7c81b1f0indicatestheaddressoftheAPIinsidekernel32wherethecalllands.Ifyoudisassemble kernel32.dllatthe7c81b1f0address,youfindthecodefortheSetConsoleModefunction. ->BOOL=1hindicatestheAPIreturnsthevalueof1andthereturncodehastheBOOLtype.

Application Startup Information


Thefollowingentriesshowsbasicinformationabouttheapplication,suchasthemodulenameand process ID (PID),andaboutLogMonitor,suchastheversionandoptions.
000001 0a88 Logging started for Module=C:\test\cmd_test\bin\cmd.exe Using archive= PID=0xec CommandLine = cmd 000002 0a88 Logging options: CAP_LEVEL=9 MAX_CAP_ARY=25 MAX_CAP_STR=150 MAX_NEST=100 VERSION=3.090 000003 0a88 System Current Directory = C:\test\cmd_test\bin Virtual Current Directory = C:\test\cmd_test\bin 000004 000005 000006 000007 ... ... ... 0a88 0a88 0a88 0a88 |start_env_var| |start_env_var| |start_env_var| |start_env_var| =::=::\ =C:=C:\test\cmd_test\bin =ExitCode=00000000 ALLUSERSPROFILE=C:\Documents and Settings\All Users.WINDOWS

List of DLLs Loaded into Memory During Runtime


TheModules loadedsectionislocatedneartheendofthelogfileanddescribestheDLLsthatareloadedinto memoryatruntimeandtheDLLaddresses.TheinformationshowswhetherWindowsorThinApploadsthe DLLs. Thisexampleincludesasummaryofthelengthofthelongestcallsandthefollowingentries:

SYSTEM_LOADEDindicatesthatWindowsloadstheDLL.Thefilemustexistonthedisk. MEMORY_MAPPED_ANONindicatesthatThinApploadstheDLL.ThinAppmightloadthefilefromthe virtualfilesystem. 46800000-46873fffindicatestheaddressrangeinvirtualmemorywheretheDLLresides. PRELOADED_BY_SYSTEMandPRELOADED_MAPareduplicateentriesandrefertothememoryaddressrange wheretheexecutableimagefileismappedintomemory.

---Modules loaded -PRELOADED_MAP 00400000-00452fff, C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe PRELOADED_BY_SYSTEM 00400000-00452fff, C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe SYSTEM_LOADED 00400000-00452fff, C:\test\AcroRd32.exe MEMORY_MAPPED_ANON 013b0000-020affff, C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.dll ----Timing Report: list of slowest 150 objects profiled --8255572220 total cycles (2955.56 ms): |sprof| thinapp_LoadLibrary2 765380728 cycles (274.01 ms) on log entry 21753 428701805 cycles (153.48 ms) on log entry 191955 410404281 cycles (146.93 ms) on log entry 193969 .
VMware, Inc. 131

ThinApp Users 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 . . ... 34 total calls 1099873523 total cycles (393.76 ms): |sprof| new_thread_start 561664565 cycles (201.08 ms) on log entry 151922 531551734 cycles (190.30 ms) on log entry 152733 1619002 cycles (0.58 ms) on log entry 72875

Potential Errors
ThePotential Errors Detectedsectionmarkslogentriesthatmightpostproblemswiththreeasterisks (***).Forinformationaboutinterpretingthissection,seeLocatingErrorsonpage 129.
----Potential Errors Detected --006425 0000075c LoadLibraryExW 'C:\Program Files\Adobe\Reader 8.0\Reader\Microsoft.Windows.Common-Controls.DLL' flags=2 -> 0 (failed ***) 006427 0000075c LoadLibraryExW 'C:\Program Files\Adobe\Reader 8.0\Reader\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL' flags=2 -> 0 (failed ***) 006428 0000089c nview.dll :1005b94b<-kernel32.dll:7c80ae4b *** LoadLibraryW ->HMODULE=7c800000h () *** GetLastError() returns 2 [0]: The system cannot find the file specified. 007062 0000075c LoadLibraryExW 'C:\Program Files\Adobe\Reader 8.0\Reader\en-US\Microsoft.Windows.Common-Controls.DLL' flags=2 -> 0 (failed ***) 010649 0000075c LoadLibraryExW 'C:\Program Files\Adobe\Reader 8.0\Reader\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL' flags=2 -> 0 (failed ***) 019127 0000075c MSVCR80.dll :781348cc<-msvcrt.dll :77c10396 *** GetEnvironmentVariableA ->DWORD=0h (OUT LPSTR lpBuffer=*0h <bad ptr>) *** GetLastError() returns 203 [0]: The system could not find the environment option that was entered. 019133 0000075c MSVCR80.dll :78133003<-nview.dll :1000058c *** GetProcAddress ->FARPROC=*0h () *** GetLastError() returns 127 [203]: The specified procedure could not be found. 019435 0000075c MSVCR80.dll :78136e08<-dbghelp.dll :59a60360 *** Getfile type ->DWORD=0h ()*** GetLastError() returns 6 [0]: The handle is invalid. 019500 0000075c MSVCR80.dll :78134481<-nview.dll :1000058c *** GetProcAddress ->FARPROC=*0h () *** GetLastError() returns 127 [0]: The specified procedure could not be found. 019530 0000075c MSVCR80.dll :78131dcd<-dbghelp.dll :59a603a1 *** GetModuleHandleA ->HMODULE=0h () *** GetLastError() returns 126 [0]: The specified module could not be found.

Troubleshooting Example for cmd.exe Utility


Inthetroubleshootingexample,ThinApppackagesthecmd.exeutilitywithloggingturnedon.Theexample showshowyoucansimulateapplicationfailurebyrunninganinvalidcommand.Ifyourequestthecmd.exe utilitytorunthefoobarcommand,theutilitygeneratesthefoobar is not recognized as an internal or external commandmessage.YoucanscanthetracefileandcheckthePotential Errors Detected sectiontofindtheAPIfunctionsthatmodifiedtheGetLastErrorcode. TheexampleshowstheC:\test\cmd_test\bin\foobar.*,C:\WINDOWS\system32\foobar.*,and C:\WINDOWS\foobarpathsasthelocationswherethecmd.exeutilitylooksforthefoobarcommand.

132

VMware, Inc.

Chapter 10 Monitoring and Troubleshooting ThinApp

Theexampleshowsthe%drive_C%\test\cmd_test\bin,%SystemSystem%\foobar,and %SystemRoot%\foobarpathsasthelocationsinthevirtualfilesystemthatThinAppprobes.
----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.* -> ffffffffh][no virtual or system matches] *** FindFirstFileW ->HANDLE=ffffffffh .. *** GetLastError() returns 2 [203]: The system cannot find the file specified. *** FindFirstFileW C:\test\cmd_test\bin\foobar -> INVALID_HANDLE_VALUE *** failed [FS missing in view 0][fs entry not found %drive_C%\test\cmd_test\bin\foobar] [fs entry not found %drive_C%\test\cmd_test\bin] *** FindFirstFileW C:\WINDOWS\system32\foobar.* -> INVALID_HANDLE_VALUE *** failed [system probe C:\WINDOWS\system32\foobar.* -> ffffffffh][no virtual or system matches] *** FindFirstFileW C:\WINDOWS\system32\foobar -> INVALID_HANDLE_VALUE *** failed [FS missing in view 0][fs entry not found %SystemSystem%\foobar] *** FindFirstFileW C:\WINDOWS\foobar.* -> INVALID_HANDLE_VALUE *** failed [system probe C:\WINDOWS\foobar.* -> ffffffffh][no virtual or system matches] *** FindFirstFileW C:\WINDOWS\foobar -> INVALID_HANDLE_VALUE *** failed [FS missing in view 0][fs entry not found %SystemRoot%\foobar]

Perform Advanced Examination for cmd.exe Log Entries AmorethoroughexaminationofanentryfromthePotential Errorssectionofatracefilemightinvolve searchingthefullbodyoftheLogMonitortracefileforthatspecificentryandreviewingthesystemcallsand conditionsleadingtothepotentialerror. Forexample,thefollowingentryforthecmd.exeutilityinthePotential Errorssectionmightrequirea morethoroughexaminationthroughouttheLogMonitortracefile.
001550 *** FindFirstFileW C:\test\cmd_test\bin\foobar.*' -> INVALID_HANDLE_VALUE *** failed [system probe

Perform an advanced examination of the cmd.exe entry 1 2 Todeterminewhythecmd.exeutilityprobesc:\test\cmd_test\bin,scanthelogforthislogentry numberanddeterminewhatoccursbeforethiscall. Todeterminethelocationswherethecmd.exeutilityobtainsthec:\test\cmd_test path,scanthelog forGetCurrentDirectoryWandGetFullPathNameWentries.
000861 0a88 cmd.exe :4ad01580->USERENV.dll :769c0396 GetCurrentDirectoryW (IN DWORD nBufferLength=104h) 000862 0a88 GetCurrentDirectoryW -> 0x14 (C:\test\cmd_test\bin) 000863 0a88 cmd.exe :4ad01580<-USERENV.dll :769c0396 GetCurrentDirectoryW ->DWORD=14h (OUT LPWSTR lpBuffer=*4AD34400h->L"C:\test\cmd_test\bin") 000864 0a88 cmd.exe :4ad05b74->ole32.dll :774e03f0 Getfile type (IN HANDLE hFile=7h) 000865 0a88 Getfile type 7 -> 0x2 000866 0a88 cmd.exe :4ad05b74<-ole32.dll :774e03f0 Getfile type ->DWORD=2h () . . 001533 0a88 cmd.exe :4ad01b0d<-kernel32.dll:7c80ac0f SetErrorMode ->UINT=0h () 001534 0a88 cmd.exe :4ad01b13->kernel32.dll:7c80ac0f SetErrorMode (IN UINT uMode=1h) 001535 0a88 cmd.exe :4ad01b13<-kernel32.dll:7c80ac0f SetErrorMode ->UINT=0h () 001536 0a88 cmd.exe :4ad01b24->IMM32.DLL :7639039b GetFullPathNameW (IN LPCWSTR lpFileName=*1638C0h->L."," IN DWORD nBufferLength=208h) 001537 0a88 GetFullPathNameW . -> 20 (buf=C:\test\cmd_test\bin, file_part=bin) 001538 0a88 cmd.exe :4ad01b24<-IMM32.DLL :7639039b GetFullPathNameW ->DWORD=14h (OUT LPWSTR lpBuffer=*163D60h->L"C:\test\cmd_test\bin," OUT *lpFilePart=*13D8D4h ->*163D82h->L"bin") . . 001549 0a88 cmd.exe :4ad01b5f->USERENV.dll :769c03fa FindFirstFileW (IN LPCWSTR lpFileName=*1638C0h->L"C:\test\cmd_test\bin\foobar.*") 001550 0a88 FindFirstFileW C:\test\cmd_test\bin\foobar.* -> INVALID_HANDLE_VALUE *** failed [system probe C:\test\cmd_test\bin\foobar.* -> ffffffffh][no virtual or system matches]

VMware, Inc.

133

ThinApp Users Guide

Thecmd.exeutilityobtainsthefirstlocationbycallingGetCurrentDirectoryWandthesecondlocation bycallingGetFullPathNameWwith.asthepathspecifies.Thesecallsreturnthepathforthecurrent workingdirectory.Thelogfileshowsthatthecmd.exeutilitycreatestheC:\test\cmd_test\bin> prompt.TheutilityqueriesthePROMPTenvironmentvariablethatreturns$P$Gandusesthe WriteConsoleWAPIfunctiontoprinttheprompttothescreenafterinternallyexpanding$P$Gto C:\test\cmd_test\bin>.

Troubleshooting Specific Applications


TroubleshootingtipsareavailableforcapturingMicrosoftOutlook,Explorer.exe,andJavaRuntime Environment.

Troubleshoot Registry Setup for Microsoft Outlook


MicrosoftOutlookstoresaccountsettingsinregistrykeysandfiles.WhenyoustartMicrosoftOutlookforthe firsttime,itchecksthatthekeysexist.IfMicrosoftOutlookcannotfindthekeys,itpromptsyoutocreatean account. ThisprocessworksproperlyinthevirtualenvironmentwhenMicrosoftOutlookisnotinstalledonthe physicalsystem.IftheuseralreadyhasMicrosoftOutlookinstalledonthephysicalsystem,thecaptured versionfindstheregistrykeysinthesystemregistryandusesthosesettings.YoumustuseFullisolationmode fortheregistrykeysandfileswhereMicrosoftOutlookstoresitssettings. Set up Full isolation mode for Microsoft Outlook registry keys 1 AddthefollowingentriestotheHKEY_CURRENT_USER.txtfile:
isolation_full HKEY_CURRENT_USER\Identities isolation_full HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles

Createa##Attributes.inifilewiththefollowingentries:
[Isolation] DirectoryIsolationMode=Full

Placethe##Attributes.inifileineachofthefollowingsubdirectories.
%AppData%\Microsoft\AddIns %AppData%\Microsoft\Office %AppData%\Microsoft\Outlook %Local AppData%\Microsoft\FORMS %Local AppData%\Microsoft\Outlook

(Optional)Ifthesubdirectoriesdonotexist,createthedirectories.

Viewing Attachments in Microsoft Outlook


MicrosoftOutlookcreatesadefaultdirectorytostoreattachmentswhenyouopenanattachmentforviewing. ThetypicallocationisC:\Documents and Settings\<user_name>\Local Settings\Temp\Temporary Internet Files\OLK<xxxx>.Thelastxxxxisreplacedbyarandomentry. YoucanviewattachmentswhentheviewingapplicationrunsinthesamevirtualsandboxasMicrosoft Outlook.ExternalapplicationsmightnotbeabletofindthefiletodisplaybecauseMicrosoftOutlookstores thefileinthesandbox.YoumustusetheMergedisolationmodeforthedirectorythatstorestheattachments. Set up Merged isolation mode to view Microsoft Outlook attachments 1 AddavaluetotheHKEY_CURRENT_USER.txtfilethatsetsthenameoftheattachmentdirectory:
isolation_full HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security Value=OutlookSecureTempFolder REG_SZ~%Profile%\Local Settings\OutlookTempxxxx#2300

Inthisexample,11.0inthekeynameisforMicrosoftOutlook2003.
134 VMware, Inc.

Chapter 10 Monitoring and Troubleshooting ThinApp

2 3

Replacethelastfourxxxxcharacterswithrandomalphanumericentriestoincreasesecurity. CreateadirectorythatisnamedintheOutlookSecureTempFolderregistrykeyinyourThinAppproject. Forexample,createthe%Profile%\Local Settings\OutlookTempxxxxdirectory.

Inthe%Profile%\Local Settings\OutlookTempxxxxdirectory,createa##Attributes.inifilewith thefollowingentries:


[Isolation] DirectoryIsolationMode=Merged

Starting Explorer.exe in the Virtual Environment


Runningoneinstanceoftheexplorer.exeutilityonaWindowsoperatingsystemmakesitdifficulttoadd anentrypointtoWindowsExplorerandstartitinsidethevirtualenvironment. YoucanusethefollowingmethodstoopenaWindowsExplorerwindowinsidethevirtualenvironment:

AddanentrypointtoiExplorerandstartitwiththe-Eparameter. Forexample,addthefollowingentriestothePackage.inifile:
[iexplore.exe] Shortcut=xxxx.exe Source=%ProgramFilesDir%\Internet Explorer\iexplore.exe CommandLine=%ProgramFilesDir%\Internet Explorer\iexplore.exe -E

Addthefollowingvirtualregistrykey:
isolation_full HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer Value=DesktopProcess REG_DWORD=#01#00#00#00

AddthefollowingentriestothePackage.inifile:
[explorer.exe] Shortcut=xxxxxx.exe Source=%SystemROOT%\explorer.exe

Usethismethodtobrowsethevirtualfilesystemwithafamiliarinterfaceandenableaccuratefiletype associationswithoutsystemchanges,especiallywhenusingportableapplications.Youcanaccess shellintegratedcomponentswithoutsystemchanges.

Troubleshooting Java Runtime Environment Version Conflict


AconflictmightoccurifoneversionofJavaisinstalledonthephysicalsystemandanotherversionisincluded inacapturedexecutablefile.UpdatedversionsofJavainstallapluginDLLthatInternetExplorerloads.This pluginDLLoverwritesvirtualregistrykeysandconflictswithavirtualizedcopyofolderJavaruntimes. Prevent Internet Explorer from loading plug-in DLLs AddthefollowingentrytothebeginningoftheHKEY_LOCAL_MACHINE.txtfile.
isolation_full HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects

VMware, Inc.

135

ThinApp Users Guide

136

VMware, Inc.

Glossary

ApplicationLink Autilitythatlinksdependentapplicationstoabaseapplicationatruntimeandstartsalltheapplications togetherwhenyoustartthebaseapplication.Youcanusetheutilitytodeployandupdatecomponent packagesseparatelyratherthancaptureallcomponentsinthesamepackage. ApplicationSync Autilitythatupdatesanapplicationbydetectinganewpackagedversiononaserverornetworkshare. Youcanconfigureupdatesettings,suchasthecheckingofanupdateserveratcertainintervals.ThinApp detectsthemostrecentapplicationexecutablefileanddownloadsthedifferences. attributes.ini Thefilethatappliesconfigurationsettingsatthedirectorylevelofthepackageratherthantheentire package.The##Attributes.inisettingsoverridetheoverallPackage.inisettings.

build ToconvertaThinAppprojectintoapackage.YoucanbuildapackagewiththeSetupCapturewizardor withthebuild.batutility. capture Topackageanapplicationintoavirtualenvironmentandsetinitialapplicationparameters.ThinApp providestheSetupCapturewizardorthesnapshot.exeutilitytocreateaportableapplicationpackage thatisindependentoftheoperatingsystemitrunson. cleanmachine Thecomputerorvirtualmachine,installedwithonlythebasicWindowsoperatingsystem,onwhichyou capturetheapplication.TheWindowsoperatingsystemversionmustbetheearliestversionofWindows thatyouexpecttheapplicationtorunon.

entrypoint Anexecutablefilethatstartsthecapturedapplication.Anapplicationmighthavemultipleentrypoints. Forexample,theFirefox.exefilemightserveasanentrypointforaMozillaFirefoxapplication.The primarydatacontainerfilecanexistwithinanentrypointorasa.datfile. inventoryname AnamethatThinAppusesforinternaltrackingoftheapplication.Theinventorynamesetsthedefault projectdirectorynameandappearsintheAddorRemoveProgramsdialogboxforWindows. isolationmode Apackagesettingthatdeterminesthereadandwriteaccesstothephysicalenvironment.ThinApphas WriteCopy,Merged,andFullisolationmodes.

VMware, Inc.

137

ThinApp Users Guide

logging.dll Autilitythatgenerates.tracefiles. LogMonitor Autilitythatcaptureschronologicalactivityforexecutablefilesthatthecapturedapplicationstarts.The log_monitor.exefileiscompatibleonlywithapplicationscapturedusingthesameversionofThinApp.

MSI AWindowsInstallercontainerthatisusefulforapplicationdeploymenttools.Youcandeliverthe capturedapplicationasanMSIfileinsteadofanexecutablefile.

native Referstothephysicalenvironmentratherthanthevirtualenvironment.Seealsophysical. networkstreaming Theprocessofrunningapackagefromacentralserver.ThinAppdownloadsblocksoftheapplicationas neededtoensurequickprocessinganddisplay.

package ThevirtualapplicationfilesthattheThinAppbuildprocessgenerates.Thepackageincludestheprimary datacontainerfileandentrypointfilestoaccesstheapplication. package.ini Thefilethatappliesconfigurationsettingstothepackageandthatresidesinthecapturedapplication folder.TheSetupCapturewizardsetstheinitialvaluesoftheconfigurationsettings. physical ReferstothecomputermemoryandfilesysteminwhichallstandardWindowsprocessesrun.Depending onThinAppisolationmodesettings,processesinthevirtualenvironmentcanaccessthephysical environment.Seealsonative,virtual. postscan Toestablishanimageorsnapshotofamachineafteryouinstalltheapplicationyouwanttocapture.The captureprocessstoresinavirtualfilesystemandvirtualregistrythedifferencesbetweentheprescanand postscanimages.Seealsoprescan,snapshot. prescan Toestablishabaselineimageorsnapshotofamachinebeforeyouinstalltheapplicationyouwantto capture.Thecaptureprocessstoresinavirtualfilesystemandvirtualregistrythedifferencesbetweenthe prescanandpostscanimages.Seealsopostscan,snapshot. primarydatacontainer Themainvirtualapplicationfile.Thefileisa.exefileora.datfilethatincludestheThinAppruntime andthereadonlyvirtualfilesystemandvirtualregistry.Theprimarydatacontainermustresideinthe same/bindirectorywithanysubordinateapplicationexecutablefilesbecauseentrypointsusethe informationintheprimarydatacontainer. project Thedatathatthecaptureprocesscreatesbeforeyoubuildapackage.Thecaptureprocessusesthe inventorynameasthedefaultprojectdirectoryname.Youcancustomizeparametersintheprojectfiles beforeyoubuildanapplicationpackage.Youcannotdeployacapturedapplicationuntilyoubuilda packagefromtheproject.

138

VMware, Inc.

Glossary

sandbox Thephysicalsystemfolderthatstoresruntimeuserchangestothevirtualapplication.Whenyoustartthe application,ThinAppincorporateschangesfromthesandbox.Whenyoudeletethesandbox,ThinApp revertstheapplicationtoitscapturedstate.Thedefaultlocationofthesandboxis %APPDATA%\Thinstall\<application_name>. sbmerge.exe Autilitythatmakesincrementalupdatestoapplications,suchastheincorporationofapluginora changeinabrowserhomepage.Thesbmerge.exeutilitymergesruntimechangesrecordedinthe sandboxbackintoaThinAppproject. snapshot ArecordingofthestateoftheWindowsfilesystemandregistryduringtheapplicationcaptureprocess. TheSetupCaptureprocessusesthesnapshot.exeutilitytotakeasnapshotbeforeandafterthe applicationisinstalledandstoresthedifferencesinavirtualfilesystemandvirtualregistry.Seealso postscan,prescan. snapshot.exe Autilitythatcreatesthesnapshotsofacomputerfilesystemandregistryandfacilitatestheprescanand postscanoperationsduringthecaptureprocess.OnlyadvanceduserswhobuildThinAppfunctionality intootherplatformsmightmakedirectuseofthisutility.Seealsopostscan,prescan,snapshot. snapshot.ini AconfigurationfilethatspecifiesthedirectoriesandsubkeystoexcludefromaThinAppprojectwhen youcaptureanapplication.Youcancustomizethisfileforapplications.

template.msi AtemplateforMSIfilesthatyoucancustomizetoadheretocompanydeploymentproceduresand standards.Forexample,youcanaddregistrysettingsforThinApptoaddtoclientcomputersaspartof theinstallation. thinreg.exe Autilitythatestablishesfiletypeassociations,setsupStartmenuanddesktopshortcuts,andfacilitates theopeningoffiles.Youmustrunthethinreg.exeutilitytoregisterexecutablefiles.MSIfilesautomate thethinreg.exeregistrationprocess. tlink.exe Autilitythatlinkskeymodulesduringthebuildprocess.

vftool.exe Autilitythatcompilesthevirtualfilesystemduringthebuildprocess. virtual Referstothelogicalfileandmemorywithinwhichacapturedapplicationruns.Processesinaphysical environmentcannotaccessthevirtualenvironment.Seealsophysical. virtualapplication Anapplicationthatyoucapturetomakeitportableandindependentoftheoperatingsystemitrunson. virtualfilesystem Thefilesystemasthecapturedapplicationseesit. virtualregistry Theregistryasthecapturedapplicationseesit. vregtool.exe Autilitythatcompilesthevirtualregistryduringthebuildprocess.

VMware, Inc.

139

ThinApp Users Guide

140

VMware, Inc.

Index

Symbols
##Attributes.ini comparing to Package.ini 24, 66 editing 24

A
Active Directory authorizing group access 18 controlling access to applications 45 using Package.ini parameters 45 API parameters AddForcedVirtualLoadPath 119 ExecuteExternalProcess 120 ExecuteVirtualProcess 121 ExitProcess 119 ExpandPath 120 GetBuildOption 121 GetCommandLine 122 GetCurrentProcessName 122 GetEnvironmentVariable 124 GetFileVersionValue 121 GetOSVersion 123 RemoveSandboxOnExit 124 SetEnvironmentVariable 124 SetfileSystemIsolation 125 SetRegistryIsolation 125 WaitForProcess 125 Application Link defining 53, 56 defining access with the PermittedGroups parameter 59 effect on isolation modes 59 file and registry collisions 60 linking packages to base applications and using Application Sync 60 optional links 93 parameters 91 path name formats 91 required links 92 sample workflow 57 setting up nested links 58 storing multiple versions of linked applications 60 view of 57

Application Sync clashing with automatic update capabilities 53 defining 53 editing parameters 54 effect on entry point executable files 55 effect on thinreg.exe 40 fixing incorrect updates 54 forcing updates with appsync.exe commands 61 maintaining the primary data container name 55 parameters 93 updating base applications with linked packages 60 updating thinreg.exe registrations 55 applications capturing 15 controlling access for Active Directory groups 45 data statistics 20 difference between Application Sync and Application Link 53 not supported by ThinApp 12 sandbox considerations during upgrade processes 64 side by side upgrading 63 streaming requirements and recommendations 48 updating 53

C
capturing applications from command line 29 IE6 on Windows XP 28 phases of 15 requirements and dependencies 15 using Setup Capture wizard 28 using ThinApp Converter 30 with the Setup Capture wizard 1623 with the snapshot.exe utility 109 cmd.exe, defining 17 compression for executable files 22 for trace files 129

VMware, Inc.

141

ThinApp Users Guide

computers defining a clean system 12 using virtual machines for clean systems 13 cut and paste operations, ThinApp limitations 49

M
Merged isolation mode 18 Microsoft Office capturing 25 customizing installation options 25 postscan options 26 requirements to capture 25 Microsoft Office 2007 configuring outside of capture process 27 Microsoft Vista, deploying MSI files 45 MSI files automating the thinreg.exe utility 21 building the database 43 customizing parameters 43 deploying on Microsoft Vista 45 generating 21, 22 modifying the Package.ini 43 overriding the installation directory 44 parameters 96

D
data container, See primary data container DCOM services, access for captured applications 12 deploying applications on network share 40 applications with deployment tools 39 executable files 40 MSI files 39 deployment tools, using MSI files 39 device drivers, incompatible with ThinApp 12 DLLs loading into memory 131 recording by Log Monitor 127 drivers, support for 49

E
entry points defining 17 for troubleshooting 17 in Setup Capture wizard 17 updating with Application Sync 55

N
nested links, using Application Link 58 network, streaming packages 47

O
operating systems support for 11 using the lowest version for ThinApp installation 13

G
global hook DLLs, reduced function with ThinApp 12

I
IE6 on Windows XP capturing 28 requirements 28 iexplore.exe, defining 17 installing ThinApp 13 inventory name, purpose of 21 isolation modes defining 18 Full 68 Merged 18 modifying 68 sample configuration 51 using Application Link 59 WriteCopy 19

P
Package.ini AccessDeniedMsg 72 Active Directory parameters 45 AddPageExecutePermission 72 AllowExternalKernelModeServices 81 AllowExternalProcessModifications 81 AllowUnsuppportedExternalChildProcesses 82 AnsiCodePage 87 AppSyncClearSandboxOnUpdate 94 AppSyncExpireMessage 94 AppSyncExpirePeriod 94 AppSyncUpdateFrequency 95 AppSyncUpdateMessage 95 AppSyncURL 94 AppSyncWarningFrequency 95 AppSyncWarningMessage 95 AppSyncWarningPeriod 96 AutoShutdownServices 82 AutoStartServices 82 BlockSize 83 CachePath 78 CapturedUsingVersion 86

L
log format 130 Log Monitor extra options 128 suspending and resuming logging 128 troubleshooting procedures 128 using 127
142

VMware, Inc.

Index

ChildProcessEnvironmentDefault 83 ChildProcessEnvironmentExceptions 83 CommandLine 88 common parameters 23 CompressionType 84 configuring Application Link parameters 91 configuring Application Sync parameters 93 configuring build parameters 71 configuring file and protocol association parameters 70 configuring individual application parameters 88 configuring isolation parameters 68 configuring locale parameters 87 configuring logging parameters 86 configuring MSI parameters 96 configuring object and DLL parameters 74 configuring process and service parameters 81 configuring runtime parameters 66 configuring sandbox parameters 100 configuring security parameters 72 configuring size parameters 83 configuring storage parameters 78 configuring version parameters 86 DirectoryIsolationMode 68 Disabled 88 DisableTracing 86 editing Application Sync parameters 54 ExcludePattern 71 ExternalCOMObjects 74 ExternalDLLs 75 FileTypes 70 ForcedVirtualLoadPaths 75 Icon 71 InventoryName 100 IsolatedMemoryObjects 76 IsolatedSynchronizationObjects 76 LocaleIdentifier 87 LocaleName 88 LogPath 86 modifying MSI parameters 43 MSI parameters 43 MSIArpProductIcon 96 MSICompressionType 85 MSIDefaultInstallAllUsers 96 MSIFilename 97 MSIInstallDirectory 97 MSIManufacturer 98 MSIProductCode 98 MSIProductVersion 98 MSIRequireElevatedPrivileges 99 MSIStreaming 100 MSIUpgradeCode 99
VMware, Inc.

NetRelaunch 66 NotificationDLLs 77 NotificationDLLSignature 77 ObjectTypes 77 OptimizeFor 85 OptionalAppLinks 93 OutDir 72 parameters 65102 parameters that apply to ##Attributes.ini 66 PermittedGroups 73 Protocols 70 QualityReportingEnabled 68 ReadOnlyData 89 RegistryIsolationMode 69 RemoveSandboxOnExit 101 RequiredAppLinks 92 ReserveExtraAddressSpace 89 RetainAllIcons 72 RuntimeEULA 67 SandboxCOMObjects 78 SandboxName 101 SandboxNetworkDrives 101 SandboxPath 102 SandboxRemovableDisk 102 Shortcut 89 Shortcuts 90 Source 90 StripVersionInfo 86 structure 66 UACRequestedPrivilegesLevel 74 UACRequestedPrivilegesUiAccess 74 UpgradePath 79 Version.XXXX 87 VirtualComputerName 67 VirtualDrives 80 VirtualizeExternalOutOfProcessCOM 78 WorkingDirectory 91 Wow64 68 packages building 23 configuring 22, 23, 65 defining 21 parameters applying settings at folder level instead of package level 24 for Application Link 91 for Application Sync 93 for build output 71 for file and block sizes 83 for file and protocol associations 70 for file storage 78 for individual applications 88 for isolation modes 68
143

ThinApp Users Guide

for locales 87 for logging 86 for MSI files 43, 96 for objects and DLLs 74 for permissions 72 for processes and services 81 for sandbox storage 100 for sbmerge.exe 62 for ThinApp runtime 66 for thinreg.exe 41 for versions 86 PermittedGroups, effect on Application Link 59 primary data container defining 21 maintaining the name with Application Sync 55 size implications 21 project files 22 projects, opening during capture process 22

R
regedit.exe, defining 17 relink defining 64 examples 64

Setup Capture wizard authorizing user groups 18 browsing projects 23 building packages 23 compressing packages 21 entry points 17 installing applications 16 inventory name 21 package settings 22 postscan operation 16 prescan operation 16 project location 21 setting isolation modes 20 shell integration, reduced functions with ThinApp 12 side by side applications upgrading 63 snapshot.exe creating snapshots from the command line 107 sample commands 109 sample procedure 109 snapshot.ini, defining 107, 110 support for applications 11 for operating systems 11

S
sandbox considerations for upgraded applications 64 defining 20 location 20, 105 parameters 100 search order 103 structure 106 sbmerge.exe commands 62 defining 60 merging runtime changes 61 scripts .bat example 116 .reg example 117 callback functions 115 file copy example 117 reasons for 116 service example 117 system registry example 118 timeout example 116 virtual registry example 117 services automatic startup 46 starting and stopping in packages 46

T
technical support required information for troubleshooting 127 ThinApp applications that are not supported 12 browsing project files 22 deployment options 39 directory files 13 folder macros 111 in a VMware View environment 39 installing 13 recommendation for clean computers 12 requirements for installing and capturing applications 11 streaming packages from the network 47 supported operating systems and applications 11 updating applications 53 updating runtime in packages 64 using thinreg.exe 40 ThinApp Converter capturing multiple applications 30 configuration file 32 detecting application installation processes 36 process overview 30 system requirements 32

144

VMware, Inc.

Index

ThinAppConverter.ini configuring AppSettings 37 configuring HostEnvironment 32 configuring Settings 35 configuring VirtualMachineN 33 predefined environment variables 38 ThinDirect extracting and registering 30 thinreg.exe defining 40 parameters 41 running 41 starting with MSI files 21 updating registrations with Application Sync 55 with Application Sync 40 troubleshooting Explorer.exe 135 Java Runtime Environment 135 Microsoft Outlook 134 providing required information to support 127 with Log Monitor 128

U
upgrading applications methods and considerations 5364 side by side 63

V
virtual file system format stages 111 representing path locations with macros 111 using 111 VMware View, using captured applications 39 vregtool, listing virtual registry contents 106

W
WriteCopy isolation mode 19

VMware, Inc.

145

ThinApp Users Guide

146

VMware, Inc.

Você também pode gostar