EasyManua.ls Logo

VMware THINAPP 4.6 - API Functions; Addforcedvirtualloadpath; Exitprocess

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. 119
Chapter 9 Creating ThinApp Scripts
4Addtheinformationinthesystemregistry.
RegEditPid = ExecuteExternalProcess("regedit /s " & chr(34) & RegFileName & chr(34))
WaitForProcess RegEditPid, 0
Waituntiltheprocessiscomplete.
5Cleantheenvironment.
fso.DeleteFile(RegFileName)
End Function
API Functions
YoucanuseAPIfunctionsthatinstructThinApptocompleteoperationssuchasloadDLLsasvirtualDLLS,
convertpathsfrommacroformattosystemformat,andruncommandsinsideofthevirtualenvironment.
AddForcedVirtualLoadPath
TheAddForcedVirtualLoadPath(Path)functioninstructsThinApptoloadallDLLsfromthespecifiedpath
asvirtualDLLseveniftheyarenotlocatedinthepackage.
UsethisfunctioniftheapplicationneedstoloadexternalDLLsthatdependonDLLslocatedinsidethe
package.
YoucanusetheForcedVirtualLoadPathsparameterinthe
Package.inifiletoachievethesameresultas
thisAPIfunction.See“ForcedVirtualLoadPaths”onpage 75.
Parameters
Path
[in]ThefilenameorpathforDLLstoloadasvirtual.
Examples
YoucanloadanyDLLlocatedinthesamedirectoryastheexecutablefileasavirtualDLL.
Origin = GetEnvironmentVariable("TS_ORIGIN")
TS_ORIGINisthepathfromwhichtheexecutablefileisrunning.
YoucandeletethefilenamefromTS_ORIGINbyfindingthelastbackslashandremovingallofthecharacters
thatfollowit.
LastSlash = InStrRev(Origin, "\")
SourcePath = Left(Origin, LastSlash)
YoucaninstructThinApptoloadallDLLsinthesameorlowerdirectoryfromwherethesourceexecutable
fileresides.
AddForcedVirtualLoadPath(SourcePath)
ThisprocessenablesyoutodropadditionalfilesintheSourcePathtreeandhavethemresolveimport
operationsagainstvirtualDLLs.
ExitProcess
TheExitProcessExitCodefunctionquitsthecurrentprocessandsetsthespecifiederrorcode.
Parameters
ExitCode
[in]Theerrorcodetoset.Thisinformationmightbeavailabletoaparentprocess.Avalueof0indicatesno
error.

Table of Contents

Related product manuals