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

Knowing the installation path in upgrade


2 replies to this topic

Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 08 February 2005 - 08:24

Hello

I am installation my Product with MSI.
I've created an Major update and I want it to desplay automatically the
path of the application directory (e.g. if I installed my app to c:\MyApp i want the upgrade to show this path and not the default path like c:\program files\ ... )

how can I do it ???

Thanks a lot

Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 15 February 2005 - 17:38

Can I understand that no one has an Idea ?? sad.gif sad.gif sad.gif

Maybe someone can help me with this one :

During the first installation of my product i wrote a key in the registry which points to the [TARGETDIR]
in my Upgrades I change the defaultLocation propery to the registry search which brings this key.

so in upgrade it works but if someone installs this product as a new product and not as an upgrade the search for the key in the registry failed and the default localtion gets an empty key.
therefore it shows "D:\" instead of "C:\PROGRAM FILES\....."

can anyone help me with this one ????

Thanks

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 16 February 2005 - 10:01

I worked around this behavior by reading the registry value (read with AppSearch/RegLocator) in a temporary property, called PrevInstallDir. Then I have a simple CA 35 copies this property to INSTALLDIR.
This CA is conditioned with (PrevInstallDir). The result: PrevInstallDir is only copied when it actually has a value.
BTW there are other means to retrieve previous folder, eg. when your older CA sets ARPInstallLocation you can retrieve that value using MsiGetProductInfo, and you can look for the target folder of each component using AppSearch/CompLocator. It's a tough subject, because a product can install to multiple folders, and the components may not match over major upgrades.