Page 1 of 1

IA V9, Repair not working

Posted: Thu Dec 23, 2010 2:30 pm
by MichaelM
I am using version 9 of IA to create a setup file set. The Repair operation (available when running the setup after having installed) will only replace files if they are not in the destination folder. If they are there but have been modified, the modified version of the files is not replaced with the original.

Is there a way to make IA 9 overwrite existing files when doing a Repair operation?

I tried doing a recursive delete of all files in the target folder (before the repair process in the script) but this just left the target folder empty. Not to mention the scary thought of a recursive delete wiping a customers hard drive.

Re: IA V9, Repair not working

Posted: Fri Dec 24, 2010 2:25 am
by giaviv
Dear MichaelM,

You can indeed call Delete Files to make sure all your old files are gone first. If you are using the native engine instead of the windows installer engine, you can force these overwrites by setting the NATIVE_OVERWRITE_OLDER variable. Let me know if that helped.

Sincerely,
Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Fri Dec 24, 2010 8:09 am
by MichaelM
When I delete the files I end up with nothing in the destination folder. If I run the code in the debugger (stepping through) it operates properly. But when run stand alone it results in no files being left in the target folder. I suspect that there is a synchronization/timing issue in that when run stand alone the OS has a delayed response to the delete files request.

I am using IA 9 which I do not believe has the native install option. That is new to IA 10.

Re: IA V9, Repair not working

Posted: Fri Dec 24, 2010 9:43 am
by giaviv
Dear MichaelM,

In order for us to better assist you, could you attach (or send to [email protected]) the part of the code in charge of what you are describing?

Thanks,
Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Fri Dec 24, 2010 11:10 am
by MichaelM
Should I provide a reference number in the email?

Re: IA V9, Repair not working

Posted: Fri Dec 24, 2010 11:19 am
by giaviv
MichaelM,

Nope - just send it on over to us.

Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Sat Dec 25, 2010 4:47 am
by giaviv
MichaelM,

I received your code. What I did is added an If action to the installation that checks if we are in repair mode (AKA the var MAINTENANCE). If that var is TRUE, I recursively deleted the files $TARGETDIR$\*.*. This worked well for me. Please let me know what you think!

Happy holidays,
Aviv Giladi
InstallAWare Support

Re: IA V9, Repair not working

Posted: Sat Dec 25, 2010 3:18 pm
by MichaelM
I had already done that. It resulted in no files being left in the TARGETDIR after the repair operation.

What I did was to add the following

Code: Select all

if Variable REPAIR Equals TRUE
  Set Variable bClearToWipeTargetDir to FALSE
  Does File Exist $TARGETDIR$\DataView.exe (get result into variable bClearToWipeTargetDir)
  if Variable bClearToWipeTargetDir Equals TRUE
    Recursively Delete Files $TARGETDIR$\*.*
  end
end
To the following

Code: Select all

label: Maintenance
Comment: Maintenance Install/Uninstall
wizard loop
  Display Dialog: maintenance, wait for dialog to return (modal)
  Display Dialog: componentstree (if variable MODIFY is TRUE), wait for dialog to return (modal)
  Display Dialog: startinstallation, wait for dialog to return (modal)
end
Which results in the following complete code

Code: Select all

label: Maintenance
Comment: Maintenance Install/Uninstall
wizard loop
  Display Dialog: maintenance, wait for dialog to return (modal)
  Display Dialog: componentstree (if variable MODIFY is TRUE), wait for dialog to return (modal)
  Display Dialog: startinstallation, wait for dialog to return (modal)
end
if Variable REPAIR Equals TRUE
  Set Variable bClearToWipeTargetDir to FALSE
  Does File Exist $TARGETDIR$\DataView.exe (get result into variable bClearToWipeTargetDir)
  if Variable bClearToWipeTargetDir Equals TRUE
    Recursively Delete Files $TARGETDIR$\*.*
  end
end
The reason I check for a particular file is to help protect from the accidental deletion of the users entire drive.

As stated it resulted in no files being left in the TARGETDIR after the repair operation.

Re: IA V9, Repair not working

Posted: Sun Dec 26, 2010 1:29 am
by giaviv
MichaelM,

I understand. I am not experiencing the same thing here - it works fine for me. I will look into this and get back at you as soon as possible.

Thanks,
Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Sun Dec 26, 2010 9:34 am
by MichaelM
If I run the install in the debugger (stepping through the code) it works fine.

If I run it out side IA9 (stand alone) it does not work.

Re: IA V9, Repair not working

Posted: Mon Dec 27, 2010 8:58 am
by giaviv
Dear MichaelM,

The problem you are depicted doesn't reproduce for me. Which operating system are you using?

Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Mon Dec 27, 2010 12:13 pm
by MichaelM
Windows 7 x64 (English)

Re: IA V9, Repair not working

Posted: Tue Dec 28, 2010 4:08 am
by giaviv
Dear MichaelM,

I have tried your code on numerous platforms (XP, 7 X86, 7 X64, with IA9 or IA10), and your code works fine in all test cases. I am not really sure where you got the "REPAIR" variable from, I used the variable MAINTENANCE. Could you try and run your installer on a different computer and let me know the results?

Thanks,
Aviv Giladi
InstallAware Support

Re: IA V9, Repair not working

Posted: Wed Dec 29, 2010 9:42 am
by MichaelM
I do not know what is different today but it is working properly. Both systems that the problem was reported on are Windows 7 x64 based.

Because I have seen it occur and I did not change anything that should fix it, I can not trust the Repair operation.

For now I will simply hide the Repair option in the Maintenance dialog.

I will give you more information if I ever find it.

Thank you for your time.

Re: IA V9, Repair not working

Posted: Wed Dec 29, 2010 10:05 am
by giaviv
Dear MichaelM,

I am truly sorry for the inconveniance. Please let us know if you have more details regarding this issue.

Thanks,
Aviv Giladi
InstallAware Support