ThinAppAPI
ThinAppAPI
EN-000191-00
ThinApp SDK API Reference Guide
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com
© 2009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property
laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents.
VMware, the VMware “boxes” logo and design, Virtual SMP, and VMotion are registered trademarks or trademarks of
VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks
of their respective companies.
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Contents
VMware, Inc. 3
ThinApp SDK API Reference Guide
GetOSVersion 26
GetEnvironmentVariable 26
RemoveSandboxOnExit 27
SetEnvironmentVariable 27
SetfileSystemIsolation 27
SetRegistryIsolation 28
WaitForProcess 28
4 VMware, Inc.
About This Book
The ThinApp SDK API Reference Guide provides information about developing applications using theVMware®
ThinApp™ SDK. VMware provides many different APIs and SDKs for various applications and goals. This
book provides information about the ThinApp SDK for developers that are interested in building applications
that interact with VMware ThinApp virtual packages.
Revision History
This book is revised with each release of the product or when necessary. A revised version can contain minor
or major changes. Table 1 summarizes the significant changes in each version of this book.
Intended Audience
ThinApp SDK users typically include software developers who use programming languages such as C++ and
script languages such as VBScript to create applications that work with ThinApp packages.
Document Feedback
VMware welcomes your suggestions for improving our documentation. Send your feedback to
docfeedback@vmware.com.
Support Offerings
To find out how VMware support offerings can help meet your business needs, go to
http://www.vmware.com/support/services.
VMware, Inc. 5
ThinApp SDK API Reference Guide
6 VMware, Inc.
1
“ThinApp.Management” on page 7
“ThinApp.Package” on page 8
“ThinApp.VFileSystem” on page 12
“ThinApp.VFile” on page 15
“ThinApp.VFolder” on page 17
“ThinApp.VRegistry” on page 18
“ThinApp.VRegKey” on page 18
“ThinApp.VRegValue” on page 19
“ThinApp.Option” on page 19
ThinApp.Management
To allow your application or script to use the ThinApp SDK, you must create a ThinApp.Management object.
This object provides generic services like determining whether a specific file is a ThinApp virtual package or
not.
Properties
This object has no properties.
Methods
Invoke a method on a ThinApp.Management object by calling the method with the specified parameters. For
example, the following command invokes the AppSyncUpdateAvailable method of an object named
myPackage.
myPackage.AppSyncUpdateAvailable([appsyncurl])
VMware, Inc. 7
ThinApp SDK API Reference Guide
GetThinAppType
object.GetThinAppType(filespec)
Returns the ThinApp type of a file. The following file types are valid:
0 — THINAPP_TYPE_UNKNOWN
1 — THINAPP_TYPE_MAIN_DATA_CONTAINER
2 — THINAPP_TYPE_SHORTCUT_EXE
3 — THINAPP_TYPE_THICK_MSI
4 — THINAPP_TYPE_THIN_MSI
5 — THINAPP_TYPE_OLD_MSI
OpenPackage
object.OpenPackage(filespec)
ThinApp.Package
The ThinApp.Package object provides properties and methods that deal with the package as a whole. For
example, you can use the properties and methods to determine the ThinApp version that produced the
package or obtain a bill of materials that contains a list of all files and registry keys contained in the package.
Properties
Retrieve properties by accessing a property name of a ThinApp.Package object. For example, the following
command retrieves the InventoryName property of an object named myPackage.
myPackage.InventoryName
MSIVersion string Returns the MSI version number of the package. This property
is read-only and is available for MSI-type packages.
8 VMware, Inc.
ThinApp SDK Objects
ThinAppType integer Returns the ThinApp type of a file. This property is read-only.
The following are valid ThinApp types:
1 — THINAPP_TYPE_MAIN_DATA_CONTAINER
2 — THINAPP_TYPE_SHORCUT_EXE
3— THINAPP_TYPE_THICK_MSI
4 — THINAPP_TYPE_THIN_MSI
5 — THINAPP_TYPE_OLD_MSI
ThinAppVersion string Returns the ThinApp version used to create the package. This
property is read-only.
Methods
Invoke a method of a ThinApp.Package object by calling the method with the specified parameters. For
example, the following command invokes the AppSync method of an object named myPackage.
myPackage.AppSync(flags, [appsyncurl])
AppSync
object.AppSync(flags, [appsyncurl])
Updates the package if an update is available. The following table lists the arguments for this method.
appsyncurl Optional The URL address to check for an update. If not present,
the Package.ini AppSyncURL setting is used.
AppSyncUpdateAvailable
object.AppSyncUpdateAvailable([appsyncurl])
Indicates whether an AppSync update is available. The following table lists the arguments for this method.
appsyncurl Optional The URL address to check for an update.f not present,
the Package.ini AppSyncURL setting is used.
GetOptions
object.GetOptions()
Returns a collection of ThinApp.Option objects. The following table lists the arguments for this method.
VMware, Inc. 9
ThinApp SDK API Reference Guide
GetOptionalAppLinks
object.GetOptionalAppLinks(searchpath)
Returns a collection of ThinApp.Package objects for all optional AppLinks. The following table lists the
arguments for this method.
GetRequiredAppLinks
object.GetRequiredAppLinks(searchpath)
Returns a collection of ThinApp.Package objects for all required AppLinks. The following table lists the
arguments for this method.
GetShortcutList
object.GetShortcutList( )
Returns a semicolon-separated list of shortcuts for this package. The following table lists the arguments for
this method.
GetVFileSystemObject
object.GetVFileSystemObject(reserved)
Returns a ThinApp.VFileSystemObject object. The following table lists the arguments for this method.
GetVRegistryObject
object.GetVRegistryObject(reserved)
Returns a ThinApp.VRegistryObject object. The following table lists the arguments for this method.
10 VMware, Inc.
ThinApp SDK Objects
MacroToPath
object.MacroToPath(macrofilespec)
Expands a macro and returns the full path. The following table lists the arguments for this method.
PathToMacro
object.PathToMacro(filespec)
Converts a path to its macro form. The following table lists the arguments for this method.
RetrieveIcon
object.RetrieveIcon(iconfilename, filename)
Retrieves the icon for the main data container, a shortcut executable, or the package as a whole and stores it in
a .ico file. The following table lists the arguments for this method.
iconfilename Required The output filename where the icon is stored in .ico
format.
filename Optional If specified, the name of the main data container or
shortcut executable. If not specified, obtain the icon for
the package as a whole.
Install
object.Install([installdir], flags)
Installs the package on a workstation and creates shortcuts, file type associations, and so on. The following
table lists the arguments for this method.
VMware, Inc. 11
ThinApp SDK API Reference Guide
Register
object.Register(flags)
Installs the shortcuts, file type associations, and so on. The following table lists the arguments for this method.
UnRegister
object.Unregister( )
Unregister shortcuts, file type association, and so on. The following table lists the arguments for this method.
Uninstall
object.Uninstall( )
Uninstalls a package from a workstation. The following table lists the arguments for this method.
ThinApp.VFileSystem
Use the ThinApp.VFileSystem object to obtain information about the Virtual File System contained in a
package. This object can be obtained from a ThinApp.Package object and is modeled after the scripting
FileSystem object. The ThinApp.VFolder object provides information about folders and the
ThinApp.VFile object provides information about individual files.
Properties
This object has no properties.
Methods
Invoke a method of a ThinApp.VFileSystem object by calling the method with the specified parameters. For
example, the following command invokes the DriveExists method of an object named myPackage.
myPackage.DriveExists(drivespec)
12 VMware, Inc.
ThinApp SDK Objects
BuildPath
object.BuildPath(oldpath, name)
Constructs a new path name by appending a name to a path. The following table lists the arguments for this
method.
oldpath Required The path name does not have to exist in the virtual file
system.
name Required The name to add to the path. The resulting path does not
have to exist in the virtual file system.
DriveExists
object.DriveExists(drivespec)
Returns True if the drive exists as a %drive_X% path in the virtual file system, False otherwise. The following
table lists the arguments for this method.
drivespec Required The drive letter or full path. If a full path is used, the
drive letter is taken from the path.
FileExists
object.FileExists(macrofilespec)
Returns True if the file exists in the virtual file system, False if it does not exist. The following table lists the
arguments for this method.
macrofilespec Required The full path name in a macro notation of the file to be
checked.
FolderExists
object.FolderExists(filespec)
Returns True if the folder exists in the virtual file system, False if it does not exist. The following table lists
the arguments for this method.
filespec Required The full path name in a macro notation of the folder to
be checked.
VMware, Inc. 13
ThinApp SDK API Reference Guide
GetBaseName
object.GetBaseName(filespec)
Returns the base part (the name without extension or path) of a filename. The following table lists the
arguments for this method.
filespec Required The filename for which the base part is to be determined.
GetExtensionName
object.GetExtensionName(filespec)
Returns the extension part of a filename. The following table lists the arguments for this method.
GetFile
object.GetFile(macrofilespec)
Returns a ThinApp.VFile object for the file specified. The following table lists the arguments for this method.
macrofilespec Required The full path in macro format to the file in the virtual file
system.
GetFileName
object.GetFileName(filespec)
Returns the filename part (consisting of base part and extension part) from a full path specification. The
following table lists the arguments for this method.
filespec Required The path for which the filename part is to be determined.
GetFileVersion
object.GetFileVersion(macrofilespec)
Returns the version of the file specified. The following table lists the arguments for this method.
macrofilespec Required The full path in macro format to the file in the virtual file
system.
14 VMware, Inc.
ThinApp SDK Objects
GetFolder
object.GetFolder(macrofilespec)
Returns a ThinApp.VFolder object for the folder specified. The following table lists the arguments for this
method.
macrofilespec Required The full path in macro format to the folder in the virtual
file system.
GetParentFolderName
object.GetParentFolderName(filespec)
Returns the name of the parent folder for the file/folder specified. The following table lists the arguments for
this method.
filespec Required The name of the file/folder for which the parent folder is
to be determined.
ThinApp.VFile
The ThinApp.VFile object is modeled after the scripting File object and provides information about
individual files contained in the ThinApp package.
Properties
Retrieve properties by accessing a property name of a ThinApp.vFile object. For example, the following
command retrieves the DateCreated property of an object named myPackage.
myPackage.DateCreated
Attributes string Returns the attributes of the file. This property is read-only.
DateCreated date Returns the date the file was created. This property is
read-only.
DateLastAccessed date Returns the date the file was last accessed. This property is
read-only.
DateLastModified date Returns the date the file was last modified. This property is
read-only.
FileVersion string Returns the version of the file in the format x.x.x.x. This
property is read-only.
InternalName string Returns the internal name from the version information. This
property is read-only.
Language string Returns the language from the version information. This
property is read-only.
Manufacturer string Returns the manufacturer from the version information. This
property is read-only.
Name string Returns the name of the file. This property is read-only.
VMware, Inc. 15
ThinApp SDK API Reference Guide
Path Returns the full name in macro format of the file. This property
is read-only.
ProductName string Returns the product name from the version information. This
property is read-only.
ProductVersion string Returns the product version from the version information.
This property is read-only.
ShortName string Returns the ThinApp-style short name of the file. This
property is read-only.
ShortPath Returns the ThinApp-style short path of the file. This property
is read-only.
Size integer Returns the size of the file in bytes. This property is read-only.
TranslationKey Returns the translation key from the version information. This
property is read-only.
Type Returns a description of the file, based on its extension. For
example, “MS-DOS Batch File” might be returned for a .bat
file. This property is read-only.
Methods
Invoke a method of a ThinApp.VFile object by calling the method with the specified parameters. For
example, the followingcommand invokes the GetHash method of an object named myPackage.
myPackage.GetHash(hashtype)
GetHash
object.GetHash(hashtype)
Returns a hash of the file contents. The following table lists the arguments for this method.
VerifyContents
object.VerifyContents(offset, expected, matchtype)
Verifies if the contents of the file at a certain offset matches some expected value. The following table lists the
arguments for this method.
offset Required Start offset of the bytes you want to verify. If the value is
-1, the method verifies if the bytes appear anywhere in
the file.
16 VMware, Inc.
ThinApp SDK Objects
ThinApp.VFolder
The ThinApp.VFolder object is modeled after the scripting Folder object and provides information about
folders in a ThinApp package.
Properties
Retrieve properties by accessing a property name of a ThinApp.vFolder object. For example, the following
command retrieves the Attributes property of an object named myPackage.
myPackage.Attributes
Attributes string Returns the attributes of the folder. This property is read-only.
DateCreated date Returns the date the folder was created. This property is
read-only.
DateLastAccessed date Returns the date the folder was last accessed. This property is
read-only.
DateLastModified date Returns the date the folder was last modified. This property is
read-only.
Files string Returns a collection of ThinApp.VFile objects for all the files
stored in the folder.
IsRootFolder string Returns True if the folder is the root folder of the virtual file
system, False if it is not.
Name string Returns the name of the folder. This property is read-only.
ShortName string Returns the ThinApp-style short name of the folder. This
property is read-only.
Methods
Invoke a method of a ThinApp.VFolder object by calling the method with the specified parameters. For
example, the following command invokes the GetFilesByExtension method of an object named
myPackage.
myPackage.GetFilesByExtension(extension)
GetFilesByExtension
object.GetFilesByExtension(extension)
Returns a collection of ThinApp.VFile objects for all the files in a folder with a given extension. The following
table lists the arguments for this method.
VMware, Inc. 17
ThinApp SDK API Reference Guide
ThinApp.VRegistry
You can use the ThinApp.VRegistry object to obtain information about the Virtual Registry contained within
the package. The ThinApp.VRegistry object provides information about registry keys and the
ThinApp.VRegistryValue object provides information about individual registry values.
Properties
This object has no properties.
Methods
Invoke a method of a ThinApp.VRegistry object by calling the method with the specified parameters. For
example, the following command invokes the OpenKey method of an object named myPackage.
myPackage.OpenKey(base)
OpenKey
object.OpenKey(base, keypath)
Returns a ThinApp.VRegKey object for the specified key. The following table lists the arguments for this
method.
base Required Base key. The following are valid base key values:
HKLM - HKEY_LOCAL_MACHINE
HKCU - HKEY_CURRENT_USER
HKCR - HKEY_CLASSES_ROOT
ThinApp.VRegKey
The ThinApp.VRegKey object contains information about the registry keys within a ThinApp package.
Properties
Retrieve properties by accessing a property name of a ThinApp.vRegKey object. For example, the following
command retrieves the GetValues property of an object named myPackage.
myPackage.GetValues
Methods
This object has no methods.
18 VMware, Inc.
ThinApp SDK Objects
ThinApp.VRegValue
The ThinApp.VRegistryValue object provides information about individual registry values within a
ThinApp package.
Properties
Retrieve properties by accessing a property name of a ThinApp.vRegValue object. For example, the following
command retrieves the Name property of an object named myPackage.
myPackage.Name
Type Returns the type of the value. The following are valid types:
1 - REG_SZ
2 - REG_EXPAND_SZ
3 - REG_BINARY
4 - REG_DWORD
7 - REG_MULTI_SZ
Methods
This object has no methods.
ThinApp.Option
The ThinApp.Option object provides information about Package.ini settings.
Properties
Retrieve properties by accessing a property name of a ThinApp.Option object. For example, the following
retrieves the Name property of an object named myPackage.
myPackage.Name
Name string Returns the name of the Package.ini option. This property is
read-only.
Methods
This object has no methods.
VMware, Inc. 19
ThinApp SDK API Reference Guide
20 VMware, Inc.
2
A NotificationDLLSignature option might be present in the Package.ini. If this option is set to “*", the
DLL must be properly authenticode-signed. If the option is set to something else than "*", the DLL must be
signed by that entity, for example "VMware, Inc.". If the DLL is not signed correctly, an error message is shown
and the DLL is not loaded.
NOTE The DLL functions are called synchronously, so to preserve the user experience, they should return as
quickly as possible. For example, avoid making calls that require making a network connection.
OnFirstSandboxOwner
Called only when an application first locks the sandbox. This notification is not called if a second copy of the
same application is launched using the same sandbox while the first copy is still running. If a first application
spawns sub-process and then quits, the sandbox remains locked by the second sub-process so this callback
does not start again until all sub processes have quit and the application is run again.
void_stdcall OnFirstSandboxOwner()
OnFirstParentStart
Called prior to starting a ThinApp executable file regardless of whether the sandbox is simultaneously owned
by another captured executable.
void_stdcall OnFirstParentStart()
VMware, Inc. 21
ThinApp SDK API Reference Guide
OnGetOption
Called when the ThinApp runtime must obtain the Package.ini setting of selected options.
void_stdcall OnGetOption(BSTR OptionName, BSTR *OptionValue)
OnFirstParentExit
Called when the first parent process exits. If a parent process starts a child process and quits, this callback is
called even if the child process continues to run.
void_stdcall OnFirstParentExit()
OnLastProcessExit
Called when the last process owning the sandbox exits. If a parent process starts a child process and quits, this
callback is called when the last child process exits.
void_stdcall OnLastProcessExit()
AddForcedVirtualLoadPath
Instructs the ThinApp application to load all DLLs from the specified path as virtual DLLs, even if they are not
located in the package. Use this function if the application must load external DLLs that have dependencies
on DLLs located inside the package.
Example 2-1. Loading a DLL Located in the Same Directory as the Executable as a Virtual DLL.
To delete the filename from TS_ORIGIN, find the last back slash and remove everything after it.
LastSlash = InStrRev(Origin, "\")
SourcePath = Left(Origin, LastSlash)
Set ThinApp to load all DLLs in the same directory (or deeper) from where the source executable is located.
This setup allows you to drop additional files in the SourcePath tree and have them resolve imports against
virtual DLLs.
AddForcedVirtualLoadPath(SourcePath)
22 VMware, Inc.
ThinApp API SDK Functions and Notifications
ExitProcess
Quits the current process and sets the specified error code.
ExitCode Required Input The error code to set. This information might be
available to a parent process. Typically, a value of 0 is
used to indicate no error.
NOTE As the process exits, the scripting system receives its Function OnEndProcess callback. Also, any
DLLs that are loaded run their termination code so that they can properly clean up.
ExpandPath
Converts a path from macro format to system format and returns the expanded macro path in system format.
NOTE All macro paths must escape the % and # characters by replacing these characters with #25 and #23.
ExecuteExternalProcess
Runs a command outside of the virtual environment and returns the process ID. The process ID can be used if
you need to make real system changes.
CommandLine Required Input The application and command line parameters to run
outside of the virtual environment.
To run a command that requires quotes in the command-line, use the following syntax:
ExecuteExternalProcess("regsvr32 /s " and chr(34) and "c:\Program
Files\my.ocx" and chr(34))
VMware, Inc. 23
ThinApp SDK API Reference Guide
ExecuteVirtualProcess
Runs a command inside of the virtual environment and returns the process ID. The process ID can be used if
you need to make changes to the virtual environment.
CommandLine Required Input The application and command line parameters to run outside
of the virtual environment.
To run a command that requires quotes in the command-line, use the following syntax:
ExecuteVirtualProcess("regsvr32 /s " and chr(34) and "c:\Program Files\my.ocx" and chr(34))
GetBuildOption
Returns the value of a setting specified in the BuildOptions option of the Package.ini file. If the requested
OptionName value does not exist, an empty string is returned.
Package.ini contains:
[BuildOptions]
DemoOption=DemoValue
GetFileVersionValue
Returns a version information value from a specific DLL, executable, OCX, and so on. This function can be
used to determine the internal version number of a DLL or to retrieve information about the copyright owner
of a DLL, or product name associated with the DLL. If the requested Filename does not exist or the specified
Value arguments cannot be located in the file, the value of “” is returned.
24 VMware, Inc.
ThinApp API SDK Functions and Notifications
FileName Required Input The name of the filename whose version information is
being retrieved.
Value Required Input The name of the Value to retrieve from the version
information section of the specified file. The following
values can be retrieved from most DLLs:
Comments
InternalName
ProductName
CompanyName
VMware, Inc. 151
Appendix E Using Scripts
LegalCopyright
ProductVersion
FileDescription
LegalTrademarks
PrivateBuild
FileVersion
OriginalFilename
SpecialBuild
GetCommandLine
Allows you to access the command-line parameters that are passed to the program that is currently running.
Returns a string that represents the command line arguments passed to the current running program,
including the original executable.
GetCurrentProcessName
Allows you to access the full virtual path name of the current process. Returns a string that represents the full
executable path name inside of the virtual environment. Typically this is c:\Program Files\... even
though the package source might be running from a network share.
Example 2-9. Retrieving the Virtual Path Name of the Current Process.
MsgBox "Running EXE path is " + GetCurrentProcessName
VMware, Inc. 25
ThinApp SDK API Reference Guide
GetOSVersion
Returns information about the current version of Windows in the following format:
MAJOR.MINOR.BUILD_NUMBER.PLATFORM_ID OS_STRING
6 - Windows Vista
5 - Windows XP
5 - Windows 2000
4 - Windows NT 4.0
0 - Windows Vista
1 - Windows XP
0 - Windows 2000
0 - Windows NT 4.0
51 - Windows NT 3.51
2 - Windows Server 2003, Windows XP, Windows 2000, or Windows NT (Windows NT based OS)
OS_STRING represents additional information about the OS such as “Service Pack 2”.
GetEnvironmentVariable
Returns the environment variable associated with the Name environment variable.
Example 2-11. Retrieving the Environment Variable Associated with the TS_ORIGIN Value.
MsgBbox "The package source EXE is " + GetEnvironmentVariable("TS_ORIGIN")
26 VMware, Inc.
ThinApp API SDK Functions and Notifications
RemoveSandboxOnExit
Toggles whether to delete the sandbox when the last child process exits.
YesNo Required Input Specifies whether to clean up when the last process
shuts down. The valid values are
1 - Yes
0 - No
SetEnvironmentVariable
Sets the value of an environment variable.
SetfileSystemIsolation
Sets the isolation mode of a directory.
Directory Required Input The full path of the directory whose isolation mode is to
be set.
IsolationMode Required Input The isolation mode to be set. The valid values are:
1 - WriteCopy
2 - Merged
3 - Full
Example 2-14. Setting the Isolation Mode of the Temp Directory to Merged.
Setfile systemIsolation GetEnvironmentVariable("TEMP"), 2
VMware, Inc. 27
ThinApp SDK API Reference Guide
SetRegistryIsolation
Sets the isolation mode of a registry key.
RegistryKey Required Input The registry key whose isolation mode is to be set. Start
with:
“HKLM” for HKEY_LOCAL_MACHINE
“HKCU” for HKEY_CURRENT_USER
“HKCR” for HKEY_CLASSES_ROOT
IsolationMode Required Input The isolation mode to be set. The valid values are:
1 - WriteCopy
2 - Merged
3 - Full
WaitForProcess
Waits until the process specified by ProcessID has completed execution and returns an integer:
0 - Timeout failed.
1 - Process exited.
TimeOutInMilliSeconds Required Input The maximum amount of time to wait for the process to
end before continuing. If 0 is specified, INFINITE is
used.
28 VMware, Inc.
3
ThinstallManagementAPI Object
This object is not automation compatible and can not be called from script engines like VBScript.
Properties
This object has no properties.
Methods
Invoke a method of the ThinstallManagementAPI object by calling the method with the specified
parameters. For example, the following command invokes the CreateTextRegistryFile method of an
object named myPackage.
myPackage.CreateTextRegistryFile(ProjectLocation, Base, UnicodeTextFile)
CreateTextRegistryFile
Creates a text-format registry file. The following table lists the arguments for this method.
Base Required Specifies which text registry file to create. The valid
values are:
HKEY_LOCAL_MACHINE
HKEY_CURRENT_USER
UnicodeTextFile Required File handle that receives the file created. HAHDLE*.
WriteRegistrySubkeyFromMacrovisionsprintf
Writes a registry subkey to a text-format registry file. The following table lists the arguments for this method.
VMware, Inc. 29
ThinApp SDK API Reference Guide
WriteRegistryValueFromMacrovisionsprintf
Writes a registry value to the most recently created (using
WriteRegistrySubkeyFromMacrovisionsprintf) registry subkey. The following table lists the arguments
for this method.
CloseTextRegistryFile
Closes a text-format registry file. The following table lists the arguments for this method.
GetPackageInfo
Gets information about a package.
InfoSizeInBytes Required The size of the area that info points to on entry, the actual
size of Info on exit. DWORD*.
LocateSandboxPath
Locates the sandbox path for a package. Note that if the user changes the THINSTALL_SANDBOX_PATH
environment variable the sandbox moves. The following table lists the arguments for this method.
30 VMware, Inc.
Legacy Thinstall Management API
ReturnedPathSizeInChar Required The size of the area that info points to on entry, the actual
s size of Info on exit. DWORD *.
StatusFlags Required output Flags for where a sandbox was found. DWORD *.
MachineAppLocalSandboxFound = 1
AppLocalSandboxFound = 2
GlobalMachineLocalSandboxFound = 4
GlobalLocalSandboxFound = 8
MachineSandboxFound = 16
UserSandboxFound = 32
ActiveSandboxIsLocked = 64
GetProcessInfo
Returns information about a running virtual process. The following table lists the arguments for this method.
Module0FileName Required, output The name of the main data container. LPWSTR.
PackageFilename Required, output The name of the main data container. LPWSTR.
StartEXEFilename Required, output The name of the system-readable executable that was
used to start the process. LPWSTR.
StartWorkingDirectory Required, output The (possibly virtual) initial working directory of the
process. LPWSTR.
VMware, Inc. 31
ThinApp SDK API Reference Guide
32 VMware, Inc.