Vb.net Auto-Uninstall

Hi,

I'm using vb.net 2010 to build a local application.

I'd like my vb.net application to automatically uninstall the previous version of itself before it installs the newer version.

I'm currently making a lot of updates and so constantly having to uninstall from the control panel to re-install again can become very repetitive.

Is this possible? I read you have to set RemovePreviousVersion = True but I can't find this option anywhere?

Thank you
FCapoAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
It should be doing that automatically. You can choose to run it in online mode only so there will be no installation.
0
 
CodeCruiserCommented:
Are you using Visual Studio Installer (MSI) project type? Select the project in  solution explorer and then open Properties window (F4). You will see properties including RemovePreviousVersion.
0
 
FCapoAuthor Commented:
In my project settings, under the publish tab, I simply click publish now. I'm not sure if I'm using MSI or not?
0
 
CodeCruiserCommented:
You are using ClickOnce. ClickOnce deployed apps are auto updatable (unless you choose not to). Click on Updates button on Publish tab and tick the "The application should check for updates". Then every time you publish a new version, just relaunch the app and it will show you a message that an update is available. If you click Ok, app will update itself!
0
 
FCapoAuthor Commented:
I don't really want it to check for updates, basically when I click setup I would like it to remove any previous versions before it installs the new one.
0
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.

All Courses

From novice to tech pro — start learning today.