Credits to me and

Imports Microsoft.Win32
Imports System.IO

Module ControlBinder
    Sub Main()
        ' Project: Call of Duty 4 - Control binder
        ' Author: FreckleS
        ' Purpose: PoC - Fun
        ' Website:
        ' Credits: Feel free to use just credit the site above
        Console.Title = "Call of Duty 4 - Control Binder"

        Dim command As String

        Console.WriteLine("Command To Add: ")
        command = Console.ReadLine()

        If command = "" Then
            Console.WriteLine("Please enter a command")
            If AddCommand(command) = True Then ' Did it get added?
                ' Yes...
                Console.WriteLine("{0} was successfully added to the config", command)
                ' No...
                Console.WriteLine("{0} couldn't be added to the config", command)
            End If

            ' Simply to add another or exit
            Dim input As Char
            Console.WriteLine() ' Neater.
            Console.WriteLine("Would you like to add another? Y/N")
            input = Console.ReadLine
            If input = "Y" Then
                Main() ' Re-run
                Console.WriteLine("Thank you for using Control Binder")
                Exit Sub ' Leave
            End If
        End If

        Console.ReadLine() ' Wait for exit.
    End Sub

    Function AddCommand(ByVal command As String) As Boolean
        Dim RegKey As RegistryKey ' Our location to send cfg
        RegKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Activision\Call of Duty 4\", True) ' Registry subkey. 

        Dim path As String
        path = RegKey.GetValue("InstallPath") ' Game location - Registry key

        Dim ActiveCfgReader As New StreamReader(path & "\players\profiles\active.txt")
        Dim activeProfile = ActiveCfgReader.ReadToEnd ' The profile being used atm

        Dim CfgReader As New StreamReader(path & "\players\profiles\" & activeProfile & "\config_mp.cfg") ' Current config
        Dim content As String = CfgReader.ReadToEnd() ' Read current config
        CfgReader.Close() ' Done...

        Dim CfgWriter As New StreamWriter(path & "\players\profiles\" & activeProfile & "\config_mp.cfg") ' New (current) config
        CfgWriter.WriteLine(content) ' Write content from load
        CfgWriter.WriteLine(command) ' Add unbindall (any command)
        CfgWriter.Close() ' Done...
        Return True ' Success
    End Function
End Module