Importing a file from the destination PC into an MSI
Since I have always in the past done repacakging work this question has never come up before, but now I am putting together an MSI for a vendor, I would like to know if it is possible to pull a file from the destination PC in an MSI.
The scenario is this, I have an appsearch function to check for the existence of a previous installation (this will be the first MSI release), if a previous version exists I would like to nab a couple of ini files during the UISequence which I will later merge with ini files in my installation using a custom action. I understand I can interrogate ini files which exist in the C:\Windows folder using appsearch but is it possible to actually copy a file into an MSI?
Answers (2)
Afaik you cannot 'dynamically' put files from the destination machine into your MSI (as files). What you can do is read in their contents in a Custom Action and then apply the required modification there. Then I would condition both your default ini file components (if you have any) and the Custom Action that modifies existing ones on the result of your system search. That way, if there are ini files present, you modify them, if not, you put your defaults in place..
Afaik you cannot 'dynamically' put files from the destination machine into your MSI (as files). What you can do is read in their contents in a Custom Action and then apply the required modification there. Then I would condition both your default ini file components (if you have any) and the Custom Action that modifies existing ones on the result of your system search. That way, if there are ini files present, you modify them, if not, you put your defaults in place..
Comments:
-
Thanks, that makes sense, I was just struggling with the logic and method on a Friday afternoon, I'll give that a go. - shields_t 12 years ago