title: NSIS WriteIniStr
body: <p>I am trying to overwrite an existing value in my Application .config file using NSIS.</p>
  
  <p>I want to change 'endpoint address="http://DefaultWebService.asmx"'</p>
  
  <p>to 'endpoint address="http://MyWebService.asmx"'</p>
  
  <p>My Config file looks something like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
  &lt;system.serviceModel&gt;
  &lt;client&gt;
    &lt;endpoint address="http://DefaultWebService.asmx"
      binding="customBinding" bindingConfiguration="MyServiceSoap12"
      contract="WebServiceProxies.MyServiceSoap" name="MyServiceSoap12" /&gt;
  &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>In my NSIS I'm using :</p>
  
  <pre><code>WriteIniStr "$MyApp.exe.config" "system.serviceModel" "endpoint address" "endpoint address="http://MyWebService.asmx"
  </code></pre>
  
  <p>but this just adds</p>
  
  <pre><code>[system.serviceModel]
  endpoint address=http://MyWebService.asmx
  </code></pre>
  
  <p>to the bottom of the .config file.</p>
  
  <p>Where am I going wrong?</p>
  
  <p>Thanks</p>