static void Main(string[] args) { string configurationFile = Application.StartupPath + "\\" + DEFAULT_CONFIGURATION_FILE; if (args.Length >= 1) { configurationFile = args[0]; } HotKey79 hotkey79 = null; try { hotkey79 = new HotKey79(); hotkey79.Initialize(new ConfigurationReader(configurationFile)); } catch (ProgramException e) { ShowError("Inicialization error", e.Message); return; } catch (Exception e) { ShowError("Unhandled inicialization exception", "Message: " + e.Message + "\nSource: " + e.Source + "\nStack trace: " + e.StackTrace); return; } Application.Run(hotkey79); }