cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BPWILL
Level 4

Unwanted Behaivor

I use a basic MSI installer to put down a program that reads some information from a text file. The installer also puts down the text file. To test this program on the client machine, I renamed the text file. When I ran the program that uses the file, instead of it displaying an error message as I intended, it tries to run the installer. I looked and see that I am caching the installer in the local app folder, so I removed it and tried again, but the installer ran again, but this time reported that it could not find resources. My program then ran and displayed the intended error mesage. I also plan on removing that option and rebuilding.

I do not want the program to run the installer if it is missing components. how do I prevent this?
Labels (1)
0 Kudos
5 Replies
rguggisberg
Level 13

Go to the Component view
Expand the component
Click on Files
Right click on the file in the window on the right
Click on 'Clear Key File'
Do this for the desired components.
0 Kudos
BPWILL
Level 4

Not sure this is correct - I thought a component had to have at least one key file. In my case the exe is the only file
0 Kudos
DLee65
Level 13

Component rules dictate that DLL files, OCX files, EXE files, CHM files, etc should be set as key files. This is so that file resiliency takes place on startup of the application and you can guarantee a healthy application if any files are damaged or missing. It is one of the cores of MSI.

Removing a EXE from a key file will most likely break validation if that is a requirement for your company. Text files however, do not need to be key files. If you have a component that has all text files and no exe, dll, ocx, or chm file, then it will use the installation path for the component as the key.
0 Kudos
BPWILL
Level 4

DLee65 wrote:
Component rules dictate that DLL files, OCX files, EXE files, CHM files, etc should be set as key files. This is so that file resiliency takes place on startup of the application and you can guarantee a healthy application if any files are damaged or missing. It is one of the cores of MSI.

Removing a EXE from a key file will most likely break validation if that is a requirement for your company. Text files however, do not need to be key files. If you have a component that has all text files and no exe, dll, ocx, or chm file, then it will use the installation path for the component as the key.


This is what I thought, but it doesn't answer my original question. The component has one file - the executable. I has to be set as key. When the exe is run and it cant find the text file it needs to read, it launches the installer. I have sufficient code to cover this situation - I don't need it to try and fix itself.
0 Kudos
DLee65
Level 13

Check your event viewer. It should list what component is being triggered when the repair is executed. Also enable logging in the registry and the temp directory will contain a MSI log file I would expect. Perhaps it is not what you are expecting.

I am in agreement with you, if the EXE is present and healthy, then it should not care if the associated text files are present or not present. It should only be concerned for its key file.
I don't know if this will help you better debug the situation or not.
0 Kudos