Beispiel #1
0
    static void Main(string[] args)
    {
        Console.Title = "Pro-test";
        DrawProTest();
        Console.WriteLine();

        if (IsElevated())
        {
            Console.WriteLine(" - Elevated privileges");
        }
        else
        {
            SelfElevate();
        }

#if DEBUG
        Console.WriteLine(" - Debug mode");
#endif

        Console.WriteLine($" - Run time: {DateTime.Now.ToString(Strings.DATETIME_FORMAT)}");
        Console.WriteLine($" - GUID: {GetAppid()}");
        Console.WriteLine();

        Strings.InitDirs();

        bool loadConfig = LoadConfig();
        Console.WriteLine(string.Format("{0, -23} {1, -10}", "Loading configuration", loadConfig ? "OK  " : "Failed"));
        if (!loadConfig)
        {
            CreateConfig();
        }

        if (force_registry_keys)
        {
            bool disableHeader = DisableServerHeaderRegKey();
            Console.WriteLine(string.Format("{0, -23} {1, -10}", "Force registry keys", disableHeader ? "OK  " : "Failed"));
        }


        bool loadAcl = Session.LoadAcl();
        Console.WriteLine(string.Format("{0, -23} {1, -10}", "Loading ACL", loadAcl ? "OK  " : "Failed"));

        ExtractZippedKnowlageFile();

        Database.LoadEquip();
        Database.LoadUsers();

        StartServices();
        Watchdog.LoadConfig();

        Console.ResetColor();
    }