VB.Net Updating Application

I have an application that uses a Microsoft Access db file. I have problem figuring out how to do the following:
1) When installing the application, I want the application to check if the db file exists. If it doesnot, install it. If if does, skip that file.
2) When uninstalling the application, I want everything removed except the db file.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In your setup project go to the Launch Conditions Editor
Create a new launch condition 'File Search'
File in the properties that you require, such as where to search and so on.
In the properties filed called Property enter the following:-


Go to the File System Editor of the Setup Project, select your database file.
In the properties window, find the field called 'Condition' (should be at the top) and enter:-


Now find the field called 'Permanent' and set it to true - this prevents the file from being uninstalled.

With this, your application should now search for the database file, if it is found the file won't be installed, if it isn't the file should be installed. the file won't be uninstalled.

Hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.