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

Installer reinstalling deleted files

I am having a strange issue. I have an MSI install for my application. After install I launch the application and through the app I delete some files. I then close the app and try to relaunch. At that point the installer kicks off and adds the files that I just deleted back on to my machine. It seems that installshield is monitoring my files. Is this what is going on? how do I turn this "feature" off?

Thanks.
Labels (1)
0 Kudos
(16) Replies
Cygnusx1
Level 8

You have the files that you are deleting set as keyfile of a component. Look in the Event Viewer for specific components that were repaired when launching your app.
0 Kudos
bknoll
Level 4

Thank you for the reply. I assumed it had something to do with the key file, and I checked the event viewer like you said to confirm. However, if I remove the key file "status" doesn't that affect my upgrade? Is there a setting I should change so that Installshield will still be able to do an upgrade but won't try to repair files when I run the application?
0 Kudos
Bineesh
Level 6

Clear the key component property of the component that you want to delete. File and folder right click the file and select clear key file..
0 Kudos
bknoll
Level 4

Thank you. I know I can delete my key file reference. But won't that affect how my upgrade will work when we have a new release?
0 Kudos
GetExp
Level 6

It depends upon the type of upgrade you are performing.
0 Kudos
bknoll
Level 4

We're in the process of determining how we will handle upgrades. So you say it will depend on what type of upgrade we're performing. Which upgrades are affected?
0 Kudos
GetExp
Level 6

Minor and small updates (patches)
0 Kudos
bknoll
Level 4

I got rid of the key file from each component and it still reinstalled them.
0 Kudos
bknoll
Level 4

Can anybody help me?
0 Kudos
KathyMorey
Level 10

As I understand it, every component has a keypath for Windows Installer. If it is not a file name, then I think it defaults to the folder the file is in. Is your application deleting folders?

I don't think there is any way to actually turn on the Installer functionality that repairs if it finds missing components. What you might do is turn on automatic logging on the machine and see what Windows Installer is checking that triggers the repair. (Registry key: HKLM->Software\Policies\Microsoft\Windows\Installer; name "Logging", value "voicewarmup")
0 Kudos
bknoll
Level 4

Yes it is deleting folders. Here is a warning from the event viewer:

Detection of product '{555555-E8A9-4E81-9339-5BDB9A9E1939}', feature 'MY_FILES', component '{55555555-5B4D-0587-E96E-88B4C8296099}' failed. The resource 'C:\Program Files\MyFiles\MyDir\' does not exist.
0 Kudos
KathyMorey
Level 10

As I meant to say, you can't really turn OFF the Windows Installer functionality that repairs installs with missing components. Is there a reason you want to remove files installed with your application? Could you serve your purpose by making the installation of the files conditional in some way?

If you are installing components with a keypath of a folder, you should be able to delete the files but leave the folder, and repair shouldn't be triggered. (I think.) Good luck.
0 Kudos
bknoll
Level 4

The files are a bunch of sound files for a voice system. The user is allowed to add, modify, and delete the files to configure the voice system. I checked, and it does appear that you can delete the files and it will be fine, but as soon as you delete one of the directories then it will reinstall all of the files, because like you said the components key path is no longer there. Is it possible to change the components key path, like to a root directory?
0 Kudos
KathyMorey
Level 10

I don't think you can do that. Take a look at the Windows Installer documentation for the KeyPath column in the Components table. (From the IS IDE, go to the Direct Editor, select the Components table, click in it and hit F1).

Could you install those files by embedding them in an exe that is run from a custom action in your install? Then Windows Installer won't know anything about them, and removing them won't trigger a repair. (Of course, you'll have to handle rollback, uninstallation and upgrade from custom actions as well.)
0 Kudos
chandu_mca06
Level 4

Create a new component and include all the sound files into that. And now don't set any key file path to any of the files.

By default the entire directory will be treated as a key file path. Now if you remove the only files from this sound files directory then the windows installer will not be installed the sound files again because the key file path directory already exists in the location.

Try this way and good luck 😄
0 Kudos
bknoll
Level 4

I fixed the issue. We turned off advertisement mode and it no longer reinstalled the files.
0 Kudos