示例#1
0
        static void Main(string[] args)
        {
            CommandLineArgs = args;

            try
            {
                if (!ArgExist("path="))
                {
                    Console.WriteLine("<path=...> parameter must be entered.");

                    Console.WriteLine("press enter to finish.");
                    Console.ReadKey(true);
                    return;
                }

                bool noSql = ArgExist("nosql");
                bool noIis = ArgExist("noiis");
                bool noZip = ArgExist("nozip");
                bool genLic = ArgExist("genlic");

                NippsConfig = LoadNippsJson();

                CheckVersionInfo();

                CheckInstallType();

                if (genLic || (!noIis && !noSql && !ServiceOnlyInstall))
                    GenerateLicense();

                if (!noZip)
                {
                    UnzipPackage();

                    UpdateConfig();

                    CopyLicenseLibrary();

                    if (!noIis)
                    {
                        MoveFolder();
                        SetupIIS();
                    }

                    if (!noSql && !ServiceOnlyInstall)
                        ExecuteSqlScript();

                }
                
                Console.WriteLine("finished.");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            if (Directory.Exists(TempFolder))
                Directory.Delete(TempFolder, true);

            Console.WriteLine("press enter to finish.");
            Console.ReadKey(true);
            
        }
示例#2
0
        static void Main(string[] args)
        {
            CommandLineArgs = args;

            try
            {
                if (!ArgExist("path="))
                {
                    Console.WriteLine("<path=...> parameter must be entered.");

                    Console.WriteLine("press enter to finish.");
                    Console.ReadKey(true);
                    return;
                }

                bool noSql  = ArgExist("nosql");
                bool noIis  = ArgExist("noiis");
                bool noZip  = ArgExist("nozip");
                bool genLic = ArgExist("genlic");

                NippsConfig = LoadNippsJson();

                CheckVersionInfo();

                CheckInstallType();

                if (genLic || (!noIis && !noSql && !ServiceOnlyInstall))
                {
                    GenerateLicense();
                }

                if (!noZip)
                {
                    UnzipPackage();

                    UpdateConfig();

                    CopyLicenseLibrary();

                    if (!noIis)
                    {
                        MoveFolder();
                        SetupIIS();
                    }

                    if (!noSql && !ServiceOnlyInstall)
                    {
                        ExecuteSqlScript();
                    }
                }

                Console.WriteLine("finished.");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            if (Directory.Exists(TempFolder))
            {
                Directory.Delete(TempFolder, true);
            }

            Console.WriteLine("press enter to finish.");
            Console.ReadKey(true);
        }