public string buildLiteConnectionString(string targetFile, string version, string isNew, string compress, string login, string password, bool needEncryption) { if (needEncryption) { //tofix : this is if we allows non-admin users to install MiSMDR ? possibly needed in the future. hopefully not hard SecureString secure = PasswordSecurity.ToSecureString(password); String encrypted = PasswordSecurity.EncryptString(secure); return("Data Source=" + targetFile + ";Version=" + version + ";New=" + isNew + ";Compress=" + compress + ";Login="******";Password="******","); } else { return("Data Source=" + targetFile + ";Version=" + version + ";New=" + isNew + ";Compress=" + compress + ";"); //return "Data Source=DemoT.db;Version=3;New=False;Compress=True;" } }
public string buildExpressConnectionString(string targetMachine, string database, string login, string password, bool needEncryption) { if (needEncryption) { //tofix : this is if we allows non-admin users to install MiSMDR ? possibly needed in the future. hopefully not hard SecureString secure = PasswordSecurity.ToSecureString(password); String encrypted = PasswordSecurity.EncryptString(secure); return("Data Source=" + targetMachine + ";Initial Catalog=master;User Id=MiUser;Password="******";"); } else { return("Data Source=" + targetMachine + ";Initial Catalog=" + database + ";Integrated Security=SSPI;"); //return "Data Source=" + targetMachine + ";Initial Catalog=" + database + ";User Id=MiSMDR;Password=" + password; } }