Patch applies to wrong directory

Got a problem you cannot solve? Try here.
Post Reply
StefanB
Posts: 14
Joined: Mon Aug 21, 2006 2:36 am
Contact:

Patch applies to wrong directory

Post by StefanB »

I just tested a patch i generated, and somehow the patch doesn't install to the targetdir where the app was previously installed, but to the $PROGRAMFILES$\\Projectname folder.

because of webbuild, it does a total/working installation, but so i end up with 2 application dirs, where the old one could never be removed.

do you have any idea how this could happen?


I've looked into the script, and the only point where the targetdir is set, is the place where the setuptemplate sets it (though i have changed it a little, but even if this change would come in effect, it would be the right directory).

(still using version 6.6)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Strange, you want to make sure nothing overrides the built-in value of $TARGETDIR$ as its loaded correctly upon engine initialization.

The template setup script code assures this by using compiler variables to take out such superfluous code:

Code: Select all

[b]  [compiler if Variable BUILDMODE not Equals PATCH][/b]
  Comment: First Time Install
  Set Variable TARGETDIR to $PROGRAMFILES$\\$TITLE$
  Set Variable STARTMENU to $TITLE$
[b]  [compiler end][/b]
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
StefanB
Posts: 14
Joined: Mon Aug 21, 2006 2:36 am
Contact:

Post by StefanB »

i justed have looked over the script again. this the only place, where TARGETDIR is set. on all other places its just used.

Code: Select all

  [compiler if Variable BUILDMODE not Equals PATCH]
  Comment: First Time Install
  Read Registry Key HKLM\\Software\\[Company-Name]\\[Product-Name]\\Path into PATH_AVAILABLE
  if Variable PATH_AVAILABLE Equals 
    Set Variable TARGETDIR to C:\\$TITLE$
    else
    Set Variable TARGETDIR to $PATH_AVAILABLE$
  end
  Set Variable STARTMENU to $TITLE$
  [compiler end]
i've seen, that in the Set Variable dialog is a checkbox, to remember the value of the var, but doc states, that this is always the case for TARGETDIR
bvanmatre
Posts: 3
Joined: Mon Sep 08, 2008 11:04 am

Post by bvanmatre »

I know this is a very old post, but I'm having the same issue and was hoping someone could clue me in as far as if a solution was found.
Thanks
FlorianSchmelzer
Posts: 9
Joined: Fri Mar 11, 2011 4:27 am

Re: Patch applies to wrong directory

Post by FlorianSchmelzer »

same issue here with Version 10.10
any clue ??
We NEED a Solution for this !!
Post Reply