files going into the virtualstore on vista

H

Heath P. Dillon

Hi,
In my application I access a file to read and write from.

Under the vista operating system, my file ends up in the virtual store.

When I uninstall the applicaiton, the file in the virtual store is not
deleted. When the application is reinstalled, then the old files in the
virtual store are simply used, and the new ones are not used.

My program setup is simply the standard VS.2008 setup project template. Is
there away to make sure that the files in the virtual store are removed when
the applicaiton is un-installed.

Thanks
 
F

Family Tree Mike

Heath P. Dillon said:
Hi,
In my application I access a file to read and write from.

Under the vista operating system, my file ends up in the virtual store.

When I uninstall the applicaiton, the file in the virtual store is not
deleted. When the application is reinstalled, then the old files in the
virtual store are simply used, and the new ones are not used.

My program setup is simply the standard VS.2008 setup project template. Is
there away to make sure that the files in the virtual store are removed
when the applicaiton is un-installed.

Thanks


The default settings should remove the file upon uninstall if the file is
part of your install package unless it is a shared component that is still
in use. If this is a file you create at first run and maintain as part of
running the application, then you would need to create a custom action to
run at uninstall which finds the file and deletes it.
 
M

Mr. Arnold

Heath said:
Hi,
In my application I access a file to read and write from.

Under the vista operating system, my file ends up in the virtual store.

When I uninstall the applicaiton, the file in the virtual store is not
deleted. When the application is reinstalled, then the old files in the
virtual store are simply used, and the new ones are not used.

My program setup is simply the standard VS.2008 setup project template.
Is there away to make sure that the files in the virtual store are
removed when the applicaiton is un-installed.

Thanks

Well, you need to install your solution to a directory other than the
Program Files directory if the solution is going to install data or
configuration files, as they will be redirected to the user's
virtualstore because the Program Files directory is a protected area
concerning this on Vista.
 
A

Alex Clark

Not entirely correct, as the Installer will have Admin privileges and will
be able to put config files into the application directory. If it didn't
have access to that directory, it would put all files in the virtualstore -
including the exe and DLL files!

It sounds to me as though the app itself is creating these files at runtime.
If so, then the uninstaller will be unaware of these files and thus won't
remove them.

My advice? Fix the application. It shouldn't be even attempting to write
to anything in its own app directory at runtime. Use the AppData folders,
or any of the other (more appropriate) areas designated for this purpose.
That will make it much more Vista friendly and future proof.
 
H

Heath P. Dillon

HI,

Thanks for all the replies, some info there I will take away

The actual file that is going into the virtual store is the VistaDB database
file. It ships with my application and is installed with the application.
The file does exisit in the program files directory, and it would seem that
vista decides to put this file into the virtualstore itself.

I simply reference this in my project as |datadirectory|vistadbfilename.vdb3

My understanding, which I asume is wrong, is that the datadirectory
directive should be putting into a vista friendly folder, not the
virtualstore
 
H

Heath P. Dillon

Hi,

Thanks for your information.

I have read the article, and done some further research on all of this, and
I am down to the following last issue.

I understand that I have to create my own directory to hold my database
file, so that they are able to write to the file. Since I am required to
install the database file as apart of my setup program (just the setup
project template in vs2008), I only have some many option for new folders. I
have folder type 'Application User Directory', or 'Custom Folder' or 'Users
personal Data Folder'..

So which one should I create and put my database file, so that when the user
uninstalls the application the database file is also removed

And from within my application how do I address the directory where the
database file is, considering that the user could have selected to install
the application on any drive.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top