cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TheInfamousOne
Level 3

Updating file in InstallSheild does not seem to update the file.

Hello all,

All I'm trying to do it to update an file.exe.config file (XML Config File). I have selected my feature I wanted to add it to. I added the file through Files and Folders to the directory I want. I removed the oringal file, then i added the updated XML Config File) I set the version in the File table to 65535.0.0.0 so it will always overwrite what is there. I saved the MST and it created a cab file for me.

When I run the install, it does not update the file. Instead, the original xml config file is still there. Why isn't the update file applying itself to the install directory?

Did I miss something?
Labels (1)
0 Kudos
(3) Replies
Evan_Border
Level 8

TheInfamousOne wrote:
Hello all,

All I'm trying to do it to update an file.exe.config file (XML Config File). I have selected my feature I wanted to add it to. I added the file through Files and Folders to the directory I want. I removed the oringal file, then i added the updated XML Config File) I set the version in the File table to 65535.0.0.0 so it will always overwrite what is there. I saved the MST and it created a cab file for me.

When I run the install, it does not update the file. Instead, the original xml config file is still there. Why isn't the update file applying itself to the install directory?

Did I miss something?


Is that .config file the Key (AKA KeyPath) of its component? Components are atomic units that install their payload in an all-or-nothing fashion. If the component that it belongs to uses another resource as its key, it may not see any reason to install.
0 Kudos
TheInfamousOne
Level 3

Evan Border wrote:
Is that .config file the Key (AKA KeyPath) of its component? Components are atomic units that install their payload in an all-or-nothing fashion. If the component that it belongs to uses another resource as its key, it may not see any reason to install.


Thanks, that was good information.

But there was no key file associated with this file. I noticed the MST was not installing the correct features when I created it. I went back and saved it again and this time it worked. I'll have to chalk this one up to InstallShield Wonkyness.

Thanks again,
0 Kudos
DLee65
Level 13

If a component does not contain a key file, the rules of MSI state that the target directory for the component is used as the 'key'. So if the target directory already exists, then the component is not installed. So lets say you add a new component for a .config file and do not specify a key file for the component. The target directory is set to [INSTALLDIR]. In a new install the file should be installed correctly, however, in an upgrade scenario INSTALLDIR will already exist and so the component is not flagged to install.

If you added the .config file to an existing component, let's say 'myFile.dll' then the .dll file is set as the key file of that component. IF that file did not change for a particular upgrade, then the file will not be installed.

The only way to ensure that the file always gets updated is to place the .config file in its own component and flag the file as the key file.
0 Kudos