Dora07
Dora07

Reputation: 70

How to remove complete data in installation path while uninstalling windows forms application

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

Answers (1)

VMAtm
VMAtm

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:

  1. 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.
  2. 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.
  3. 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]
  4. And hit F4 on ur setup and deployment project make sure that DetectNewInstalledVersions and RemovePreviousVersions these two fields to true.

Upvotes: 1

Related Questions