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