c# 可获取系统环境

2021-07-15 09:15

阅读:649

标签:shel   nts   oid   getenv   var   dial   tool   inf   family   

 

c# 可获取系统环境, 启动进程执等 *.shell

 

[MenuItem("Tools/DesignHelper/Clean and Pull")]
    private static void CleanAndPull()
    {

        var proc = new System.Diagnostics.ProcessStartInfo();
        proc.UseShellExecute = true;
        proc.WorkingDirectory = Environment.GetEnvironmentVariable("KFC_TW");
        proc.Arguments = "";
        proc.FileName = "manager_pull.sh";
        proc.ErrorDialog = true;
        proc.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
        var p = System.Diagnostics.Process.Start(proc);
        p.WaitForExit();
        LogUtil.Debug("manager pull completed");

    }


评论


亲,登录后才可以留言!