In addition to using the FlexEngine as an application or Group Policy extension, you can use it as a Component Object Model (COM) server.
FlexEngine is available as a COM server with ImmidioFlexProfiles.Engine as a ProgID, exposing a single method: Process(). This method requires a string argument that is interpreted in the same way as the FlexEngine command-line arguments.
Call FlexEngine From Custom Code By Using the COM Interface
Function OnFirstSandboxOwner
' Read settings
Set flexEngine = CreateObject("ImmidioFlexProfiles.Engine")
Call flexEngine.Process("-r H:\VMwareDEM\ThinApp\appSettings.zip")
End Function
Function OnLastProcessExit
' Store settings
Set flexEngine = CreateObject("ImmidioFlexProfiles.Engine")
Call flexEngine.Process("-i \\srv\Flex$\ThinApp\appSettings.ini " & _
"-s H:\VMwareDEM\ThinApp\appSettings.zip")
End Function