开发者

A InstallShield INSTALLDIR and TARGETDIR issue

开发者 https://www.devze.com 2022-12-14 23:15 出处:网络
Now I have a problem about InstallShield INSTALLDIR and TARGETDIR. for example: 1- I make a project named \"MyTestprogram\"

Now I have a problem about InstallShield INSTALLDIR and TARGETDIR.

for example:

1- I make a project named "MyTestprogram"

2- I install this program int开发者_StackOverflow中文版o my computer which location is D:\MyCompany\MyTestprogram

3- 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 ?


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...


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号