IA V9, Repair not working

Got a problem you cannot solve? Try here.
MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

IA V9, Repair not working

Postby MichaelM » Thu Dec 23, 2010 2:30 pm

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.

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

Re: IA V9, Repair not working

Postby giaviv » Fri Dec 24, 2010 2:25 am

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
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Fri Dec 24, 2010 8:09 am

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.

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

Re: IA V9, Repair not working

Postby giaviv » Fri Dec 24, 2010 9:43 am

Dear MichaelM,

In order for us to better assist you, could you attach (or send to support@installaware.com) the part of the code in charge of what you are describing?

Thanks,
Aviv Giladi
InstallAware Support
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Fri Dec 24, 2010 11:10 am

Should I provide a reference number in the email?

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

Re: IA V9, Repair not working

Postby giaviv » Fri Dec 24, 2010 11:19 am

MichaelM,

Nope - just send it on over to us.

Aviv Giladi
InstallAware Support
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

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

Re: IA V9, Repair not working

Postby giaviv » Sat Dec 25, 2010 4:47 am

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
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Sat Dec 25, 2010 3:18 pm

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.

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

Re: IA V9, Repair not working

Postby giaviv » Sun Dec 26, 2010 1:29 am

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
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Sun Dec 26, 2010 9:34 am

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.

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

Re: IA V9, Repair not working

Postby giaviv » Mon Dec 27, 2010 8:58 am

Dear MichaelM,

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

Aviv Giladi
InstallAware Support
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Mon Dec 27, 2010 12:13 pm

Windows 7 x64 (English)

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

Re: IA V9, Repair not working

Postby giaviv » Tue Dec 28, 2010 4:08 am

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
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

MichaelM
Posts: 51
Joined: Tue Mar 30, 2010 11:44 am

Re: IA V9, Repair not working

Postby MichaelM » Wed Dec 29, 2010 9:42 am

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.

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

Re: IA V9, Repair not working

Postby giaviv » Wed Dec 29, 2010 10:05 am

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
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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 31 guests