VMware Horizon Community
VMhadi
Contributor
Contributor

Running native excel from ThinApp

I recently had to ThinApp ODBC driver and connection setting which is used by native Excel. I didn't have any problem capturing the driver but the next part of getting Excel to see the ODBC setup is a bit puzzling to me. First try, I manually created an entry point in package.ini executing native excel. It run but at the same time tries to install and configure something as if it was running for the first time then failed.

Second try, I opened excel through cmd prompt in ThinApp and it run as if it was running natively and it can see the ODBC connection.

Just wondering if anyone knows why they behave differently.

Cheers. 

0 Kudos
8 Replies
shrivastavaa
Enthusiast
Enthusiast

>>ODBC driver and connection setting

I assume they are all in user mode? (confirming as you said its a driver)

>>It run but at the same time tries to install and configure something as if it was running for the first time then failed.

About this; my guess would be that the Excel application is trying to read some file/folder; which is writecopy in virtual mode. Now as you are running it and it is not able to read that file due to isolation mode. It is trying to repair/install it.

Now to your problem of why it is behaving differently; AFAIK it should behave similiarly; you may want to take a look in to log monitor logs to check what went wrong?

0 Kudos
pbjork
VMware Employee
VMware Employee

Did you navigate to the c:\Program Files\Microsoft Office\OfficeXX folder before starting Excel from the cmd prompt? If so, one difference that could be is the working directory. When you created the Excel Entry Point did you specify WorkingDirectory=? If it is not specified on an Entry Point the location of the Entry Point will be the working directory..

0 Kudos
VMhadi
Contributor
Contributor

No, I just open up command prompt and run excel with the full path c:\program files\Microsoft office\Office12\Excel.exe. I then tried several working directories in package.ini %personal%; %program files common%\Microsoft Shared\OFFICE12; and %programfilesdir%\Microsoft office\Office12 but not successful. At the moment my work around is to execute a vbs script that run excel.

0 Kudos
pbjork
VMware Employee
VMware Employee

Very strange indeed.. Running it directly via the Entry Point or via the cmd prompt should be no other difference than perhaps the working directory.. I would suggest you file a support ticket so our engineering can have a look at it..

0 Kudos
shrivastavaa
Enthusiast
Enthusiast

I would suggest to look into log monitor logs first; you can discuss your findings here. This should be catchable from that. (Is it just excel or any arbitary application?)

Thanks

Aditya

0 Kudos
VMhadi
Contributor
Contributor

I am sorry I had a look at the log file but I could not find anything that I can really understand. They looked pretty encrypted to me but I attached it anyway in case you are interested to have a look at it. I stoped the capture as soon as it spawned SETUP.exe otherwise it will get quite large.

I just found out that I have to use ChildProcessEnvironmentDefault=Virtual and ChildProcessEnvironmentException=Excel.exe for the vbs to work otherwise it behaves similar to running excel directly from package.ini. 

0 Kudos
shrivastavaa
Enthusiast
Enthusiast

>>I just found out that I have to use ChildProcessEnvironmentDefault=Virtual and ChildProcessEnvironmentException=Excel.exe for the vbs to work otherwise it behaves similar to running excel directly from package.ini.

well that make sense, try defining these parameters in package.ini and launch from shourt cut. You should get the same behaviour.

0 Kudos
VMhadi
Contributor
Contributor

I had them defined in package.ini and the vbs is inside %ProgramfilesDir%. I am guessing when excel run from the script it was running as a child process thus run in physical environment while running excel straight from an entry point defined in package.ini was a parent process in virtual environment.

After a couple hours of trial and error I found if I removed folder "Microsoft SQL Server" from %ProgramFilesDir% which only have EULA inside. Excel run just fine and I didn't have to use ChildProcessEnvironmentDefault or ChildProcessEnvironmentExceptions. I'll do further testing just to make sure it does what we wanted to do that is importing files from an sql database using the driver in the ThinApp bubble.

Thank you everyone for your help.

0 Kudos