---
title: "Accessing and Updating System Settings via Settings.xml"
slug: "accessing-system-settings-settings-xml"
description: "This document shows how to access the system settings stored within the settings.xml file, via code in Visual Studio. The document provides examples of the code needed, as well as the output display of the information being accessed."
updated: 2024-06-18T19:13:00Z
published: 2024-06-18T19:13:00Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accessing and Updating System Settings via Settings.xml

## Overview

The system settings can be accessed from the **S****ettings.xml** file which is located on a local installation of Decisions at **C:\Program Files\Decisions\Decisions Server**. The values of this file can be accessed and updated from an XML editor or via code.

## Example

The following example will demonstrate how to access and update the DefaultAccountEmailAddress setting via code.

1. In a new C# project in any desired IDE, add a reference to **DecisionsFramework.dll**and add**using DecisionsFramework.ServiceLayer;**
2. To access the DefaultAcocuntEmailAddress setting, add **Settings.GetSettings().DefaultAccountEmailAddress.**Add the following lines to update and save the changes to the setting.

```csharp
Settings.GetSettings().DefaultAccountEmailAddress =  "Updated@decisions.com";
Settings.SaveSettings();
```

Below is a complete code example on how to access and update/save various settings from in the settings file in a console application.

```csharp
 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DecisionsFramework.ServiceLayer;
 
namespace DecisionsSampleAccessingSystemSettingsXML
{
    class AccessingSettingsXMLExample
    {
        static void Main(string[] args)
        {
 
            Console.WriteLine("LogFileMaxSize: " + Settings.GetSettings().LogFileMaxSize);
            Console.WriteLine("Bypass SMTP Server: " + Settings.GetSettings().Mail.ByPassSmtpServer);
            Console.WriteLine("Default Account Email Address: " + Settings.GetSettings().DefaultAccountEmailAddress);
            Console.WriteLine("Changing default account email address...");
            Settings.GetSettings().DefaultAccountEmailAddress = "Updated@decisions.com";
            Settings.SaveSettings();
            Console.WriteLine("Default Account Email Address: " + Settings.GetSettings().DefaultAccountEmailAddress);
 
            Console.ReadLine();
        }
    }
}
```

The output of the above code will be the following:

```csharp
 LogFileMaxSize: 10485760
Bypass SMTP Server: True
Default Account Email Address: admin@decisions.com
Changing default account email address...
Default Account Email Address: Updated@decisions.com
```
