Sie sind auf Seite 1von 100

ThinApp Users Guide

ThinApp 4.7

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 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.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 9
ThinAppRequirements 9 OperatingSystems,Applications,andSystemsThatThinAppSupports 9 ApplicationsThatThinAppCannotVirtualize 10 RecommendationsforInstallingThinApp 10 UsingaCleanComputer 10 UsingtheEarliestOperatingSystemRequiredforUsers 11 InstallThinAppSoftware 11 CheckingThinAppInstallationFiles 11

2 CapturingApplications 13
PhasesoftheCaptureProcess 13 PreparingtoCaptureApplications 13 CapturingApplicationswiththeSetupCaptureWizard 14 CreateaSystemImageBeforetheApplicationInstallation 14 RescantheSystemwiththeInstalledApplication 14 DefiningEntryPointsasShortcutsintotheVirtualEnvironment 15 SetEntryPoints 15 ManagewithVMwareHorizonApplicationManager 15 SetUserGroups 16 DefiningIsolationModesforthePhysicalFileSystem 16 SetFileSystemIsolationModes 18 StoringApplicationChangesintheSandbox 18 CustomizetheSandboxLocation 18 SendAnonymousStatisticstoVMware 18 CustomizeThinAppProjectSettings 19 DefiningPackageSettings 19 CustomizePackageSettings 20 OpeningProjectandParameterFiles 20 BuildVirtualApplications 21 AdvancedPackageConfiguration 21 ModifyingSettingsinthePackage.iniFile 21 ModifyingSettingsinthe##Attributes.iniFile 22 CapturingInternetExplorer6onWindowsXP 22 RequirementsforCapturingInternetExplorer6onWindowsXP 23 CaptureInternetExplorer6onWindowsXPbyUsingtheSetupCaptureWizard 23 ExtractingandRegisteringThinDirect 24 CapturingMultipleApplicationInstallerswithThinAppConverter 24 ThinAppConverterProcess 24 SystemRequirementsforRunningThinAppConverter 25 PreparingtheConfigurationFileforThinAppConverter 25 PredefinedEnvironmentVariables 31

3 DeployingApplications 33
ThinAppDeploymentOptions 33 DeployingThinAppwithDeploymentTools
VMware, Inc.

33
3

ThinApp Users Guide

DeployingThinAppintheVMwareViewEnvironment 33 DeployingThinApponNetworkShares 34 DeployingThinAppUsingExecutableFiles 34 EstablishingFileTypeAssociationswiththethinreg.exeUtility 34 ApplicationSyncEffectonthethinreg.exeUtility 34 Runthethinreg.exeUtility 35 Optionalthinreg.exeParameters 35 BuildinganMSIDatabase 37 CustomizingMSIFileswithPackage.iniParameters 37 ModifythePackage.iniFiletoCreateMSIFiles 37 ControllingApplicationAccesswithActiveDirectory 39 Package.iniEntriesforActiveDirectoryAccessControl 39 StartingandStoppingVirtualServices 40 AutomaticStartupforVirtualServices 40 UsingThinAppPackagesStreamedfromtheNetwork 41 HowThinAppApplicationStreamingWorks 41 RequirementsandRecommendationsforStreamingPackages 42 StreamThinAppPackagesfromtheNetwork 43 UsingCapturedApplicationswithOtherSystemComponents 43 PerformingPasteOperations 43 AccessingPrinters 43 AccessingDrivers 43 AccessingtheLocalDisk,theRemovableDisk,andNetworkShares 43 AccessingtheSystemRegistry 44 AccessingNetworkingandSockets 44 UsingSharedMemoryandNamedPipes 44 UsingCOM,DCOM,andOutofProcessCOMComponents 44 StartingServices 44 UsingFileTypeAssociations 44 SampleIsolationModeConfigurationDependingonDeploymentContext 45 ViewofIsolationModeEffectontheWindowsRegistry 45

4 UpdatingandLinkingApplications 47
ApplicationUpdatesThattheEndUserTriggers 47 ApplicationSyncUpdates 47 ApplicationLinkUpdates 50 ApplicationUpdatesThattheAdministratorTriggers 54 ForcinganApplicationSyncUpdateonClientMachines 55 UpdatingApplicationswithRuntimeChanges 55 AutomaticApplicationUpdates 56 DynamicUpdatesWithoutAdministratorRights 57 UpgradingRunningApplicationsonaNetworkShare 57 FileLocks 57 UpgradeaRunningApplication 57 SandboxConsiderationsforUpgradedApplications 58 UpdatingtheThinAppVersionofPackages 58 relinkExamples 58

5 LocatingtheThinAppSandbox 59
SearchOrderfortheSandbox 59 ControllingtheSandboxLocation 61 StoretheSandboxontheNetwork 61 StoretheSandboxonaPortableDevice SandboxStructure 62 MakingChangestotheSandbox 62
4

61

VMware, Inc.

Contents

ListingVirtualRegistryContentswithvregtool 62

6 CreatingThinAppSnapshotsandProjectsfromtheCommandLine 63
MethodsofUsingthesnapshot.exeUtility 63 CreatingSnapshotsofMachineStates 63 CreatingtheTemplatePackage.inifilefromTwoSnapshotFiles 64 CreatingtheThinAppProjectfromtheTemplatePackage.iniFile 64 DisplayingtheContentsofaSnapshotFile 65 Samplesnapshot.exeCommands 65 CreateaProjectWithouttheSetupCaptureWizard 65 Customizingthesnapshot.iniFile 66

7 ThinAppFileSystemFormatsandMacros 67
VirtualFileSystemFormats 67 ThinAppFolderMacros 67 ListofThinAppMacros 68 Processing%SystemRoot%inaTerminalServicesEnvironment 69

8 CreatingThinAppScripts 71
CallbackFunctions 71 ImplementScriptsinaThinAppEnvironment 72 .batExample 72 TimeoutExample 72 ModifytheVirtualRegistry 73 .regExample 73 StoppingaServiceExample 73 CopyingaFileExample 73 AddaValuetotheSystemRegistry 74 APIFunctions 75 AddForcedVirtualLoadPath 75 ExitProcess 75 ExpandPath 76 ExecuteExternalProcess 76 ExecuteVirtualProcess 77 GetBuildOption 77 GetFileVersionValue 77 GetCommandLine 78 GetCurrentProcessName 78 GetOSVersion 79 GetEnvironmentVariable 80 RemoveSandboxOnExit 80 SetEnvironmentVariable 80 SetfileSystemIsolation 81 SetRegistryIsolation 81 WaitForProcess 81

9 MonitoringandTroubleshootingThinApp 83
ProvidingInformationtoTechnicalSupport 83 LogMonitorOperations 83 TroubleshootActivitywithLogMonitor 84 PerformAdvancedLogMonitorOperations 84 LogFormat 86 TroubleshootingSpecificApplications 90 TroubleshootRegistrySetupforMicrosoftOutlook 90 ViewingAttachmentsinMicrosoftOutlook 90
VMware, Inc. 5

ThinApp Users Guide

StartingExplorer.exeintheVirtualEnvironment 91 TroubleshootingJavaRuntimeEnvironmentVersionConflict

91

Glossary Index 97

93

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.

VMware, Inc.

Installing ThinApp

YoucaninstallThinApptoisolateapplications,simplifyapplicationcustomization,deployapplicationsto differentoperatingsystems,andeliminateapplicationconflict. Thisinformationincludesthefollowingtopics:


ThinAppRequirementsonpage 9 RecommendationsforInstallingThinApponpage 10 InstallThinAppSoftwareonpage 11 CheckingThinAppInstallationFilesonpage 11

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.

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.

10

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.

11

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.

12

VMware, Inc.

Capturing Applications

Youcancaptureapplicationstopackageanapplicationintoavirtualenvironment. TheSetupCapturewizardisthemainmethodtocaptureapplicationsandsetinitialapplicationparameters. Advanceduserswhomustcaptureapplicationsfromthecommandlinecanusethesnapshot.exeutility insteadoftheSetupCapturewizard. Thissectionincludesthefollowingtopics:


PhasesoftheCaptureProcessonpage 13 PreparingtoCaptureApplicationsonpage 13 CapturingApplicationswiththeSetupCaptureWizardonpage 14 AdvancedPackageConfigurationonpage 21 CapturingInternetExplorer6onWindowsXPonpage 22 CapturingMultipleApplicationInstallerswithThinAppConverteronpage 24

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 50. Fortargetapplicationsthatrequirelocaleformats,suchasaspecificdateformat,youcancapturetheminan environmentwiththerequiredlocalesetting.ThinApprunsvirtualapplicationsaccordingtotheregionaland languagesettingsonthecapturesystemratherthanthesettingsonthesystemthatrunstheapplication. AlthoughyoucanmodifythedefaultlocalesettingbycommentingouttheLocaleIdentifierparameterin thePackage.inifileandrebuildingtheapplication,youcanavoidcomplicationsinthecaptureenvironment. ForinformationabouttheLocaleIdentifierparameter,seeLocaleIdentifieronpage 83.

VMware, Inc.

13

ThinApp Users Guide

Capturing Applications with the Setup Capture Wizard


Thecaptureprocesspackagesanapplicationandsetsinitialapplicationparameters.Ifyouuseavirtual machine,considertakingasnapshotbeforeyourunthewizard.Asnapshotoftheoriginalcleanstateenables youtoreverttothesnapshotwhenyouwanttocaptureanotherapplication. ThisinformationusesMozillaFirefoxasakeyexampleforapplicationcapture.

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 22. Formoreinformationaboutentrypoints,seeDefiningEntryPointsasShortcutsintotheVirtual Environmentonpage 15. 3 (Optional)Makeanynecessaryconfigurationchangestocomplywithyourcompanypolicies,suchas usingspecificsecuritysettingsoraparticularhomepage. Ifyoudonotmakeconfigurationchangesatthistime,eachusermustmakechanges. 4 (Optional)Starttheapplicationandrespondtoanymessagesforinformationbeforeyoucontinuewith theSetupCapturewizard. Ifyoudonotrespondtoanymessagesatthistime,eachuserwhousestheapplicationmustdosoduring theinitialstart.
14 VMware, Inc.

Chapter 2 Capturing Applications

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.

Manage with VMware Horizon Application Manager


YoucanuseVMwareHorizonApplicationManagertomanagethedeploymentandentitlementofThinApp packages.SeeUsingVMwareHorizonApplicationManagertoManagetheDeploymentandEntitlementofThinApp Packages,availablefromtheThinAppdownloadsite.

VMware, Inc.

15

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.

16

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.

17

ThinApp Users Guide

Set File System Isolation Modes


Thecaptureprocesssetsthelevelofreadandwriteaccesstothephysicalfilesystemtodeterminewhich directoriesarevisibleandwritablebythevirtualapplication. For informationaboutFullisolationandregistryisolationthatareavailableonlyoutsideoftheSetupCapture wizard,seeDirectoryIsolationModeonpage 64andRegistryIsolationModeonpage 65. 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.

18

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.

19

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 21. Theprojectincludesfolders,suchas%AppData%,thatrepresentfilesystempathsthatmightchangelocations whenrunningondifferentoperatingsystemsorcomputers.Mostfoldershave##Attributes.inifilesthat specifytheisolationmodeatthefolderlevel.

20

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,downloadacopyoftheThinappPackage.iniReferencefrom theThinAppdownloadsite

VMware, Inc.

21

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.

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.

22

VMware, Inc.

Chapter 2 Capturing Applications

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 14forafulloverviewofthestandard 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. Eachentrymustbeonaseparateline.

Youcanusewildcards,forexample*.example.com. Youcanspecifyasitesothatallpagesonthatsiteareredirected,forexample,www.example.com. Youcanspecifyasitenamefollowedbyapagename,sothatthespecificpageisredirected,for examplejavatester.org/version.html.

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

10

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

VMware, Inc.

23

ThinApp Users Guide

Extracting and Registering ThinDirect


AfteryouhavebuilttheInternetExplorer6package,youneedtoextractandregistertheThinDirectplugin onthetestmachine.TheThinDirectpluginmustbeinstalledaspartofthevirtualpackage.Thepluginis installedinyournativebrowserduringtheregistrationprocess. 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


OnvirtualmachinesrunningaWindowsoperatingsystem,youcanuseThinAppConvertertoconvert multipleapplicationinstallersintoThinApppackages.Afteryouprovideaconfigurationfilewithspecific settingsthattheconverteraccesses,ThinAppConverterrunsapplicationsinsilentmode.Silentmodemeans thattheprocessoccurswithoutrequiringuserinput,afterinitialconfigurationsettingsarespecified.ThinApp Convertertransparentlycapturesinstallationcontent,generatesThinAppprojects,andbuildtheprojectsinto aThinApppackageinvirtualmachinesyouspecifyintheconfigurationfile.Thisprocessisfullyautomated, fromwhenThinAppConverterstartstorununtiltheThinApppackageisbuilt. TheThinAppexecutablefileandtheapplicationinstallerscanrunonvirtualmachines.

ThinApp Converter Process


BeforeyourunThinAppConverter,youmustusetheThinAppConverter.iniconfigurationfileasa templatetospecifythevirtualmachineenvironmentonwhichtheapplicationstobeconvertedreside,the networksharepaths,andvariousothermandatoryandoptionalparameters.Youthenusethe-fcommand lineswitchtospecifytheconfigurationfilethatyoucreated,whichThinAppConverterwilluse.Forexample, ThinAppConverter.exe -f myConfig.ini. ThinAppConverterreadstheconfigurationfiletoidentifywhichinstallersaretobeconvertedandthevirtual machinesonwhichtheconversionistooccur. ThinAppConverterthenpowersoneachvirtualmachineandtakesasnapshotthatisusedafterthe conversionprocessiscomplete. Afterthesnapshotistaken,ThinAppConverterpushesasilentcaptureagenttovirtualmachines.Thesilent captureagentrunstransparentlyonthevirtualmachines,capturingtheapplicationinstallationprocessina similarwaytothatoftheSetupCapturewizardwhenasingleapplicationisbeingcaptured.Thesilentcapture agentperformsthefollowingactions:

24

RunsaThinAppprescan Installsanapplicationfromthenetworksharespecifiedintheconfigurationfile Runsapostscan GeneratesaThinAppprojectonthenetworksharespecifiedintheconfigurationfile Performsprojectpostprocessingtasks


VMware, Inc.

Chapter 2 Capturing Applications

BuildstheThinAppprojectonthenetworkshareintoapackage

ThesilentcaptureagentthenreturnscontroltotheThinAppConverter,whichrevertsthevirtualmachinesto theirprecapturestate,usingtheiroriginalsnapshot. Theprocessisthenrepeatedforthenextapplicationinstallationprocessthatneedstobeconverted.When multiplevirtualmachinesarespecified,thecaptureagentrunsonthemachinessimultaneously.Asavirtual machinebecomesavailable,itisonceagainusedforconvertingthenextapplication

ThinApp Converter Limitations

Notallapplicationinstallationprocessessupportsilentinstallationmode.ThinAppConverterdoesnot supportautomaticcaptureforaninstallationprocessthatdoesnotsupportsilentinstallation. Theinstallerdirectorynamemustnotcontaintheequalssymbol(=).

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.

VMware, Inc.

25

ThinApp Users Guide

YoucannotspecifymorethanoneESXserver.TousemorethanoneESXserver,configure ThinAppConverter.exe toconnecttoVMwarevCenterServer,whichmanagesmultipleESXservers. YoucanusealocallyinstalledVMwareWorkstation.

VirtualMachineHost ThenameofthevirtualmachinetowhichThinAppConverteristoconnect.

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

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

ThefollowingexampleshowsavirtualmachinespecifiedbyIPaddress.
[HostEnvironment] VirtualMachineHost=10.13.11.23

Thefollowingexampleshowsalocalmachinespecifiedaslocalhost.
[HostEnvironment] VirtualMachineHost=localhost

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


Youcanentercleartext. Youcanspecifyabase64encodedpasswordfortheHostLoginPasswordBase64parameter.Specifying anencodedpassworddoesnotincreasesecurity.YouneedtoprotecttheactualINIfile.

Allpasswordsarehandledinthesameway. HostLoginPasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. IfyoudonotwanttostorethevSphereServerpasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifaHostLoginPasswordisspecifiedintheconfigurationfile. Example Thefollowingexampleshowsatypicalhostenvironmentspecification.Thevirtualmachinenameisspecified astheESXserverhostname.Apasswordhasbeenspecified,howevertheuserwillstillbepromptedtoenter aspassword,asspecifiedinHostLoginPasswordPrompt.


[HostEnvironment] VirtualMachineHost=MyEsx.vmawre.com

26

VMware, Inc.

Chapter 2 Capturing Applications

HostLoginUserName=root HostLoginPassword=secret HostLoginPasswordPrompt=true

VirtualMachineN
TheVirtualMachineNsectionoftheconfigurationfilecontainsalistoftheWindowsbasedvirtualmachines thatwillbeutilizedintheconversionprocess. CreateaVirtualMachineX sectionforeachvirtualmachinethatyouwanttoinclude,andspecifytheir parameters.Xis1,andsubsequentvirtualmachinesectionsarenumberedsequentially. [VirtualMachineN]parametersaremandatory. VmxPath Specifytheconfigurationpathofthevirtualmachine. 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.YouneedtoprotecttheactualINI file.

Allpasswordsarehandledinthesameway. 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
VMware, Inc. 27

ThinApp Users Guide

UserName=administrator Password=secret PasswordPrompt=false

FollowingisanexampleforaVMwareWorkstationbasedvirtualmachine.Onvirtualmachine1, PasswordPrompthasbeensettotrue.Theuserwillbepromptedforapasswordeventhoughapasswordhas beenspecifiedintheconfiguration.


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

NOTEDonotplacethepathinquotationmarks,evenifthepathcontainsaspace.

Settings
TheSettingssectionoftheconfigurationfilecontainstheparametersfortheapplicationinstallationdirectory andThinAppprojectoutputdirectory,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. Youcanspecifyabase64encodedpasswordforthePasswordBase64 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

28

VMware, Inc.

Chapter 2 Capturing Applications

Specifythepasswordforconnectingtothenetworkshare.Youhavethefollowingoptionswhenyouspecify passwords:

Youcanentercleartext. Youcanspecifyabase64encodedpasswordforthePasswordBase64parameter.

OutputMountPasswordPrompt Specifiesthattheuserbepromptedtoenterapassword. Ifyoudonotwanttostorethenetworksharepasswordintheconfigurationfile,specifythevalueastrue. Whensettotrue,apromptalwaysappears,evenifapasswordisspecifiedintheconfigurationfile. Example Followingisanexampleofnetworksharespecifications.Theuserfortheapplicationinstallationdirectoryhas onlyreadpermissions.Forboththeinputandoutputnetworkshares,apromptwilldisplay,requiringauser toenterapassword.


[Settings] InputUncPath=\\AppInstallerServer\AppInstallers\ThinAppMigration InputMountUserName=readonlyUser InputMountPassword=secret InputMountPasswordPrompt=true OutputUncPath=\\DeploymentServer\ThinAppProj OutputMountUserName=readwriteUser OutputMountPassword=secret OutputMountPasswordPrompt=true

ThinApp Converter Logic for Detecting the Application Installation Processes


Fortheapplicationinstallersnetworkshare,ThinAppConverterexaminesallsubdirectoriesunderthe specifiedUNCpathrecursively,includingtheirsubdirectories.Foreachsubdirectory,itdetermineswhich commandtorunforsilentapplicationinstallationusingthefollowinglogic: 1 2 3 4 5 6 AttemptstofindavalueforInstallationCommandinthe[AppSettings:AppName]sectionofthe configurationfile.IfsuccessfulThinAppConverterusesthatvalue. Attemptstofindafilenamedinstall.cmdorinstall.bat.Ifsuccessful,ThinAppConverterrunsthat file. IfThinAppConverterfindsasingle.cmdor.batfile,itrunsthatfile. IfThinAppConverterfindsasingle.exefile,itrunsthatfile. IfThinAppConverterfindsasingle.mstfile,itrunsthatfileandaddsthenecessarysilentinstallation switches. IfThinAppConverterfindsasingle.msifile,itrunsthatfileandaddsthenecessarysilentinstallation switches.

IfnoneofthestepsenableThinAppConvertertofindacorrectinstallationcommand,thesubdirectoryis skipped.Awarningisloggedinthelogfile. YoumustremoveallnetworkconnectionstothefileserverreferenceintheINIfilefromthehostonwhichyou runThinAppConverter,topreventconflictbetweenusercredentials. PackageIniOverrideFile SpecifythefilepathtotheglobalPackage.inioverridefile. ThisoptionalparameterenablesyoutospecifyaglobaloverridefileforPackage.ini thatisgeneratedfor eachThinAppproject.ThevaluesintheoverridefilearemergedintoPackage.iniintheThinAppproject thatisgeneratedforeachapplication. Globaloverridesareusefulwhenyouhaveaglobalpolicysetting,forexample,PermittedGroupin Package.ini.

VMware, Inc.

29

ThinApp Users Guide

APackage.inioverridefileisformattedlikeastandardWindowsINIfile.YoucanaddINIparametersand valuesthatarerelevanttothePackage.inifile. Thepathisrelativetotheapplicationinstallersnetworkshare.Usingtheexampleforspecifyingthenetwork sharesfortheapplicationinstallersandThinAppprojects,ifyouspecify PackageIniOverrideFile=override.ini,ThinAppConverterwilltrytofindthefileunder \\AppInstallerServer\AppInstaller.Youcanprovideamoreexplicitvaluebyusingpredefined variables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 31. YoucanspecifyaPackage.inifileforeachapplication.Thisprocessisdescribedaspartofthe [AppSettings:AppName]section. ExclusionList SpecifyacommaorsemicolonseparatedlistofapplicationdirectoriesthatThinAppwillskipwhensearching forapplicationinstallers. Thelistiscaseinsensitive. YoucanspecifywildcardsforDOSstylefilenames.Forexample,Microsoft*. ?and*aresupported. Example Followingisanexampleofanexclusionspecificationusingawildcard.
[Settings] ExclusionList=App?.old;FireFox1.0

ProjectPostProcessingCommand Specifythefilepathtotheprojectpostprocessingcommand. Thefilepathisrelativetotheapplicationinstallersnetworkshare.Usingtheexampleforspecifyingthe networksharesfortheapplicationinstallersandThinAppprojects,ifyouspecify ProjectPostProcessingCommand=addscript.bat,ThinAppConverterwilltrytofindthefileunder \\AppInstallerServer\AppInstaller.Youcanprovideamoreexplicitvaluebyusingpredefined variables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 31. 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.

30

VMware, Inc.

Chapter 2 Capturing Applications

InstallationCommand SpecifyhowThinAppConvertershouldstarttheapplicationinstaller.Ifthereisnovalue,ThinAppConverter attemptstoselectoneinstallationcommandusingthelogicdescribedinThinAppConverterLogicfor DetectingtheApplicationInstallationProcessesonpage 29. PackageIniOverrideFile ThePackage.inioverridefilethatisappliedtoasingleapplicationinstaller.Whenthisparameterhasavalue, theglobaloverridefileisprocessedfirst,followedbythisapplicationspecificoverridefile. Thefilepathisrelativetotheapplicationinstallersubdirectory.Usingtheexampleatthebottomofthissection, ifyouspecifyPackageIniOverrideFile=override.ini,ThinAppConverterwilltrytofindthefileunder \\AppInstallerServer\AppInstaller\Adobe.Youcanprovideamoreexplicitvaluebyusingpredefined variables.Formoreinformation,seePredefinedEnvironmentVariablesonpage 31. ProjectPostProcessingCommand Specifytheprojectpostprocessingcommandforthespecificapplication. Whenthisparameterhasavalue,theglobaloverridefileisprocessedfirst,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

VMware, Inc.

31

ThinApp Users Guide

32

VMware, Inc.

Deploying Applications

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


ThinAppDeploymentOptionsonpage 33 EstablishingFileTypeAssociationswiththethinreg.exeUtilityonpage 34 BuildinganMSIDatabaseonpage 37 ControllingApplicationAccesswithActiveDirectoryonpage 39 StartingandStoppingVirtualServicesonpage 40 UsingThinAppPackagesStreamedfromtheNetworkonpage 41 UsingCapturedApplicationswithOtherSystemComponentsonpage 43 SampleIsolationModeConfigurationDependingonDeploymentContextonpage 45

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 37.

Deploying ThinApp in the VMware View Environment


YoucanuseVMwareViewtodistributeThinApppackages. Theworkflowfordeployingpackagesmightinvolvethefollowingtasks:

Creatingexecutablefilesforthecapturedapplications. Storingtheexecutablefilesonanetworkshare.

VMware, Inc.

33

ThinApp Users Guide

Creatingaloginscriptthatqueriesapplicationsentitledtotheuserandrunsthethinreg.exeutilitywith theoptionthatregisterstheapplicationsonthelocalmachine.Loginscriptsareusefulfornonpersistent desktops.SeeEstablishingFileTypeAssociationswiththethinreg.exeUtilityonpage 34. 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. 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.

34

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 35. 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 69. Table 31listsoptionalparametersforthethinreg.exeutility.Anycommandthatusesthe/aparameter requiresadministratorrights.

VMware, Inc.

35

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

36

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 38.

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

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 38.FormoreinformationaboutMSI parameters,seeConfiguringMSIFilesonpage 92.

Modify the Package.ini File to Create MSI Files


FormoreinformationaboutMSIparameters,seeCustomizingMSIFileswithPackage.iniParameterson page 37andConfiguringMSIFilesonpage 92. BeforeyoucanmodifyMSIparameters,youmustaddanentryfortheMSIFilenameparametertogenerate MSIfiles.

VMware, Inc.

37

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 92. 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.

38

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 69. InthefollowingPackage.inientry,App1andApp2inheritPermittedGroupsvalues.
[BuildOptions] PermittedGroups=Administrators;OfficeUsers [App1.exe] ... .. [App2.exe] ... ...

VMware, Inc.

39

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.

40

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.

41

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.

42

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.

43

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.

44

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.

45

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

46

VMware, Inc.

Updating and Linking Applications

Youcanupdatevirtualapplicationswithdifferentutilitiesdependingontheextentofchangeand dependenciesonotherapplications. Thisinformationincludesthefollowingtopics:


ApplicationUpdatesThattheEndUserTriggersonpage 47 ApplicationUpdatesThattheAdministratorTriggersonpage 54 AutomaticApplicationUpdatesonpage 56 UpgradingRunningApplicationsonaNetworkShareonpage 57 SandboxConsiderationsforUpgradedApplicationsonpage 58 UpdatingtheThinAppVersionofPackagesonpage 58

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. 47

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 89. 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,changethenameintheShortcutparametertoacommon name.Forexample,youcanuseFirefox.exeasaname. 3 ModifythePackage.inifileineachpackage. 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. MakesurethattheAppSyncURLpathisthesameinbothPackage.inifilesandpointstotheupdated version. 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.
48 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 15.

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 55.

VMware, Inc.

49

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.

50

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 13. ForinformationaboutrequiredandoptionalApplicationLinkparametersandformatsinthePackage.ini file,seeConfiguringDependentApplicationswithApplicationLinkonpage 87.

VMware, Inc.

51

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\cmd.exeto \\<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 87. Set up nested links 1 2 CaptureApplicationA. InthePackage.inifile,specifyApplicationBasarequiredoroptionalapplicationlink. Forexample,addRequiredLinks=\AppFolder\AppB\AppB.exetothefile.

52

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 68.

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 52.

VMware, Inc.

53

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.

54

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.

55

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 59. 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 54. NOTEIfyouusetheApplicationSyncutilitytoperformapplicationupdates,disabletheautoupdate capabilitiesoftheapplication.SeeUsingApplicationSyncinaManagedorUnmanagedEnvironmenton page 47.

56

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 54.

Inthecapturedproject. Ifyoumustupdateasmallsetoffilesorregistrykeys,replacethefilesinthecapturedproject. This approachisusefulforsoftwaredeveloperswhointegrateThinAppbuildswiththeirworkflow.

Upgrading Running Applications on a Network Share


ThinAppallowsyoutoupgradeorrollbackanapplicationthatisrunningonanetworkshareformultiple users.Theupgradeprocessoccurswhentheuserquitstheapplicationandstartsitasecondtime.InTerminal Serverenvironments,youcanhavemultipleusersexecutingdifferentversionsatthesametimeduringthe transitionperiod.

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.

57

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"

58

VMware, Inc.

Locating the ThinApp Sandbox

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


SearchOrderfortheSandboxonpage 59 ControllingtheSandboxLocationonpage 61 SandboxStructureonpage 62

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 97.

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

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

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

VMware, Inc.

59

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.

60

VMware, Inc.

Chapter 5 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 97. 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 97. 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.

61

ThinApp Users Guide

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

Registry.rw.tvrContainsallregistrymodificationsthattheapplicationmakes. Registry.rw.lckPreventsothercomputersfromsimultaneouslyusingaregistrylocatedonanetwork share. Registry.tvr.backupContainsabackupofthe.tvrfilethatThinAppuseswhentheoriginal.tvr fileiscorrupted.

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.

62

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 63 Samplesnapshot.exeCommandsonpage 65 CreateaProjectWithouttheSetupCaptureWizardonpage 65 Customizingthesnapshot.iniFileonpage 66

Methods of Using the snapshot.exe Utility


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

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.

63

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 6-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.

64

VMware, Inc.

Chapter 6 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 62describessamplecommandsforthesnapshot.exeutility.Theparametersarenotcasesensitive. ThecommandsarewrappedintheCommandcolumnbecauseofspacerestraints. Table 6-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.

65

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.

66

VMware, Inc.

ThinApp File System Formats and Macros

ThinAppstoresthedifferencesbetweensnapshotsduringthesetupcaptureprocessinavirtualfilesystemand virtualregistry.ThevirtualfilesystemusesfoldermacrostorepresentWindowsshellfolderlocations. Thisinformationaboutthevirtualfilesystemincludesthefollowingtopics:


VirtualFileSystemFormatsonpage 67 ThinAppFolderMacrosonpage 67

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.

VMware, Inc.

67

ThinApp Users Guide

Forexample,youmightcaptureanapplicationonasystemthathasC:\WINNTastheWindowsdirectoryand deploytheapplicationonasystemthathasC:\WindowsastheWindowsdirectory.ThinApptransparently convertsC:\WINNTto%SystemRoot%duringthecaptureprocessforthatsystemandexpands%SystemRoot% toC:\Windowsduringruntimeforthatsystem. 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 71liststheavailablefoldermacros. Table 7-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% 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

68

VMware, Inc.

Chapter 7 ThinApp File System Formats and Macros

Table 7-1. Folder Macros (Continued)


Macro Name %Internet Cache% %Local AppData% %My Pictures% %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>\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 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.

69

ThinApp Users Guide

70

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. Thisinformationincludesthefollowingtopics:

CallbackFunctionsonpage 71 ImplementScriptsinaThinAppEnvironmentonpage 72 APIFunctionsonpage 75

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

OnFirstSandboxOwnerCalledonlywhenanapplicationfirstlocksthesandbox.Thiscallbackisnot calledifasecondcopyofthesameapplicationusesthesamesandboxwhilethefirstcopyruns.Ifthefirst applicationspawnsasubprocessandquits,thesecondsubprocesslocksthesandboxandpreventsthis callbackfromrunninguntilallsubprocessesquitandtheapplicationrunsagain. OnFirstParentStartCalledbeforerunningaThinAppexecutablefileregardlessofwhetherthe sandboxissimutaneouslyownedbyanothercapturedexecutablefile. OnFirstParentExitCalledwhenthefirstparentprocessexits.Ifaparentprocessrunsachildprocess andquits,thiscallbackiscalledevenifthechildprocesscontinuestorun. OnLastProcessExitCalledwhenthelastprocessowningthesandboxexits.If aparentprocessrunsa childprocessandquits,thiscallbackiscalledwhenthelastchildprocessexits.

VMware, Inc.

71

ThinApp Users Guide

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

72

VMware, Inc.

Chapter 8 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.

73

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

74

VMware, Inc.

Chapter 8 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 71.

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.

75

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 81.

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))

76

VMware, Inc.

Chapter 8 Creating ThinApp Scripts

ExecuteVirtualProcess
TheExecuteVirtualProcess(CommandLine)functionrunsacommandinsideofthevirtualenvironment. Youcanusethisfunctiontomakechangestothevirtualenvironment.

Parameters
CommandLine [in]Representationoftheapplicationandcommandlineparameterstorunoutsideofthevirtual environment.

Returns
IntegerprocessID.YoucanusetheprocessIDwiththeWaitForProcessfunction.SeeWaitForProcesson page 81.

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.

77

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

78

VMware, Inc.

Chapter 8 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.

79

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"

80

VMware, Inc.

Chapter 8 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. 81

ThinApp Users Guide

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

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

82

VMware, Inc.

Monitoring and Troubleshooting ThinApp

YoucanuseLogMonitortogeneratetracefilesandtroubleshoottheThinAppenvironment.LogMonitoris compatibleonlywithanapplicationcapturedusingthesameversionofThinApp. Thisinformationincludesthefollowingtopics:


ProvidingInformationtoTechnicalSupportonpage 83 LogMonitorOperationsonpage 83 TroubleshootingSpecificApplicationsonpage 90

Providing Information to Technical Support


VMwaretechnicalsupportrequiresthefollowinginformationfromyoutotroubleshootaThinApp environment:

Stepbystepreproductionoftheprocedurethatyouperformedwhenyouencounteredtheproblem. Informationonthehostconfiguration.SpecifytheWindowsoperatingsystem,theuseofTerminalServer orCitrixXenapp,andanyprerequisiteprogramsthatyouinstalledonthenativemachine. CopiesoftheLogMonitortracefiles.SeeLogMonitorOperationsonpage 83. 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.


83

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.

84

VMware, Inc.

Chapter 9 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.

85

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.

86

VMware, Inc.

Chapter 9 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. 87

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 85.
----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.

88

VMware, Inc.

Chapter 9 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.

89

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.
90 VMware, Inc.

Chapter 9 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.

91

ThinApp Users Guide

92

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.

93

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.

94

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.

95

ThinApp Users Guide

96

VMware, Inc.

Index

Symbols
##Attributes.ini comparing to Package.ini 22 editing 22

A
Active Directory authorizing group access 16 controlling access to applications 39 using Package.ini parameters 39 API parameters AddForcedVirtualLoadPath 75 ExecuteExternalProcess 76 ExecuteVirtualProcess 77 ExitProcess 75 ExpandPath 76 GetBuildOption 77 GetCommandLine 78 GetCurrentProcessName 78 GetEnvironmentVariable 80 GetFileVersionValue 77 GetOSVersion 79 RemoveSandboxOnExit 80 SetEnvironmentVariable 80 SetfileSystemIsolation 81 SetRegistryIsolation 81 WaitForProcess 81 Application Link defining 47, 50 defining access with the PermittedGroups parameter 53 effect on isolation modes 53 file and registry collisions 54 linking packages to base applications and using Application Sync 54 sample workflow 51 setting up nested links 52 storing multiple versions of linked applications 54 view of 51 Application Sync clashing with automatic update capabilities 47 defining 47 editing parameters 48 effect on entry point executable files 49 effect on thinreg.exe 34

fixing incorrect updates 48 forcing updates with appsync.exe commands 55 maintaining the primary data container name 49 updating base applications with linked packages 54 updating thinreg.exe registrations 49 applications capturing 13 controlling access for Active Directory groups 39 data statistics 18 difference between Application Sync and Application Link 47 not supported by ThinApp 10 sandbox considerations during upgrade processes 58 streaming requirements and recommendations 42 updating 47

C
capturing applications IE6 on Windows XP 22 phases of 13 requirements and dependencies 13 using ThinApp Converter 24 with the Setup Capture wizard 1421 with the snapshot.exe utility 65 cmd.exe, defining 15 compression for executable files 20 for trace files 85 computers defining a clean system 10 using virtual machines for clean systems 11 cut and paste operations, ThinApp limitations 43

D
data container, See primary data container DCOM services, access for captured applications 10 deploying applications on network share 34 applications with deployment tools 33 executable files 34

VMware, Inc.

97

ThinApp Users Guide

MSI files 33 deployment tools, using MSI files 33 device drivers, incompatible with ThinApp 10 DLLs loading into memory 87 recording by Log Monitor 83 drivers, support for 43

N
nested links, using Application Link 52 network, streaming packages 41

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

E
entry points defining 15 for troubleshooting 15 in Setup Capture wizard 15 updating with Application Sync 49

P
Package.ini Active Directory parameters 39 common parameters 21 editing Application Sync parameters 48 modifying MSI parameters 37 MSI parameters 37 packages building 21 configuring 20, 21 defining 19 parameters applying settings at folder level instead of package level 22 for MSI files 37 for sbmerge.exe 56 for thinreg.exe 35 PermittedGroups, effect on Application Link 53 primary data container defining 19 maintaining the name with Application Sync 49 size implications 19 project files 20 projects, opening during capture process 20

G
global hook DLLs, reduced function with ThinApp 10

I
IE6 on Windows XP capturing 22 requirements 22 iexplore.exe, defining 15 installing ThinApp 11 inventory name, purpose of 19 isolation modes defining 16 Merged 16 sample configuration 45 using Application Link 53 WriteCopy 17

L
log format 86 Log Monitor extra options 84 suspending and resuming logging 84 troubleshooting procedures 84 using 83

R
regedit.exe, defining 15 relink defining 58 examples 58

M
Merged isolation mode 16 Microsoft Vista, deploying MSI files 39 MSI files automating the thinreg.exe utility 19 building the database 37 customizing parameters 37 deploying on Microsoft Vista 39 generating 19, 20 modifying the Package.ini 37 overriding the installation directory 38

S
sandbox considerations for upgraded applications 58 defining 18 location 18, 61 search order 59 structure 62 sbmerge.exe commands 56 defining 54 merging runtime changes 55 scripts

98

VMware, Inc.

Index

.bat example 72 .reg example 73 callback functions 71 file copy example 73 reasons for 72 service example 73 system registry example 74 timeout example 72 virtual registry example 73 services automatic startup 40 starting and stopping in packages 40 Setup Capture wizard authorizing user groups 16 browsing projects 21 building packages 21 compressing packages 19 entry points 15 installing applications 14 inventory name 19 package settings 20 postscan operation 14 prescan operation 14 project location 19 setting isolation modes 18 shell integration, reduced functions with ThinApp 10 snapshot.exe creating snapshots from the command line 63 sample commands 65 sample procedure 65 snapshot.ini, defining 63, 66 support for applications 9 for operating systems 9

updating runtime in packages 58 using thinreg.exe 34 ThinApp Converter capturing multiple applications 24 configuration file 25 detecting application installation processes 29 process overview 24 system requirements 25 ThinAppConverter.ini configuring AppSettings 30 configuring HostEnvironment 25 configuring Settings 28 configuring VirtualMachineN 27 predefined environment variables 31 ThinDirect extracting and registering 24 thinreg.exe defining 34 parameters 35 running 35 starting with MSI files 19 updating registrations with Application Sync 49 with Application Sync 34 troubleshooting Explorer.exe 91 Java Runtime Environment 91 Microsoft Outlook 90 providing required information to support 83 with Log Monitor 84

U
upgrading applications, methods and considerations 4758

V
virtual file system format stages 67 representing path locations with macros 67 using 67 VMware View, using captured applications 33 vregtool, listing virtual registry contents 62

T
technical support required information for troubleshooting 83 ThinApp applications that are not supported 10 browsing project files 20 deployment options 33 directory files 11 folder macros 67 in a VMware View environment 33 installing 11 recommendation for clean computers 10 requirements for installing and capturing applications 9 streaming packages from the network 41 supported operating systems and applications 9 updating applications 47

W
WriteCopy isolation mode 17

VMware, Inc.

99

ThinApp Users Guide

100

VMware, Inc.

Das könnte Ihnen auch gefallen