Ejemplo n.º 1
0
        public static PowershellRun Run()
        {
            var ps1 = new PowershellRun {
                Script = "run.ps1"
            };

            ps1.Start();
            return(ps1);
        }
Ejemplo n.º 2
0
        public WinService()
        {
            Logger.WriteMessage(LogLevel.Trace, $"{Service}.ctor");

            InitializeComponent();
            worker = new PowershellRun()
            {
                Script = "run.ps1"
            };                                                   // Worker();

            workerThread      = new Thread(new ThreadStart(worker.Start));
            workerThread.Name = $"{Service} Thread";
        }