how to rollback an uninstallation from uninstall custom action

G

Guest

Is it possible to rollback an uninstallation from uninstall custom action
based on some user input. or any suggestions on how to do this.

If the user has an earlier version of the product and they are installing a
new version, ask them if they want to keep the earlier version or not. If
they want to remove the earlier version remove it and install the new version
and if they dont want to remove it simply install the new version. I am
using. vb.net.

Thanks.
 
K

Kevin Yu [MSFT]

Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you would like your setup project to
detect it there is any old version of your app installed on the computer.
If there is any misunderstanding, please feel free to let me know.

Based on my experience, we can do this by adding some keys in the registry.
When the older version has been installed the setup project writes the
lastest version of this product in a certain registry key. When the new
setup project runs, we first check if there is an older one on the machine
by reading from the registry key. If so we can only suggestion the user to
manually uninstall the older version instead of automatically uninstall it.

For more information on setup projects, you can try to post in
microsoft.public.vsnet.setup

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Thanks for quick resopnse. Registry is off the limits, cant add entries :( .
Is it possbile to find out where the previous version is installed, if there
is one, i mean path to the folder that contains all the files.
 
K

Kevin Yu [MSFT]

Hi,

I'm afraid it's very hard to detect whether there is older version
installed on your machine without any clue. Finding folder with certain
files is not a good practice, as it is slow and inaccurate. As far as I
know, this job is often achieved by writing to registry or certain file in
the system folder. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Here is what i was thinking
In my setup projects properties, I set RemovePreviousVersion= True so my
uninstall custom action is called. In uninstall, i have access to previous
installation path so prompt the user and based on user input do what i have
to do.If there is no previous version installed ,uninstall custom action wont
be called. If I can somehow roll back the uninstallation with in uninstall
custom action, that would be great. Based on what i know(limited :)), i dont
think this can be done.
 
K

Kevin Yu [MSFT]

Hi,

I don't think it can be done, either. Basically, I think we have put some
clue for the new installation program to check for older versions and tell
it how to call the old uninstallation program.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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