4.7.3

Table Of Contents
VMware, Inc. 77
Chapter 8 Creating ThinApp Scripts
ExecuteVirtualProcess
TheExecuteVirtualProcess(CommandLine)functionrunsacommandinsideofthevirtualenvironment.
Youcanusethisfunctiontomakechangestothevirtualenvironment.
Parameters
CommandLine
[in]Representationoftheapplicationandcommandlineparameterstorunoutsideofthevirtual
environment.
Returns
IntegerprocessID.YoucanusetheprocessIDwiththeWaitForProcessfunction.See“WaitForProcess”on
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.