Page 1 of 1

Overwriting existing installations

Posted: Mon Apr 18, 2005 5:55 am
by devdept
Hello,

Is there a way to specify that IA will always overwrite the existing installation for a given product.

At the moment my installation works but when I run the application, the old version comes out.

Thanks,

Posted: Mon Apr 18, 2005 7:25 am
by sinan
Several ways:

1) Use the auto-upgrade feature, that will uninstall the old version before installing the new version - generally changing your revision code will take care of this for you (recommended approach)
2) Make sure your new version has a different product code and the new files have a newer version number and/or time stamp
3) Delete the old files manually using Win32 API before beginning the new install
4) More ways are possible...

Look into the auto upgrade functionality - for various reasons, this is the best approach to this problem.

Posted: Wed Apr 20, 2005 4:44 pm
by devdept
Hello,

I tryed using the revision code, but my installation does not behave as expected.

I want to try the last time and let you know.

I would like an option in my preferences that say "Always overwrite the existing installation" that increments automatically the revision code every build.

Thanks,

Posted: Wed Apr 20, 2005 5:16 pm
by sinan
If you generate a setup using the project wizard or the templates, the project is automatically set to auto-increment the revision code, and will seamlessly uninstall old versions before installing new ones.

If not, you can still generate a blank project and copy-paste the code that does this to your own setup script. Remember - nothing is hard coded in InstallAware!

Posted: Thu Apr 21, 2005 3:05 am
by devdept
No, my setup doesn't overwrite the existing one and I started from the .NET template.

I changed the revision code 4 times.

Please, tell me a reliable way to do it.

Thanks a lot,

Posted: Thu Apr 21, 2005 3:28 am
by sinan
If you are not using InstallAware 2005, the template projects do not contain auto-upgrade code. In this case create a project using the project wizard and copy-paste the code from there. You'll also need to be using the Enterprise edition.

Posted: Thu Apr 21, 2005 4:58 am
by devdept
Ok,

I will try today. I am using InstallAware 3 Enterprise Ed. Evaluation

Thanks,

Posted: Thu Apr 21, 2005 5:57 am
by sinan
I recommend you upgrade to Studio 2005 instead - its the new version of Enterprise 3, and contains more features, fixes, an enhanced visual UI, and more.

Posted: Fri Apr 22, 2005 2:42 am
by devdept
If you are not using InstallAware 2005, the template projects do not contain auto-upgrade code. In this case create a project using the project wizard and copy-paste the code from there. You'll also need to be using the Enterprise edition.


Hello Sinan,

Unfortunately I followed your suggestion but I am not able to locate the auto-upgrade code :cry: . Please, be more precise, what should I copy and paste?

Thanks again so much,

Posted: Fri Apr 22, 2005 9:09 am
by sinan
Its the part that contains the (Un)Install MSI Setup command. Its called during prereq installation.

Posted: Fri Apr 29, 2005 3:21 am
by devdept
Wonderful! I succeeded! :D

Thanks a lot!