Why don't you store your credentials in the app.config an encrypt them?
You can run your console application with a parameter /encrypt that will call this logic only once, and then without the parameter will run your process.
You can use the following logic to encrypt it:
// fileName = exeFileName
// sectionName = applicationSettings/AppName.Properties.Settings
Configuration config = ConfigurationManager.OpenExeConfiguration(fileName);
ConfigurationSection section = config.GetSection(sectionName);
ClientSettingsSection clientSection = (ClientSettingsSection)section;
SettingElement password = new SettingElement("Password", SettingsSerializeAs.String);
XmlElement element = new XmlDocument().CreateElement("value");
element.InnerText = passwordValue; // This is the actual password to encrypt
password.Value.ValueXml = element;
clientSection.Settings.Add(password);
section.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Modified);
section = config.GetSection(sectionName);
if (!section.SectionInformation.IsProtected)
{
//Protecting the specified section with the specified provider
section.SectionInformation.ProtectSection("DPAPIProtection");
}
section.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Modified);
Hope this helps.