4.7.3

Table Of Contents
VMware, Inc. 81
Chapter 8 Creating ThinApp Scripts
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.
Returns
Thisfunctionreturnsaninteger.
0=Timeoutfails
1=Processexits
2=Processdoesnotexistorsecurityisdenied
Examples
id = ExecuteExternalProcess("C:WINDOWS\system32\cmd.exe")
WaitForProcess(id, 0)