LOADOLDDATA not working?

Got a problem you cannot solve? Try here.
Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

LOADOLDDATA not working?

Postby Chris_DMG » Mon Feb 13, 2012 5:40 pm

I am trying to setup an upgrade using InstallAware 2012 that will install the new version to the existing install path of the previous version. We do not install our application to the program files directory and instead install to the Windisk\$TITLE$ folder, i.e. C:\MyProgram.

I start with a copy of the program already installed and then run a new install built using a new version of the app, but when I try and check the $TARGETDIR$ variable's value it is set to $PROGRAMFILES$\$TITLE$ regardless of where the user actually installed the previous version to.

I have set the LOADOLDDATA = TRUE in the project settings compiler variables section, but this does not seem to have any affect. The TARGETDIR does retain the value when running the same version of the installer again though (Same product code\revision code). The newer version of the install (Same product code, with a new revision code) never loads the previous information.

Am I doing something wrong? Is there a command I need to execute in the script to actually load the old data? I am not setting TARGETDIR to anything before I try displaying its value with a messagebox.

Thanks,
Chris

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: LOADOLDDATA not working?

Postby giaviv » Tue Feb 14, 2012 12:44 am

Hi Chris,

Could you please attach a minimal reproducing project for this issue? Thanks!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Tue Feb 14, 2012 9:46 am

Giaviv,

I have produced a basic project which just prompts for destination during initial install and then installs a text file.
The upgrade displays the TARGETDIR value at the time of the RECOMMENDEDUPGRADE test section of the script in a messagebox then it will go on and remove the original version and install the new version.
During this the installed location moves from the original C:\TestUpgrade folder to the C:\Program Files\TestUpgrade folder. I need the upgrade to detect the peviously installed TARGETDIR correctly. Hopefully it is just something I'm doing wrong.

The Zip file IA-TestUpgrade.zip contains all the files needed to review and test this issue. Simply extract it to the root of the C drive as that is the path structure the script is expecting the text file. If you need to place the project in another directory you may simply change the path in the "Data Files" compiler variable.

I already have pre-built a v1.0 and a v1.1 version of the installer and those are in the IA-TestUpgrade\Release folder under their own subfolders.

Thank you for your help.
Attachments
IA-TestUpgrade.zip
Test project to show upgrade not loading existing TARGETDIR
(3.41 MiB) Downloaded 785 times

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Wed Feb 15, 2012 8:14 am

Any news on this yet Aviv? Thank you for looking into this for me.

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Wed Feb 15, 2012 9:41 pm

No just as in the example script the $TARGETDIR$ is only being written to just before the dialogs if upgrade is not true and if it is a new install.
The example project I attached only has the one set variable for targetdir in it just as our original application and in both InstallAware doesn't retain/load the previous version's install directory.
Since the messagebox I have shown is in the section checking if RECOMMENDEDUPGRADE is true and targetdir is not being written to in the script it should contain the value that was used from the original installation correct? Instead the value is the PROGRAM FILES \ $TITLE$.

Were you able to test the two built installs provided in the zip file? They reproduce the behavior on every system I have run them on from Windows 7 32 & 64 to Windows Server 2008.

Thank you,
Chris

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Wed Feb 15, 2012 9:53 pm

As a reference I connected to my work machine to get the text of the only set to the TARGETDIR at the "Setup User Interview" portion of the script.

Code: Select all

[DEFINE REGION: Setup User Interview]
Set Variable NATIVE_ENGINE to TRUE
if Variable MAINTENANCE Equals TRUE
  GoTo Label: Maintenance
  else
  [compiler if Variable BUILDMODE not Equals PATCH]
  Comment: First Time Install
  if Variable RECOMMENDEDUPGRADE not Equals TRUE
    if Variable NEEDSUPGRADE not Equals (Ignore Case) TRUE
      if Variable MAINTENANCE not Equals (Ignore Case) TRUE
        Set Persistent Variable TARGETDIR to $_WinDisk$$TITLE$
        Set Variable STARTMENU to $TITLE$
      end
    end
  end
  [compiler end]
end


This is performed well after the section of the script in the template's region of: Check Application Pre-Requisites
Inside that region is the IF statement which checks if RECOMMENDEDUPGRADE is TRUE. If it is I currently have it set to show the value of TARGETDIR in a messagebox and it always shows the wrong value.

Thank you

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Thu Feb 16, 2012 10:34 am

Also as a side note if I remove that set variable it makes no difference. InstallAware still does not retrieve the correct TARGETDIR value from the previous installation.

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Fri Feb 17, 2012 9:05 am

Aviv,

Any news on this? I was curious if you were at least able to confirm the reproduction of the issue as you had deleted your earlier reply to the thread.

Thank you,
Chris

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: LOADOLDDATA not working?

Postby giaviv » Sat Feb 18, 2012 2:18 pm

Chris,

We are looking into this and will keep you posted.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Tue Mar 13, 2012 3:17 pm

Aviv,

It has been a few weeks since the last update. Have you guys been able to determine the cause of this issue yet?

Thank you,
Chris

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: LOADOLDDATA not working?

Postby FrancescoT » Wed Mar 14, 2012 8:46 am

Dear Chris,

I will have a look at your issue ... I've just seen it!
Please be patient and as soon as possible I will test your project.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: LOADOLDDATA not working?

Postby FrancescoT » Fri Mar 16, 2012 12:08 pm

Dear Chris,

I really hope that I have not missed nothig about your request.

I have reviewed your project ... But I chose to create another one (in reality two) to try to answer your question.

In short the project 1.0 installs a text file "MyTestFileA.txt" in the folder c:\MyTestUpg. The project 1.1 if founds a previous version, removes the old text file and replaces it, with the file "MyTestFileB.txt" always in the c:\MyTestUpg.

I have not used LOADOLDDATA, but only the standard InstallAware project flow.

The projects are based on the default Basic Template and just perform a very simple intallation.

I hope this will help you but I also I may suggest to you, that is not a good practice to install applications in the root of c drive.
This could cause problem with more recent OS and could cause that your install may not work at all with future windows version.

Let me know if you solved.

Regards
Attachments
LOADOLDDATA not working.zip
(4 MiB) Downloaded 764 times
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Fri Mar 16, 2012 2:50 pm

The problem with your approach Francesco is that it requires a user installing a update to an already installed application to re-select the install location for the program.

It just doesn't look very good to the end user, as the program is already installed. They don't want to move it so the installer should be able to re-use the existing installation folder without having to ask. Also we have a number of files that get generated after the install, but will be used by the program. These files may include report information or other pieces of data that have to stay from one version to the next. If the user choses to install the upgrade to a different location that information will be lost as it is no longer in the same place relative to the program, we do not want to allow this.

According to the documentation the LOADOLDDATA appears to be the "InstallAware method" of handling these types of requirements. Unfortunately using the native_engine InstallAware does not actually follow the behavior specified in the help files.

Thank you for your help,
Chris

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: LOADOLDDATA not working?

Postby FrancescoT » Mon Mar 19, 2012 8:36 am

Please excuse me if I do not have clearly understood your case.

So in conclusion, are you saying that setting "native_engine " ON will cause your issue?

Just give me some time and I will investigate on it.


Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Chris_DMG
Posts: 30
Joined: Tue Nov 02, 2010 8:09 am

Re: LOADOLDDATA not working?

Postby Chris_DMG » Mon Mar 19, 2012 9:28 am

That's what I did my testing with in the above test projects. Since our installer uses the native engine template now.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 50 guests