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

Files and Components


1 reply to this topic

ashwin

ashwin
  • Members
  • 16 posts

Posted 10 April 2003 - 22:36

Hi

I was trying to create an MSI package manually by entering values into MSI database using Orca. I entered few files into the filetable that belong to just one component so all these files have same component name as FK. I am also required to enter file names in component tables as key path. Which is again FK.
But the problem is that there will be a repeating PK component name. Since the same component has 2 files in key path.

In case I have a component that actually comprises of more than one file. So the component should have name of two files in its keypath. But this is not valid because component name is a PK. So component name cannot be repeated.
I am confused about the relationship between a file and a component. If someone can provide me with some insight into this I will be very grateful.

Thank you in advance
Ashwin.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 April 2003 - 09:00

The _Component column in the File table defines which files belong to a component. You can have multiple rows (one for each file) that have the same value in the _Component column. So all these files are in the same component.

The KeyPath column of the component table however defines, what the key path of this component is. This is often a file (i.e. cross reference to the file table), but could as well be a registry entry. A component can have only one key path.

The "key path" is what Windows Installer uses to check the component's integrity. I.e. if you defined a file as key path, the installer will verify the existance of this file when your users starts the application. If it is missing, auto-repair will be triggered. If your user deleted another file, which is not key path of the component, auto-repair will not be triggered.
The key path also plays an important role for updates, because a component will only be updated if the key path needs to be updated.

So if you have several files that are vital and you want MSI to verify them when your app is launched, you should create separate components for them.
The WIndows Installer SDK includes some component rules, e.g. one component should not include more than one EXE, OCX etc.