Revenera Documentation site will be unavailable on July 2nd due to scheduled maintenance. For more information see the status dashboard.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Magnus
Level 6

Key file question

Please give me a reason why not set all my files to a "key file". All my files are important, even my .config, .bin, .wav ect files.
Labels (1)
0 Kudos
6 Replies
Not applicable

Hi, Magnus

You can add more components, each one only insert one file to set key file.

BR,
Kevin
0 Kudos
Magnus
Level 6

I have lots of components, one component for every file, and I set key file to all my files. I just want to know if there is any reason not to set a file to a key file.
0 Kudos
Cary_R
Level 11

The big thing with keyfiles is that they are what Windows Installer uses to determine if a component is correctly installed or not before it runs AutoRepair.

Microsoft's best practices say to use executable modules as Keypaths, because these comprise functional parts of your application. And thus, if one is missing, autorepair should trigger since ostensibly the application won't work without being repaired.

That said, any files that if missing will cause your application to misbehave you will want to set as Keyfiles. Files that are somewhat optional (like a readme.txt for example) and should not trigger autorepair, you can leave as non-keypath files in a component that contains a keypath, or in its own component without a keypath.

Hope this helps!
0 Kudos
Magnus
Level 6

Now I know that my strategy will work "one component for every file, and set key file to all my files".

Thanks!
0 Kudos
Holger_G
Level 10

You should also take a look at Rob Mensching´s Windows Installer Components Introduction.
0 Kudos
Christopher_Pai
Level 16

It's pretty well agreed in the WiX community that despite what the MSFT directions on MSDN say that a 1:1 file to component relationship with each file being a keyfile in it's own component is the default, general case to start with.

There are times when you would steer away from this but this is the best way to start. The question I think the author is asking is how do you go about telling InstallShield that this is what you *WANT* when using the component wizards.

I know I've asked in the past for a wizard configuration screen that allows you to define your component rules ( actually different profiles would be nice ) so that the authoring will be exactly the way you want when you do a big drag and drop.

In my tool ( IsWiX ) I provide a simple radio selection that asks if you want one to many ( InstallShield / MSFT style ) or one to one ( WiX / MSFT style ) authoring for non-program executable files.
0 Kudos