4.6

Table Of Contents
ThinApp User’s Guide
124 VMware, Inc.
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.YoucanchangethecleanupbehaviortoNobycalling
RemoveSandboxOnExitwith
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"