EasyManua.ls Logo

VMware THINAPP 4.6 - 9 Creating Thinapp Scripts; Callback Functions

VMware THINAPP 4.6
146 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VMware, Inc. 115
9
Scriptsmodifythebehaviorofvirtualapplicationsdynamically.Youcancreatecustomcodebeforestartingan
applicationpackagedwithThinApporafteranapplicationexits.Youcanusescriptstoauthenticateusersand
loadconfigurationfilesfromaphysicaltovirtualenvironment.
Callbackfunctionsruncodeduringspecificevents.Ifapplications
createchildprocesses,usecallback
functionstoruncodeonlyinthemainparentprocess.
APIfunctionsrunThinAppfunctionsandinteractwiththeThinAppruntime.APIfunctionscanauthenticate
usersandpreventthestartofapplicationsforunauthorizedusers.
AddingscriptstoyourapplicationinvolvescreatinganANSItextfilewith
the.vbsfileextensionintheroot
applicationprojectdirectory.TherootprojectdirectoryisthesamedirectorythatcontainsthePackage.ini
file.Duringthebuildprocess,ThinAppaddsthescriptfilestotheexecutablefileandrunseachofthescript
filesatruntime.
ThinAppusesVBScripttorunscript
files.ForinformationaboutVBScript,seetheMicrosoftVBScript
documentation.YoucanuseVBScripttoaccessCOMcontrolsregisteredonthehostsystemorwithinthe
virtualpackage.
Thisinformationincludesthefollowingtopics:
“CallbackFunctions”onpage 115
“ImplementScriptsinaThinAppEnvironment”onpage 116
“A P I Functions”onpage 119
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.
Creating ThinApp Scripts
9

Table of Contents

Related product manuals