Beispiel #1
0
        /*public void update_web_config_file (string parm_web_root,string parm_web_config_file_path,XmlNode parm_wiz_sentinel_settings,XmlNode parm_app_settings_updates)
        {
            //$fileWebConfigUpdates = [System.String]::Join("", ($parm_web_root.Trim(), $parm_web_config_file_path.Trim()))
            String fileWebConfigUpdates = string.Format("{0}{1}", parm_web_root.Trim(), parm_web_config_file_path.Trim());
            XmlDocument webConfigUpdates = new XmlDocument();
            webConfigUpdates.Load(fileWebConfigUpdates);

            XmlElement webConfigUpdatesRoot = webConfigUpdates.DocumentElement;

            XmlNode applicationSettings = webConfigUpdatesRoot.SelectSingleNode("applicationSettings");
            XmlNode wizSentinelSettings = applicationSettings.FirstChild;

            //foreach( $newSetting in $newWizSentinelSettings.setting )
            foreach( var newSetting in parm_wiz_sentinel_settings )	// need to check if it works
            {
                foreach( $setting in $wizSentinelSettings.setting )
                {
                    if($newSetting.name -eq $setting.name)
                    {
                        $setting.value = $newSetting.value
                        break;
                    }
                }
            }

            foreach( $newSetting in $parm_app_settings_updates.add )
            {
                foreach( $setting in $webConfigUpdatesRoot.appSettings.add )
                {
                    if($newSetting.key -eq $setting.key)
                    {
                        $setting.value = $newSetting.value
                        break;
                    }
                }
            }
            $webConfigUpdates.Save($fileWebConfigUpdates);
        }*/
        public void register_com_plus_app(string parm_host, string parm_com_app, string parm_dll_path)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("host", parm_host);
            parameters.Add("app", parm_com_app);
            parameters.Add("file", parm_dll_path);
            Core core = new Core();
            core.ExecuteDeployTool("com_app_install", parameters);
        }
Beispiel #2
0
 //    Working
 public void unregister_complus_components(string parm_host, string parm_com_app)
 {
     Hashtable parameters = new Hashtable();
     parameters.Add("host", parm_host);
     parameters.Add("app", parm_com_app);
     Core core = new Core();
     core.ExecuteDeployTool("com_app_uninstall", parameters);
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            //IISFunctions IisFunctions = new IISFunctions();
            //IisFunctions.CreateSite("IIS://Localhost/W3SVC", "555", "dstest", "D:\\ds_test");
            //IisFunctions.SetSingleProperty("IIS://Localhost/W3SVC/555", "ServerBindings", ":8080:");
            //IisFunctions.CreateVDir("IIS://Localhost/W3SVC/1/Root", "dstest", "D:\\ds_test");

            Core core = new Core();
            BBEFunctions BBEFunctions = new BBEFunctions();

            if (args.Length > 1)
            {
                Console.Out.WriteLine("Found argument. Running with " + args[0] + " configuration with steps in " + args[1] + ".");
                Console.Out.WriteLine("Preparing config for deployment. Please wait...");
                //BBEFunctions.BBEConfigXMLUpdate(args[0], "bbe");
                Console.Out.WriteLine("Config preparation complete.");
                if (args[1] == "db")
                {
                    core.RunSteps("bbe", args[0], args[1], 1, 1);
                    //return;
                    /*
                    Console.Out.WriteLine("Running database deployment...");
                    if (args.Length > 2)
                    {
                        if (args[2].ToLower() == "new")
                        {
                            Console.Out.WriteLine("Running database deployment for new installation...");
                            core.RunSteps("bbe", args[0], args[1], 1, 3);
                            Console.Out.WriteLine("Database deployment for new installation complete.");
                            return;
                        }
                    }
                    core.RunSteps("bbe", args[0], args[1], 4, 5);
                    Console.Out.WriteLine("Database deployment complete.");
                    */
                }
                else if (args[1] == "web")
                {
                    Console.Out.WriteLine("Running web deployment...");
                    if (args.Length > 2)
                    {
                        if (args[2].ToLower() == "new")
                        {
                            Console.Out.WriteLine("Running web deployment for new installation...");
                            core.RunSteps("bbe", args[0], args[1], 1, 6);
                            core.RunSteps("bbe", args[0], args[1], 8, 20);
                            Console.Out.WriteLine("Web deployment for new installation complete.");
                            return;
                        }
                    }
                    core.RunSteps("bbe", args[0], args[1], 3, 11);
                    core.RunSteps("bbe", args[0], args[1], 14, 20);
                    Console.Out.WriteLine("Web deployment complete.");
                }
            }
            else
            {
                Console.Out.WriteLine("No argument is supplied.");
                Console.Out.WriteLine("Please specify a configuraton file & a steps file. e.g. \"main.ps1 dev web\" or \"main.ps1 dev db\"");
                // Write-Host 'No argument is supplied. Running with default "dev" configuration.'
                // Run-Steps -product "bbe" -config "dev" -steps "bbeng" -start_step 1 -end_step 9
            }

            Console.Out.WriteLine("Press enter to exit...");
            Console.In.ReadLine();
        }