37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace OutlookCaseHelper
|
|
{
|
|
internal static class Program
|
|
{
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
try
|
|
{
|
|
if (args.Length > 0 && args[0] == "/postinstall")
|
|
{
|
|
string exePath = System.Diagnostics.Process.GetCurrentProcess().MainModule!.FileName;
|
|
|
|
var psi = new System.Diagnostics.ProcessStartInfo
|
|
{
|
|
FileName = exePath,
|
|
UseShellExecute = true,
|
|
CreateNoWindow = false
|
|
};
|
|
|
|
System.Threading.Thread.Sleep(12000); // aguarda 12 segundos
|
|
System.Diagnostics.Process.Start(psi);
|
|
return;
|
|
}
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.Run(new Form1());
|
|
}
|
|
catch { }
|
|
}
|
|
}
|
|
}
|