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

How to NOT replace a missing file during a repair.

I know this is a odd request, but I'm near the end of a Minor Update to our software, and it's too late to switch to a Major to do this.

I have a component that installs a PDF form on our server. Apparently, I have been requested to NOT replace that file during a repair if it has gone missing. Currently, since it is a a component that should exist, the repair option will notice its absence and place the file back where it belongs, and someone is complaining.

doing this Is easy in my new installs, as I can just use a Custom Action to copy the file to the location (therefore not having a component) if it doesn't already exist. We are ok leaving the file there during an uninstall as well.

Does anyone have any words of wisdom?

My first idea is to break some conventions:

My Minor Update is also used as a new install, so my idea is
1) I do the new install copy trick when installing the feature for the first time (&Feature=3 condition)
2) I DELETE the component.... I know this is a no-no when it comes to best practices, but in reality what are the consequences? I believe the file would be ignored once the product is updated to the version missing the component, and then subsequent repairs would ignore the file (because it doesn't exist as a component).. are there any caveats I have missed?

Thanks for any and all suggestions.
Labels (1)
0 Kudos
(2) Replies
Level 16

Sorry, you opened yourself up when you asked for "words of wisdom". I have many.

First, the requirement is bunk. I can pretty much read between the lines because I've had developers want the same thing. What's worst is they are asking for it late in their design when you are already trapped in a corner.

Bad, bad developers.

Your custom action tricks are hacks and are not good form. However, if you truely are fine with leaving a file behind on uninstall and not ever repairing it, the easiest thing to do I believe is to give the component a null guid.
0 Kudos
Level 6

fair enough! I fought and lost the battle to get them to change their minds.
0 Kudos