cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Randy40
Level 4

[TARGETDIR] instead of <TARGETDIR> in Destination

Hello, I have a strange issue in one of my InstallShield InstallScript projects. When I look at the Destination Property of any Component in the IDE (Setup Design) the format of the paths looks different that any other project I have. What I mean is that instead of the path looking like it should, for example the path \ appears as [TARGETDIR]appdir with no slash between the folder names and square braces instead of the directional braces. I am thinking this is the reason my uninstall won't work (when I try to uninstall the program in Add/Remove Programs it just runs quickly, but the app is not uninstalled and does not disappear from Add/Remove Programs). I am hoping there is some quick and/or simple solution. Any information would be greatly appreciated. Thanks.
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The IDE should automatically use <> for path substitutions in InstallScript projects and [] for MSI projects. Was this project converted from an MSI project at any point? Did this issue always exist in this project or is this change recent? Are you able to manually replace the square brackets with angle brackets?
0 Kudos
Randy40
Level 4

Hi Josh, thanks for your reply, and I willl definitely keep in mind the fact that square brackets are the format used in MSI projects whereas the <> format is used for InstallScript projects. Today, for some unknown reason, the <> brackets are back in all folders in the IDE. The only thing different from the other day is that I shut down my computer over the weekend. Now maybe this is a different issue, but I am now finding when I try to uninstall our app in Add/Remove Programs I get the confirmation window asking if I really want to uninstall the app, but then it runs very quickly and after clicking the Finish button the app still shows in Add/Remove Programs. Below is a snippet of code from where I believe I may be doing something incorrectly - for one thing, the fact that I am using deprecated functions probably isn't helping. Any advice would be greatly appreciated. Thank you.

//Create app information, uninstallation, and App Paths registry keys.
InstallationInfo( IFX_COMPANY_NAME, IFX_PRODUCT_NAME, IFX_PRODUCT_VERSION, IFX_PRODUCT_KEY );

svLogFile = UNINST_LOGFILE_NAME;

//Generate uninstall log for Illustrations app
nResult = DeinstallStart( svDir ^ APP_DIR, svLogFile, @UNINST_KEY, 0 );
if (nResult < 0) then
MessageBox( @ERROR_UNINSTSETUP, WARNING );
endif;

szAppPath = TARGETDIR ^ APP_DIR;

RegDBSetItem( REGDB_APPPATH, szAppPath );

RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ IFX_PRODUCT_KEY );
RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

I'm not sure this code would cause an issue. The functions themselves call into newer functions (InstallationInfo calls CreateInstallationInfo, DeinstallStart calls MaintenanceStart).

Does your maintenance code call the FeatureRemoveAll function? Typically, this function is used to perform an uninstall (see the OnMaintUIBefore default event code in a new script project).
0 Kudos