Reputation: 70
I had successfully created Setup file(.exe) using windows forms application in C#.
Setup is installed and my functionality using app is working fine.
Installation path is in C-Drive : **C:\Program Files (x86)\Default Company Name\MyApp**
To install latest Setup with updated code, i uninstalled existing application from control panel .After Uninstalled the app, installed folder is showing deleted.
After that , I installed latest Setup without changing Installation path.
same path again :**C:\Program Files (x86)\Default Company Name\MyApp**
Here i got problems, data relates to old set Up not removed completely.
I used Sq-lite Database as local DB in windows application, Latest installed Setup showing old data because of same installed path. if installation path is changed, it is fine. but i cannot say to my clients to change installation path every time.
How can we remove all files while Uninstalling ? Is there anything to do in my Setup ?
Upvotes: 0
Views: 1582
Reputation: 28355
You need to configure the Installer.Uninstall
method to remove your data properly.
Also you can configure it manually via Setup & Deployment project:
In SetUp and Deployment:
- After creating the setup project right click on your project add -->Primary output. So, automatically all the related files of your project will get added to it.
- Now, make a short cut of ur primary output rename to Uninstall the product , cut and paste in User's Programme menu-->TestFolder--->Uninstall the product.
- Now, right click on the shortcut--->properties. On the right side you get few fields choose on among it named as arguments type the same
/u=[ProductCode]
- And hit F4 on ur setup and deployment project make sure that
DetectNewInstalledVersions
andRemovePreviousVersions
these two fields totrue
.
Upvotes: 1