/build/static/layout/Breadcrumb_cap_w.png

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?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
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..
Posted by: pjgeutjens 12 years ago
Red Belt
1

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
Posted by: shields_t 12 years ago
Senior Purple Belt
0

Sorry, I should clarify, the reason I want to avoid using the ini file table is that there are not only hundreds of possible entries in these ini files (not necessarily a problem in itself) but also because these files may have been installed in some pretty shonky destinations in the past.

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ