Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Launch condition to uninstall previous version of application

932 views
Skip to first unread message

kota

unread,
May 7, 2008, 9:18:02 AM5/7/08
to
Hi,

My previous version of application was built using Install shield and the
current version, i am developing throuhg setup and deployment VS2005 project.

1) I wanted to check, if my old application exists, remove the application
first and prompt for restart the PC before installing the new application.

Can anybody help me, how can i achieve this using setup & delployment.

2) if above solution is not possible, atleast i should prompt a message
that, install the previous version before installing the new one. Since both
not built using VS2005, i can't add condiition "remove previous version" =
TRUE.

Using Lanuch condition, we can check for File lanuch condition, search for
file, if exists, installation proceeds, with out showing error msg.
I am trying to do the opposit way, if the file exists, i should abort the
installation & prompting a message that, install the old application first.

Thanks,
Prafulla

Phil Wilson

unread,
May 7, 2008, 2:35:34 PM5/7/08
to
First keep in mind that you're not going to be able to use Visual Studio
setups to do everything that an InstallShield setup can do, because Visual
Studio doesn't offer support for all the Windows Installer features like
InstallShield and other products do.

Yes you can use RemovePreviousVersions. Internally this is an MSI thing, not
something specific to Visual Studio projects. You use the UpgradeCode of the
previous version of the product and refer to the versions you want to
upgrade. That's worth a try.

Why the restart after the uninstall?

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"kota" <ko...@discussions.microsoft.com> wrote in message
news:76124939-60AB-4AC6...@microsoft.com...

Phil Wilson

unread,
May 7, 2008, 5:35:47 PM5/7/08
to
p.s. The version of your setup project needs to be higher than that
InstallShielde project so that RemovePrevviousVersions will see it as a
previous (older) version.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"Phil Wilson" <phil....@wonderware.something.com> wrote in message
news:ek49jEHs...@TK2MSFTNGP05.phx.gbl...

kota

unread,
May 8, 2008, 11:00:00 AM5/8/08
to
Hi,

Thanks for your reply, I looked through the Product GUId for previous
release in HKCR\Installer\Components, but my product is not listed here, what
my guess is, may be product ID is not generated here. I was not the person,
who released the previous version.

If product GUID not exists, I cant use this in the Upgrade code of
deployment project.

Is there any other method to remove the application?

Thanks,
prafulla

Phil Wilson

unread,
May 8, 2008, 12:50:45 PM5/8/08
to
I'm not sure what you're doing looking for Product guids in the registry.
All you need to know is the UpgradeCode of the older product built by
InstallShield. If you don't know it for some reason but that product is
installed on the system I'd look for the cached MSI file in
windows\installer, open it with Orca and look at the UpgradeCode in the
Property table.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"kota" <ko...@discussions.microsoft.com> wrote in message

news:2A346117-F396-4944...@microsoft.com...

Amod

unread,
Jun 18, 2008, 1:37:01 AM6/18/08
to
Hi..
I found the solution.
There is a property "Version" =1.0.0
change it to any value e.g. 1.0.1
Now it will ask to change product code automatically just click "yes"
n thats it.
Build the new relase & install it.
The previous verison will get uninstalled first. :)


You can see the linkfor explanation here:
http://www.developingfor.net/setup-and-deployment/uninstalling-a-previous-version-from-an-msi.html


Regards
Amod

VB.Net

unread,
Jul 23, 2008, 1:24:11 AM7/23/08
to
vb.net is supposed to work for different versions. is it not it? .net is
xcopy and not registry based.


"kota" <ko...@discussions.microsoft.com> wrote in message

news:76124939-60AB-4AC6...@microsoft.com...

0 new messages