/// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            SipStringManager.CreateResourceManager("EnhancedAllowList");

            AppEventLog appEventLog = new AppEventLog(Config.ServiceName, "Application");

            Config.AppEventLog = appEventLog;

#if VSDEBUG
            //
            // Registration/Unregistration code for stand alone exe.
            // Service process reg/unreg will be done at install/uninstall time.
            //

            if (args.Length > 0)
            {
                string firstArg = args[0].ToLower();
                if (firstArg == "/register")
                {
                    PolicyManager.Register();
                }
                else if (firstArg == "/unregister")
                {
                    PolicyManager.Unregister();
                }
                else
                {
                    Console.WriteLine("Unknown argument - {0}", firstArg);
                }

                return;
            }

            ConsoleApp app = new ConsoleApp();

            app.Start();

            MessageBox.Show("Hit OK to exit ... ", "EAL Server");

            app.Stop();
#else
            ServiceBase[] ServicesToRun;

            ServicesToRun = new ServiceBase[] {
                new ServiceMain()
            };

            ServiceBase.Run(ServicesToRun);
#endif
        }
 /// <summary>
 /// Carry out custom installer actions.
 /// </summary>
 /// <remarks>
 /// We need to create WMI configuration only. EventLog will be done by InstallUtil.exe
 /// </remarks>
 public override void Install(IDictionary state)
 {
     base.Install(state);
     PolicyManager.Register();
     state.Add(RegisteredWithWMI, true);
 }