VMware ThinApp package crashes with VBS.

For the intergration of VMware ThinApp applications into RES Workspace Manager, a custom VBS is required in the root of the Setup Capture files folder.
The following code must be present in the script:

Function OnFirstParentStart
WaitForProcess ExecuteVirtualProcess(GetEnvironmentVariable(“pwrgrids”)),0
End Function

But some ThinApp applications failed to start after that, or any vbs script was added to the build.

After some troubleshooting with ThinApp Log Monitor, this is what came out of the logging:

—-  Potential Errors Detected —

000610 00000000 0000168c                                                  Module OLEAUT32.dll already loaded by system, but loaded second isolated virtual copy

When the application is installed during the ThinApp capture, a version of oleaut32.dll gets installed. This is operating system specific and does not work in another operating systems.

To resolve this issue, remove  the oleaut32.dll file from the %SystemSystem% folder and all of the oleaut32 related entry’s from HKEY_LOCAL_MACHINE.txt of the ThinApp project. Then rebuild your application using the Build.bat.

Some links regarding this issue:

http://blogs.vmware.com/thinapp/2010/08/captured-on-xp—running-on-win-7.html

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2002674