Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Windows MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 05-18-2010, 02:01 PM   #1 (permalink)
kriz
Guest
 
Posts: n/a
Default Component key file

Hi,
I have few basic questions

1. Could someone clarify what is the reason why component file should be
created?

2.MSDN says:
"Because the installer only installs entire components, if the installed key
file is replaced then, all of the component's files are replaced."

Does it mean that if key file is not changed files within components are not
change (checked for change) neither?

When i when I am creating a new version of a product (ProductVersion is
incremented) each file is evaluated one by one to determine whether it should
override/patch existing files. If the key file was not change but other files
within given component are change they are correctly updated on target
machine.

3. In installshield document
(IS_Tip_Working-With-MSI-Features-Components.pdf) it is written
"For the most effective file transfer, a component should contain at most
one executable or DLL—ideally, a versioned file—and this file should be
marked as the key file of its component."

What is point in it? (in the context that during the update each file within
the component is evaluated independently from key file evaluation results?)


  Reply With Quote
Old 05-18-2010, 07:01 PM   #2 (permalink)
Wilson, Phil
Guest
 
Posts: n/a
Default Re: Component key file

In some cases there is a requirement for a key path. One example is for
installing a service where the ServiceInstall table refers to a component,
and the service executable is expected to be the key path executable. There
are a few other similar examples.

You will get a key path whether you want it or not. It'll default to the
containing folder if you don't specify one.

One component per file works best for most scenarios. If you don't replace
the key path file how do you patch another file in the same component? Or if
you want to update one but not another? What if you'd like to use the MSI
APIs to enumerate every component (and therefore file) and see where it was
installed? - obscure but sometimes useful. What if someone decides that one
of the files in a component should be moved to another feature, or shared
with another setup? It gets complicated really fast. If you're a developer
I'm sure you could write one huge assembly (or Dll or COM component) to
contain every function your company might ever call, and I couldn't give you
a technical reason why that's a bad idea, but the logistics, management, and
updating of it would be pretty awkward. It's the same general reason for
keeping each file in a unique component.

--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"kriz" <kriz@discussions.microsoft.com> wrote in message
news:65CD58E4-E213-4085-8375-AB455AEC455E@microsoft.com...
> Hi,
> I have few basic questions
>
> 1. Could someone clarify what is the reason why component file should be
> created?
>
> 2.MSDN says:
> "Because the installer only installs entire components, if the installed
> key
> file is replaced then, all of the component's files are replaced."
>
> Does it mean that if key file is not changed files within components are
> not
> change (checked for change) neither?
>
> When i when I am creating a new version of a product (ProductVersion is
> incremented) each file is evaluated one by one to determine whether it
> should
> override/patch existing files. If the key file was not change but other
> files
> within given component are change they are correctly updated on target
> machine.
>
> 3. In installshield document
> (IS_Tip_Working-With-MSI-Features-Components.pdf) it is written
> "For the most effective file transfer, a component should contain at most
> one executable or DLL—ideally, a versioned file—and this file should be
> marked as the key file of its component."
>
> What is point in it? (in the context that during the update each file
> within
> the component is evaluated independently from key file evaluation
> results?)
>
>


  Reply With Quote
Old 05-19-2010, 02:01 PM   #3 (permalink)
kriz
Guest
 
Posts: n/a
Default Re: Component key file

Thank you for the explanation.


For testing purposes I created an installer (productVersion 1.0.0) that
contains one feature, one component and 10 versioned files with key file
inside. It is about 10MB

Later I created a new version (1.0.1). In the new version i replaced key
file with new version. Then I created a patch. The only difference was the
key file (5kB) and the patch size was 10 kB. It means that the patch does not
contain all the files within the component but only delta, and I am able to
update single files within the component without other files, am I right?

With that patch i was able to successfully patch the version V1.0.0 to V1.0.1.

Regards
  Reply With Quote
Old 05-19-2010, 02:01 PM   #4 (permalink)
kriz
Guest
 
Posts: n/a
Default Re: Component key file


Thank you for the explanation.


For testing purposes I created an installer (productVersion 1.0.0) that
contains one feature, one component and 10 versioned files with key file
inside. It is about 10MB

Later I created a new version (1.0.1). In the new version i replaced key
file with new version. Then I created a patch. The only difference was the
key file (5kB) and the patch size was 10 kB. It means that the patch does not
contain all the files within the component but only delta, and I am able to
update single files within the component without other files, am I right?

With that patch i was able to successfully patch the version V1.0.0 to V1.0.1.

Regards!
  Reply With Quote
Old 05-19-2010, 08:01 PM   #5 (permalink)
Wilson, Phil
Guest
 
Posts: n/a
Default Re: Component key file


That's fine yes. But try a patch to a different file in the component
without updating the version of that key file though, that's the tricky one.
--
Phil Wilson


"kriz" <kriz@discussions.microsoft.com> wrote in message
news:591CCCD6-F814-42F2-A673-BFAFEBCE2436@microsoft.com...
> Thank you for the explanation.
>
>
> For testing purposes I created an installer (productVersion 1.0.0) that
> contains one feature, one component and 10 versioned files with key file
> inside. It is about 10MB
>
> Later I created a new version (1.0.1). In the new version i replaced key
> file with new version. Then I created a patch. The only difference was the
> key file (5kB) and the patch size was 10 kB. It means that the patch does
> not
> contain all the files within the component but only delta, and I am able
> to
> update single files within the component without other files, am I right?
>
> With that patch i was able to successfully patch the version V1.0.0 to
> V1.0.1.
>
> Regards


  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:17 PM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com