/// <summary> /// 使用BatchRunner类运行批处理文件. /// </summary> /// <param name="fileName">批处理文件的全名.</param> /// <returns></returns> private string RunBatch(string fileName) { // 设定批处理执行信息. BatchRunner batchRunner = new BatchRunner(); batchRunner.DomainName = tbDomainName.Text.Trim(); batchRunner.UserName = tbUserName.Text.Trim(); batchRunner.Password = tbPassword.Text.Trim(); // 运行批处理文件. string output = batchRunner.ExecuteBatch(fileName); return output; }
/// <summary> /// 使用BatchRunner类运行批处理文件. /// </summary> /// <param name="fileName">批处理文件的全名.</param> /// <returns></returns> private string RunBatch(string fileName) { // 设定批处理执行信息. BatchRunner batchRunner = new BatchRunner(); batchRunner.DomainName = tbDomainName.Text.Trim(); batchRunner.UserName = tbUserName.Text.Trim(); batchRunner.Password = tbPassword.Text.Trim(); // 运行批处理文件. string output = batchRunner.ExecuteBatch(fileName); return(output); }