Page 1 of 1
Files not being replaced
Posted: Mon Jul 11, 2011 6:30 am
by tosch
I have been creating/testing then installation for our app the last 4 days. I have frequently made small changes/bug fixes to our software, reinstalled again and tested. This has always worked fine, all the files in the targetfolder were updated with the new versions.
Since some time this morning when I reinstall my app or do a repair the more recent file are not copied into the $Targetdir$ folder. I have no idea why. I have reset the file date of the existing file to a couple of days ago, no change.
On the install files command I have only entered the sourcefilename and the targetfolder, no checkboxes are set.
When I delete the files they are installed properly.
How does IA check if a file has to be replaced?
Most files are .net assemblies, some are plain text files.
I have also installed using a log file. In the log file I see lots of entries with empty <Install Files> tags.
Using IA11, native engine.
Thomas
Re: Files not being replaced
Posted: Mon Jul 11, 2011 4:54 pm
by giaviv
Hi Thomas,
Please see my response to you in the other thread.
InstallAware compares the file version and/or whether the file was modified in order to determine if a replacement is necessary, but remember that it is all controlled by the NATIVE_OVERWRITE variable.
Re: Files not being replaced
Posted: Tue Jul 12, 2011 1:54 am
by tosch
Hi Aviv,
I have set the variable as described in the help file.
But the files still don't get replaced.
File date in destination folder: 11.07.2011 14:13
File to be installed: 11.07.2011 16:27
For test purposes I have installed the files in an empty directory and in there the version I expected is installed.
Any other idea what I can try?
Thomas
Re: Files not being replaced
Posted: Tue Jul 12, 2011 8:52 am
by giaviv
Are you basically saying that this started happening all of a sudden but wasn't happening before?
If so, something must have changed in your project that is causing this error. Try creating a new setup and see what happens there - are you experiencing the same thing?
Re: Files not being replaced
Posted: Tue Jul 12, 2011 11:38 pm
by tosch
It's working again. I found that I hat a double backslash in the targetdir variable. Maybe this was the problem? I'm not exactly sure but everything seems to be working fine again.
Thomas
Re: Files not being replaced
Posted: Wed Jul 13, 2011 5:46 pm
by giaviv
It might have been the problem, but its more likely that something else changed.
Anyway, I am glad it was resolved!
Re: Files not being replaced
Posted: Thu Jul 14, 2011 5:33 am
by tosch
Aviv,
here we go again. Files are not being replaced again!
Is there any way I can find out why they are not being replaced?
I have changed a few little bits and pieces in the install script but I have displayed a messagebox before installing files and the messagebox appears, the targetdir seems to be ok.
Then I created a small setup project from scratch using the basic setup template. I have added 3 of my files to install.
Installed on the target machine, all fine. Then I rebuilt the setup, reset the file dates on the target machines to yesterday and installed again -> files are not being replaced now.
I'm running the installation in native mode, the variable $NATIVE_OVERWRITE$ has the value PROMPT just before I install the files. No prompt is appearing.
Any ideas? Are there any more log options I can try?
Thomas
Re: Files not being replaced
Posted: Thu Jul 14, 2011 11:10 am
by giaviv
Thomans,
Sounds like you are doing everything right. However, since this issue comes and goes, try to think what changes you were making that might have caused this to happen. I just tried it here and it seems to work perfectly..
Re: Files not being replaced
Posted: Thu Jul 14, 2011 1:11 pm
by tosch
Is there anything in the script that I may be doing wrong?
Maybe the 'Offline media' / 'web media' directives?
I can mail you my sample setup and script if this helps.
Thomas
Re: Files not being replaced
Posted: Thu Jul 14, 2011 5:04 pm
by giaviv
I am not sure that's it. What other changes have you made?
Please also send the project to support at installaware.com
Re: Files not being replaced
Posted: Thu Jul 14, 2011 11:40 pm
by tosch
I have mailed you my setup script, the file being installed and the setup exe. Project is called 'New Project'.
I also included a part in the script that shows the problem with the convert short path function. It's in the script from line 90 - 100.
Thomas
Re: Files not being replaced
Posted: Fri Jul 15, 2011 6:26 am
by tosch
What is the mechanism for checking if a file has to be installed?
If the file is already present are only date/time checked or the file version?
If you check the file version do you check major, minor, build and revision?
Thomas
Re: Files not being replaced
Posted: Sat Jul 16, 2011 12:07 pm
by giaviv
Dear Thomas,
This is different if you are using the Native Engine, which I highly recommend you to do. If using the Native Engine, these two pre-defined variables can help you out:
Code: Select all
NATIVE_OVERWRITE: Initially PROMPT. With the initial value, when setup is about to overwrite a file during a native engine installation, the end-user will be prompted with an overwrite dialog displaying the file dates and versions for both the new file and the old file, as well as the options to overwrite or skip the file. Set to ALWAYS to automatically overwrite files. Set to NEVER to automatically skip installing files that already exist on the target. Any other value will be interpreted as PROMPT. If the end-user makes the choice to apply the overwrite decision in the prompt dialog to all files, this variable will also be automatically updated, keeping the setup script aware of end-user choices and providing it with the ability to override them.
NATIVE_OVERWRITE_OLDER: Initially FALSE. Determines whether the native setup engine is allowed to replace files that have been determined to be newer with older files that are included in the installation. Set to TRUE to permit the native setup engine to replace files that are newer with older copies (this is not recommended). This variable overrides the value of the NATIVE_OVERWRITE variable when FALSE, and the file being installed by setup is determined to be older than the file already present on the target system. The native engine compares files as follows: If both files are versioned, the decision is based on the comparison of the file versions (the installed file has to be a newer version than the present file). If none of the files are versioned, the decision is based on the comparison of file dates (the installed file has to be modified more recently than the present file). If the file being installed lacks version information but the present file contains version information, the file being installed is assumed to be older. If the file being installed contains version information but the present file lacks version information, file dates are compared.