Hi folks.
I have repackaged an app with ThinApp (4.7.2).
I need to run a "registration" exe before the main exe (entry point) runs.
This registration exe is inside the virtual package.
I have a VBSscript to perform this action using certain Sandbox functions, but I keep getting "access denied".
I therefore enabled CMD as an entry point, and tried to run the application on the command line.
Again I get "access denied".
As a test, I also tried to run the main application (which there is an entry point for) and I also get "access denied".
I therefore created an entry point for this registration exe, and ran it directly.
It works OK.
So, I was wondering how I can get this to run?
How can I prevent access denied message?
I need this exe to run as part of the VBScript before any other entry point runs.
Any suggestions?
Thanks.
Please try using the callback function OnFirstParentStart in your VBscript to call the EXE and check if that helps.
Example here: http://blogs.vmware.com/thinapp/2008/10/scripting-withi.html
Hi,
Thanks for the reply.
I'm actually using OnFirstSandboxOwner, and the function works fine (I even added a simple msgbox to confirm).
The function tries to execute the program, but returns a "Access Denied" (the code is working, but the executable returns the error).
This is the same from a CMD prompt entry point too - "Access Denied" when trying to run directly from the directory.
The application can only run once for all entry points, hence not using OnFirstParentStart.
This appears to be an access problem for the application, rather than a scripting problem.
Guess the registration has to be done before launching the ThinApp EXE.
You may go for a batch script that register the ThinApp first (registration exe) followed by launching the main EXE.
This doesn't seem right...
Let me put it another way, leaving the registration program out of the equation.
If I have two entry points:
cmd.exe
mainapp.exe
> If I launch cmd.exe, the ThinApp package launches, with a command window.
> I can list directory (DIR) in the ThinApp package directory to see mainapp.exe.
-at this point I assume that the package is now accessible and loaded-
> If I try to execute mainapp.exe from the cmd.exe entry point, I also get ACCESS DENIED.
Should I be able to launch the main application from the command prompt within the package?
If not, why not? Perhaps I just don't understand security levels within ThinApp!
Thanks
Solved.
I forgot that I was testing on x64.
Set Wow64=0 in the package, all is working fine now.
Ooops.
Thanks for your help!!
