installer - How do I modify machine.config via an .msi package -


I am trying to create an installer who will deploy the .NET managed data provider. To appear as a provider for the data provider in the Apps drop-down, I must add the provider to the section of machine.config:

  & lt; System.data & gt; & Lt; DbProviderFactories & gt; & Lt; Add name = "My Data Provider" invariant = "SamplekMyDataProvider" Description = "My Data Provider" type = "Eli.Sample.MyDataProvider, Sample.MyDataProvider, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 5b9d34470b87a97f" / & Gt; & Lt; / DbProviderFactories & gt; & Lt; /system.data>  

How can I do this? Just an indicator will be fine. Thank you.

If you use your Wix you can use the element.

  & lt; util: XmlConfig id = "Machine_Config_Xml_Root" file = "[WindowsFolder] Microsoft.NET \ Framework \ v2.0.50727 \ Config \ machine.config" action = "make install =" on "" ElementPath = "// Configuration / System.data / DbProviderFactories "name =" add "node =" element "sequence =" 1 "& gt; & Lt; / Util: XmlConfig & gt; & Lt; util: XmlConfig id = "Machine_Config_Xml_2" file = "[WindowsFolder] Microsoft.NET \ Framework \ v2.0.50727 \ Config \ machine.config" ElementPath = "Machine_Config_Xml_Root" name = "name" value = "My data provider" sequence = " 2 "& gt; & Lt; / Util: XmlConfig & gt; & Lt; Use: XmlConfig id = "Machine_Config_Xml_2" file = "[WindowsFolder] Microsoft.NET \ Framework \ v2.0.50727 \ CONFIG \ Machine.Config" ElementPath = "Machine_Config_Xml_Root" name = "nonchangeable" value = "sample.madeetproper" sequence = " 2 "& gt; & Lt; / Util: XmlConfig & gt; & Lt; util: = "Machine_Config_Xml_Root" name XmlConfig id = "Machine_Config_Xml_2" file = "[WindowsFolder] Microsoft.NET \ v2.0.50727 \ Config \ machine.config \ Framework" ElementPath = "Description" value = "My data provider" sequence = " 2 "& gt; & Lt; / Util: XmlConfig & gt; & Lt; util: = "Machine_Config_Xml_Root" name XmlConfig id = "Machine_Config_Xml_2" file = "[WindowsFolder] Microsoft.NET \ v2.0.50727 \ Config \ machine.config \ Framework" ElementPath = "type" value = "Eli.Sample.MyDataProvider, sample . Myadaptaprador, version = 1.0.0.0, culture = neutral, public token = 5b 9d 34470b87a97f "sequence =" 2 "& gt; & Lt; / Util: XmlConfig & gt; & Lt; util: XmlConfig id = "Machine_Config_Xml_Uninstall_l" file = "[WindowsFolder] Microsoft.NET \ Framework \ v2.0.50727 \ CONFIG \ Machine.Config" action = "delete" on "," uninstall "ElementPath =" // configuration / system .data / dbProviderFactories / add [\ [inventive = 'Sample.MyDataProvider' [\]] "Sequence =" 1 "& gt; & gt; / util: XmlConfig>  
< / Div>

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -