Initial commit: IT Nexus Web-App
This commit is contained in:
30
domain-join-tool/Program.cs
Normal file
30
domain-join-tool/Program.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DomainJoinTool
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
Application.ThreadException += (s, e) =>
|
||||
System.IO.File.AppendAllText(@"C:\ProgramData\DomainJoinTool\crash.log",
|
||||
DateTime.Now + ": " + e.Exception + Environment.NewLine);
|
||||
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
|
||||
System.IO.File.AppendAllText(@"C:\ProgramData\DomainJoinTool\crash.log",
|
||||
DateTime.Now + ": " + e.ExceptionObject + Environment.NewLine);
|
||||
try
|
||||
{
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Startfehler: " + ex.Message + "\n\n" + ex.StackTrace, "Fehler");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user