Imports System.Text.RegularExpressions Public Class CommandLineMapper Public ReadOnly ConfigurationName As String Sub New() Dim CommandLineArguments() As String = Environment.GetCommandLineArgs() ConfigurationName = System.Net.Dns.GetHostName() + "_DynamicConfigs.txt" For index As Integer = 1 To (CommandLineArguments.Count - 1) Step 2 If CommandLineArguments(index).Contains("-Config") Then If (CommandLineArguments.Count >= (index + 1)) Then ConfigurationName = CommandLineArguments(index + 1) Else Throw New Exception($"Invalid commandline parameter. Example -Config VoormontageConfigs.txt") End If End If Next End Sub End Class