using System; using System.Security.Principal; using System.Threading; using System.Windows.Forms; namespace LocalSQLDB { class LocalDBPreparation { static void Main(string[] args) { var targetDir = string.Empty; Version productVersion = new Version(); for (var i = 0; i < args.Length; i++) { switch (i) { case 0: targetDir = args[i]; break; case 1: productVersion = new Version(args[i]); break; } } try { var localDBPrepare = new LocalDBPrepare(targetDir, productVersion); localDBPrepare.PrepareDB(); } catch (Exception ex) { MessageBox.Show(ex.Message + " - Installation will be cancelled"); throw new Exception(); } } } }