Example #1
0
        public int ExecuteAction(CodeGeneratorAction action, System.Management.ManagementClass c, string query)
        {
            if (action.Name.Equals(ACTION_RUN))
            {
                String script = this.GetScript(c, query);
                String path   = Path.GetTempFileName().Replace(".tmp", "." + this.FileExtension);
                File.WriteAllText(path, script);

                //ConsoleForm.StartProcess(null, "cscript", path);
                Process          process = new Process();
                ProcessStartInfo start   = new ProcessStartInfo("cmd.exe", String.Format("/K perl \"{0}\"", path));

                process.StartInfo = start;
                process.Start();

                return(0);
            }

            return(1);
        }
 public int ExecuteAction(CodeGeneratorAction action, ManagementClass c, string query)
 {
     return(0);
 }