VMware Horizon Community
VMMikeC
Enthusiast
Enthusiast
Jump to solution

Replacing file within Thinapp

Hello All,

I have an application that uses a microsoft access database. I have thinapp'd this application and it works perfect. However, on our physical machines, we replace the database file with a fresh copy every time the user logs in, because we do not want this database to grow. In the thinapp application, this is saved to %ProgramFilesDir%.

Is there a way to accomplish this in Thinapp? I would hate to have to setup a separate parent image for this application.

Thanks,

Mike

0 Kudos
1 Solution

Accepted Solutions
Lakshman
Champion
Champion
Jump to solution

You can try setting REMOVESANDBOXONEXIT=1 in the package.ini. The sandbox will be deleted when the user closes the application and created again (with the fresh database file) everytime when launching the application. You may loose any customization that are saved onto the sandbox.

View solution in original post

0 Kudos
6 Replies
Lakshman
Champion
Champion
Jump to solution

Mike,

If i understand your question correct, you want to replace the database file that is packaged into your ThinApp.

If then, you can copy the new (fresh) file into the %ProgramFilesDir% and rebuild the ThinApp by running build.bat

0 Kudos
VMMikeC
Enthusiast
Enthusiast
Jump to solution

Hi,

Actually, we need to replace the database file on each users machine every day.

So pretty much, this database file is stored in the user's sandbox under %programfilesdir%\<program name>....I'm trying to find the best way to replace that database file each day before the user launches the thinapp application

Mike

0 Kudos
Lakshman
Champion
Champion
Jump to solution

You can try setting REMOVESANDBOXONEXIT=1 in the package.ini. The sandbox will be deleted when the user closes the application and created again (with the fresh database file) everytime when launching the application. You may loose any customization that are saved onto the sandbox.

0 Kudos
VMMikeC
Enthusiast
Enthusiast
Jump to solution

Thanks! Yes, I did think of that, but the program is registered upon initial opening. I guess if I can register it prior then i shouldnt have an issue

0 Kudos
Lakshman
Champion
Champion
Jump to solution

Some applications can be registered during setup capture so that the ThinApp doesn't need to register it again. You may try that too.

0 Kudos
shrivastavaa
Enthusiast
Enthusiast
Jump to solution

Is it simply copying a file to sandbox; every time a user logs into the machine from some standard location?

If so, you may want to try a batch script (copy /y file1 file2) executing on virtual cmd.

In case you code in some language; you can also create a small application (which copies this file) and include that in the capture. This application can later be set to run at user logon.