Microsoft Visual Studio 2010 做的生成一个批处理文件,然后运行的实例。 主要代码: File.WriteAllText(sBat, sBatContent); Process process = new Process();//创建进程对象 ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "cmd.exe";//设定需要执行的命令 startInfo.Argumen
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Diagnostics; namespace WindowsApplication1 { public partial class Form1
代码如下:using System.Text.RegularExpressions;using System.Diagnostics;public class test{ public test {} public static string GetCustomerMac(string IP) //para IP is the clients IP { string dirResults=””;