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 ovewritten even with


11 replies to this topic

dtieuf

dtieuf
  • Full Members
  • 31 posts

Posted 01 August 2005 - 20:09

Hi all,

I was under the impression that a component with the msidbComponentAttributesNeverOverwrite flag would never be overwritten ?

My component has about 4 unversionned data files, and it also has the msidbComponentAttributesPermanent flag.

Somehow, some of our users have reported that the key file has been overwritten !

The only way I was able to reproduce the situation is by changing the key file's modified date so that it would be earlier than the creation date. unsure.gif

Any idea on how I could make never mean never ?

Thank you,

Sophie



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 August 2005 - 19:42

Ideally you should have a log file to see what's going on.
Is this a Major Upgrade (i.e. you changed the ProductCode)?
Note that Never Overwrite only checks the key file of the component, not the other files.

Blicos

Blicos
  • Members
  • 10 posts

Posted 19 August 2005 - 15:04


I have exactly the same problem. I am doing a major upgrade. If, as you say, 'Never Overwrite' only applies to the key file, how then do you stop a non key file in a component from overwriting an existing file?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 August 2005 - 10:13

Put it in a separate component and make it the key file.

Blicos

Blicos
  • Members
  • 10 posts

Posted 22 August 2005 - 16:13

I have done this (separated the files into their own component each and made that file the key), but am still getting the file overwritten. It is definitely finding the file as can be seen in the following log excerpt:


SI (s) (6C:1C) [15:01:21:481]: Executing op: FileCopy(SourceName=PA2302~1.XML|PackageList.xml,SourceCabKey=PackageList.xml,DestName=PackageList.xml,Attributes=16384,FileSize=68,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=-1098213628,HashPart2=144979467,HashPart3=2115078184,HashPart4=-1508801546,,)
MSI (s) (6C:1C) [15:01:21:481]: File: C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.xml; Overwrite; Won't patch; Existing file is unversioned and unmodified - hash doesn't match source file
MSI (s) (6C:1C) [15:01:21:481]: Source for file 'PackageList.xml' is compressed
InstallFiles: File: PackageList.xml, Directory: C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\, Size: 68
MSI (s) (6C:1C) [15:01:21:481]: Re-applying security from existing file.
MSI (s) (6C:1C) [15:01:21:497]: Verifying accessibility of file: PackageList.xml
MSI (s) (6C:1C) [15:01:21:497]: Note: 1: 2318 2: C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.xml
MSI (s) (6C:1C) [15:01:21:497]: Executing op: SetTargetFolder(Folder=C:\Documents and Settings\All Users\Application Data\MyApp\Content\)
MSI (s) (6C:1C) [15:01:21:497]: Executing op: SetSourceFolder(Folder=1\Common~1\MyApp\Content\|CommonAppData\MyApp\Content\)


Even though i am DEFINITELY setting 'Never Overwrite' on these new components, the log simply says:

... Overwrite; Won't patch; Existing file is unversioned and unmodified - hash doesn't match source file


What else could i be missing?


Also, what is the significance of the key column on the far right of the 'Files' view of the component? I couldn't find anything in the help that refered to this column...

Cheers!


mandy

mandy
  • Members
  • 121 posts

Posted 22 August 2005 - 17:09

Is there a line similar to this one in your log file anywhere?

"Disallowing installation of component: {03FBC790-EA8A-404A-8A59-EF4C2C777C8A} since the keyfile exists and the component is marked to never overwrite existing installations"

Might you have more than one component installing the same file?


Blicos

Blicos
  • Members
  • 10 posts

Posted 22 August 2005 - 21:23


There are lines similar to this in the log, but none that refer to the component guids of these 2 new components...


Also, the substring:

InstallFiles: File: PackageList.idx

only appears once in the log...

What else might be the issue?


Blicos

Blicos
  • Members
  • 10 posts

Posted 23 August 2005 - 11:23

Searching for the component guid in the file, i find the following 4 lines:

MSI (s) (6C:1C) [15:01:00:966]: Executing op: ComponentRegister(ComponentId={3B58EFDE-83EE-470A-9DED-3E28CAA264D7},KeyPath=C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.idx,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)

1: {5647D1B9-4377-4AD8-849B-40D47334EB3C} 2: {3B58EFDE-83EE-470A-9DED-3E28CAA264D7} 3: C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.idx

MSI (s) (6C:1C) [15:01:00:966]: Executing op: ComponentRegister(ComponentId={3B58EFDE-83EE-470A-9DED-3E28CAA264D7},KeyPath=C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.idx,State=3,ProductKey={00000000-0000-0000-0000-000000000000},Disk=1,SharedDllRefCount=0,BinaryType=0)

1: {00000000-0000-0000-0000-000000000000} 2: {3B58EFDE-83EE-470A-9DED-3E28CAA264D7} 3: C:\Documents and Settings\All Users\Application Data\MyApp\PackageConfig\PackageList.idx


It must have something to do with the second pair of lines, as none of the other files in the old component have this second pair of lines, just the first. But i don't see anywhere in the component settings where you specifya product key... This component is a child of a feature which itself is a child of another feature. Not sure of the significance of that (i didn't make it that way, i've inherited this quite well established installer project), but thought i would mention it, as this is the only example of this structure in the Setup Design.

Getting closer!! smile.gif


Blicos

Blicos
  • Members
  • 10 posts

Posted 23 August 2005 - 11:48


I just read a post of yours on another site about a simliar issue, you say in a Major Upgrade (I have changed the product code!), the existing key file always gets overwritten, regardless of the 'Never Overwrite' flag. Is this true?

In my case, i have moved the file using the MoveFiles table from another location, before both RemoveFiles and InstallFiles have executed (Directory layout has been rearranged). Will it still consider it to be the existing file in this case? I guess so, it is right where InstallFiles wants to put the new file... sad.gif

Am i scuppered?

Blicos

Blicos
  • Members
  • 10 posts

Posted 23 August 2005 - 11:55


In that thread you say that this behaviour may be configurable in Express, how about InstallShield 9, SP1?




mandy

mandy
  • Members
  • 121 posts

Posted 23 August 2005 - 14:58

QUOTE (Blicos @ 2005-08-23 10:23)
...It must have something to do with the second pair of lines, as none of the other files in the old component have this second pair of lines, just the first.

The second pair of lines are there because your component has the "msidbComponentAttributesPermanent" attribute set.

Product "{00000000-0000-0000-0000-000000000000}" (which will never be uninstalled) is registered as a client of your component.

Have you ever tried MSISPY? It could prove useful in troubleshooting this issue.

Edited by mandy, 23 August 2005 - 15:43.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 August 2005 - 18:08

In a Major Upgrade in order to make neveroverwrite work, you must sequence RemoveExistingProducts late in the sequence, so that the new files first get installed, then only obsolete files get removed. If you have RemoveExistingProducts early in the sequence Winodws Installer will first perform an uninstall of the old version (thus removing the existing file, regardless of overwirte flag). This should not happen however if this component is marked as "permanent" so it will never be removed. Of course it needed to be marked as "permanent" already in the old version of your setup because that is what gets called to uninstall the previous version.