views:

674

answers:

2

Dears,

Now i have a problem about InstallShield INSTALLDIR and TARGETDIR.

for example I make a project named "MyTestprogram"

I install this program into my computer which location is "D:\MyCompany\MyTestprogram"

and then I build a new version of this program

and upgrade it.

but When upgrade the INSTALLDIR and TARGETDIR is default path "C:\program files\my company name\My product name " not the path which i have installed.("D:\MyCompany\MyTestprogram")

can you help me ?

thank you !

Best Regards, Andy China

A: 

You need to save your INSTALLDIR into the ARP (add remove programs) record. Check out ARPINSTALLLOCATION.

On Freund
A: 

Are you making installscript or msi setup?

Make sure that under General Information/Product properties/INSTALLDIR(TARGETDIR) you have same values as in regular setup and in patch.

But, this only works if user doesn't change install path when installing application If he does, your application is installed in for example "c:\test\MyTestprogram", while patch will install to D:\MyCompany\MyTestprogram

If using installscript, add Helper feature, which will be first in feature list and add a function to OnInstalled which will check in registry where your application is installed (SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YourApplicationGUID).

If using msi, you can add property let's call it "INST_DIR" and tell him(wizard) to search registry stated above. It will store Install location of your application in this property which can be stated in feature as destination.

Cheers...

Benxy

related questions