Finding and replacing WiX in a configuration file

I am trying to make an installation using WiX, and I need to modify the configuration file (not XML or INI) with entries that have a configured WiX dialog.

Is there a good way to do this? Do I need to do custom VB script actions, maybe?

The following are the relevant bits of the wxs file:

   <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id="ProgramFilesFolder">
         <Directory Id="INSTALLLOCATION" Name="MyApp">
             <Component Id="ap_cfg" KeyPath="yes" Guid="...">
                 <File Id="CONFIGFILE" Source="myConfig.cfg" />
              </Component>
         </Directory>
      </Directory>
   </Directory>
+3
source share
2 answers

There is no built-in design for search and replace in Wix, you need to write a custom action.
I suggest that instead of using VBScript, you use DTF , which allows you to write a custom action in .net and debug it under Visual Studio.

+2

, , ?

/ , ++, MSI . , , , . " " - , , Windows , .

, ++, . WiX, .

, VBScript, , VBScript ( Jscript) MSI CustomActions .

+2

Source: https://habr.com/ru/post/1713612/


All Articles