EasyManua.ls Logo

VMware THINAPP 4.6 - Expandpath; Executeexternalprocess

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...
ThinApp User’s Guide
120 VMware, Inc.
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.See“WaitForProcess”on
page 125.
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))

Table of Contents

Related product manuals