Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

File overwritten contrary to rules


4 replies to this topic

Tyler Curtis

Tyler Curtis
  • Full Members
  • 24 posts

Posted 09 October 2001 - 20:56

During installation, older files (date/time stamp) are overwriting newer files, reinstall mode = omus. The newer files have NO attributes while the older files have the Archive attribute.

The installation log file results display this entry for the file(s) to be considered, "Overwrite;  Existing file is unversioned and unmodified".

This appears to be contrary to the Reinstall codes on page 819 of the "Official IS for Windows Installer Developer's Guide" by Bob Baker.

Anybody have experience with this? Any work around know?


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 10 October 2001 - 09:26

I am afraid you are misinterpreting what the date comparison does.  

Firstly I will point out what msi does not do.  Msi does not use the date of the new file at all when deciding to install a file or not.

Msi works by looking at the creation and modifcation dates of the file already installed.   If a file has been modified by the user then the modification date will be later than the creation date.  In this case msi will not overwrite the file.

See Msi Documentation
Window Installer
 About Windows Installer
   File Versioning Rules


narapark

narapark
  • Members
  • 18 posts

Posted 19 November 2003 - 16:57

>If a file has been modified by the user then the modification date will be later >than the creation date.

Is there anyways to stop the file with older 'created date' overwriting a file with newer 'created date'? The files are not versioned...

Also, is it possible to version .asp files?



Robo Scripter

Robo Scripter
  • Members
  • 15 posts

Posted 19 November 2003 - 20:33

Have you tried to set the files in question as key components to their own componemt and setting the component attribute to 128. this translates to msidbComponentAttributesNeverOverwrite

Per the SDK Help:
If this bit is set, the installer does not install or reinstall the component if a key path file or a key path registry entry for the component already exists. The application does register itself as a client of the component.
Use this flag only for components that are being registered by the Registry table. Do not use this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and Verb tables.


Regards,


Robert W. Haynie
Software Integration Consultant
robert.haynie@HaynieHouse.com
+1 (713) 805-4830
Be the stone that sharpens the leading edge.

narapark

narapark
  • Members
  • 18 posts

Posted 20 November 2003 - 13:57

Hi, thanks for the reply.

-----------------------------
>Have you tried to set the files in question as key components to their own >componemt and setting the component attribute to 128. this translates to >msidbComponentAttributesNeverOverwrite
------------------------------

What I want to do is the installer to compare the existing files on the system and the files included in the install by date. If the existing file has a date that is newer than the installing one then I don't want want it to be overwritten. i.e. I do not want older file overwriting the newer files.

Any suggestions?