permanent files getting removed
hi All,
i have msi A which installs 10 files to c:\test. i then install msi B which installs the same files (new versions) to the same location.
if msi B is removed i want the newer files to stay on the machine, so i have their component permanent attribute to yes.
when i remove msi A i want all the files to be removed so that i have a clean system.
its is important to note that msi A cannot be re-packaged or touched so i cannot add functionality to msi A.
i have msi A which installs 10 files to c:\test. i then install msi B which installs the same files (new versions) to the same location.
if msi B is removed i want the newer files to stay on the machine, so i have their component permanent attribute to yes.
when i remove msi A i want all the files to be removed so that i have a clean system.
its is important to note that msi A cannot be re-packaged or touched so i cannot add functionality to msi A.
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
elgwhoppo
13 years ago
Posted by:
elgwhoppo
13 years ago
Posted by:
frodo
13 years ago
ok, sorry for the confusion.
MSI A and B have common files in folder X.
B installs newer files into fldr X.
When B is removed i do not want the newer files to be removed.
When A is removed i want the files in fldr X to be removed.
I cannot update or upgrade msi A, so B has to contain the logic
hopefully that makes sense
MSI A and B have common files in folder X.
B installs newer files into fldr X.
When B is removed i do not want the newer files to be removed.
When A is removed i want the files in fldr X to be removed.
I cannot update or upgrade msi A, so B has to contain the logic
hopefully that makes sense
Posted by:
elgwhoppo
13 years ago
ORIGINAL: frodo
ok, sorry for the confusion.
MSI A and B have common files in folder X.
B installs newer files into fldr X.
OK, I'm following you so far.
ORIGINAL: frodo
When B is removed i do not want the newer files to be removed.
Like you said before, ensuring that the msidbComponentAttributesPermanent attribute is enabled for all the selected file Components will leave the any files in those components installed after a removal.
ORIGINAL: frodo
When A is removed i want the files in fldr X to be removed.
I cannot update or upgrade msi A, so B has to contain the logic
I would write a script that would remove A and delete the files. That sounds like it would do what you want. I'm not sure why B has to have the logic.
Posted by:
anonymous_9363
13 years ago
B has to contain the logicSo, your problem would have been better stated as "When B determines that A has been removed..."? As far as I can make out, then, B should determine if A has been removed (IMV, that should be two-pronged: a check for the install data in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and for one of the file's version info/date stamp) and then set a property value. That property can then be used as a condition for a CA which deletes the files.
It's all pretty tortuous. Why not simply let B update the files as normal, without marking them as permanent? It sounds to me like you're trying to preserve A in case B fouls up) so, if A is still required, just re-install it. Or have B back up the old files and, on removal of B, copy them back?

so that the conversation will remain readable.