- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- TARGETDIR not being set correctly on upgrade
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
TARGETDIR not being set correctly on upgrade
Hi, I'm working on an Installscript MSI project
When I do a minor upgrade between 2 different builds of the last version, the TARGETDIR folder is set automatically to "Program Files (x86)/<product_name>", regardless of where the project was installed, and then everything goes wrong since the Installscript script refers to TARGETDIR in several places.
But when I do a major upgrade from an older version to the last version of my project, then the TARGETDIR is set correctly, and everything works the way it should.
This is something that did not occur in previous versions, where it worked fine regardless of the upgrade type. I've been using the same 64-bit machine all this time, I can't find the reason for this change. There seems to be no significant difference in the ism file either. How is the TARGETDIR folder is set on upgrade, and what might affect it?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I found out that the value of TARGETDIR is taken from setup.ilg log file. However, in the log file the TARGETDIR is written correctly but the value of TARGETDIR at the beginning of a (minor) upgrade is still incorrect and resolves to: Program Files (x86)/<product_name>
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
we understand you are facing issue in resolving the targetdir in minor upgrade, which is working for major upgrade,
May i know to which path your have installed the version1(is installed to any custom path or default path) and then doing a minor upgrade is not resolving the path(where new version is installing)?
Are you able to replicate the same issue with sample installscript msi project?
Generate InstallScript MSI log: by following below command.
setup.exe /debuglog"C:\setupexe.log" /V"/L*V C:\setupMSI.log "
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks for your reply. The problem occurs regardless of where I choose to install the version, but usually I pick the default path though: Program Files/<company</<product>.
In a minor upgrade it resolves into: Program Files (x86)/<company>/<product>.
As fot the tutorial msi project, I didn't manage to built it (error is seen below), but the problem does not occur on other versions of my projects. When I do a minor upgrade in previous versions, it works and TARGETDIR is resolved correctly.
( error -4072: Error retrieving dependency COMCAT.3207D1B0_80E5_11D2_B95D_006097C4DE24:0 of C:\Program Files (x86)\InstallShield\2020\Modules\i386\MFC42.MSM
ISDEV : error -4075: File not found. An error occurred merging Module 'COMCAT.3207D1B0_80E5_11D2_B95D_006097C4DE24:0' for Feature 'ProgramFiles'.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Cam someone help me with this, please?
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)