(imported topic written by fhack)
I have a file called user.config, basically it’s an XML Configuration File.
I have 4 configurations that change only one part: “CHANGE_HERE” down in the code. I’m trying to figure out how I can open the file and change that 1 line.
For each action I would include the code to change that one line so I can lay down a default file and change the line. The file gets copied over to each user’s profile but I have a Perl Script that does that. So I just have to modify the user.config file before running the Perl Script.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings">
<section name="QTSDataAccess.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<QTSDataAccess.My.MySettings>
<setting name="SQLDBName" serializeAs="String">
<value>CHANGE_HERE</value>
</setting>
</QTSDataAccess.My.MySettings>
</userSettings>
</configuration>