Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Major Upgrade - Install Path


13 replies to this topic

cherukus

cherukus
  • Members
  • 68 posts

Posted 05 March 2004 - 03:41

When doing a Major upgrade (InstallShield Developer 8 Basic MSI) :

1. Is there a way to set the Install Directory to the previous install location ?

Ex : The user as installed App version 1.0.3 onto C:\Program Files\Main App\

When user trys to install 1.0.4 (which is a Major upgrade), we don't want to give him an option to change the install location, instead we want to set to the previously installed location ie., C:\Program Files\Main App\

2. Is there a way to say not to overwrite some files, even when performing Major upgrade.

Cheers !!!

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 05 March 2004 - 05:57

To never over write a file, you need to set the component attributes to never overwrite in the first install.

If you dont want to give the use an option to chagne the path, make sure the user can't get to the dialog that changes the path on an upgrade

cherukus

cherukus
  • Members
  • 68 posts

Posted 05 March 2004 - 14:16

What condition I need to check for not displaying the dialog when doing a Major upgrade ? Is it going to be IS_MAJOR_UPGRADE ?
Currently I have a condition NOT INSTALLED. Can I check for both conditions ?

Cheers !!!

cherukus

cherukus
  • Members
  • 68 posts

Posted 08 April 2004 - 17:31

The problem is say he installed the previous version onto D:\ and if it is a MAJOR upgrade I added a condition to disable the dialog(DestinationFolder Dialog) where the user is allowed to change the path but the problem is it is taking the default path ie., C:\ and installing it into that folder which is very wrong.

So I need help here. Thanks for any suggestions.

KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 09 April 2004 - 13:30

You may need a custom action that reads the installation path from somewhere (a registry key you've written or the App Path key if you write that), then another to set the installation path to it.

Hope this helps

Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 April 2004 - 17:58

QUOTE
To never over write a file, you need to set the component attributes to never overwrite in the first install.

Not quite correct: it is sufficient to set Nevr Overwrite in the new version. You need to make sure your RemoveExistingProducts action is scheduled late in the sequence, otherwise a complete uninstall of the old version is performed.

QUOTE
What condition I need to check for not displaying the dialog when doing a Major upgrade ?

You can check for the property you have specified in the Upgarde settings. "Not Installed" is True for both - first time install and major upgrade - so it won't help you.

If you have written your INSTALLDIR to registry then you can read it from there using AppSearch. Ususally it gets written automatically to the InstallLocation value in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

You can also use [$componentkey] to get the install directory of an installed component (for details see help topic about the Formatted data type)

You can then use a custom action type 35 to set a directory table entry to that value.

cherukus

cherukus
  • Members
  • 68 posts

Posted 20 April 2004 - 17:43

Earlier I used to have RemoveExistingProducts after InstallValidate and before InstallInitialize. Now I moved it after InstallInitialize, but still the behaviour seems to be same. When I tried to move after OnMoving event, it did warn me saying I cannot have it after OnMoving event.

Please suggest.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 April 2004 - 18:30

What project type are you rellay using? There shouldn't be a OnMoving custom action in Basic MSI.

cherukus

cherukus
  • Members
  • 68 posts

Posted 20 April 2004 - 20:29

I am using Basic MSI and I do have OnMoving event. Do you want me to try removing it ???

Edited by cherukus, 20 April 2004 - 20:31.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 April 2004 - 20:39

Where do you see this? Are you using InstallScript in custom actions?

cherukus

cherukus
  • Members
  • 68 posts

Posted 20 April 2004 - 20:53

I don't see this in the list of Custom Actions, but I do see this is Installation Execute sequences.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 20 April 2004 - 23:34

Ummm if you are seeing this in your installation Execute sequence then it does not sound like you are using a basic msi.


cherukus

cherukus
  • Members
  • 68 posts

Posted 21 April 2004 - 14:58

No. I am using Basic MSI, but I am using InstallScript in custom actions.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 April 2004 - 10:16

You could place RemoveExistingProducts after InstallFinalize.