471,349 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

how to rollback an uninstallation from uninstall custom action

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.
Jul 21 '05 #1
5 3809
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."

Jul 21 '05 #2
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.

"Kevin Yu [MSFT]" wrote:
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."

Jul 21 '05 #3
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."

Jul 21 '05 #4
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.
"Kevin Yu [MSFT]" wrote:
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."

Jul 21 '05 #5
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."

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Keith Smith | last post: by
1 post views Thread by archana | last post: by
reply views Thread by Gabriel Lozano-Morán | last post: by
4 posts views Thread by - HAL9000 | last post: by
reply views Thread by tkpatro | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.