public static void Main(string[] args) { string selection = string.Empty; if (args.Length == 0) { Console.WriteLine( "Select createkey, protect or unprotect"); return; } selection = args[0].ToLower(); switch (selection) { // Create the key to use during // encryption/decryption. case "createkey": string keyContainer = "pcKey.txt"; // Instantiate the custom provider. TripleDESProtectedConfigurationProvider provider = new TripleDESProtectedConfigurationProvider(); // Create the encryption/decryption key. provider.CreateKey(keyContainer); Console.WriteLine( "New TripleDES key created in {0}", keyContainer); break; case "protect": ProtectConfiguration(); break; case "unprotect": UnProtectConfiguration(); break; default: Console.WriteLine("Unknown selection"); break; } Console.Read(); }