我想知道是否有办法运行命令提示符程序,例如“C:/temp/mactimes.pl”,命令“perl mactimes.pl”可以在 C# 程序中运行。
我查看了“process.start”类,但它只检测到 .exe 格式的程序。因此我需要“perl”命令来启动 perl 脚本。
请多多指教!谢谢!!!
请您参考如下方法:
如果 perl 在系统路径中:
Process.Start("perl.exe", "C:\\temp\\mactimes.pl");
否则您将需要输入它的完整路径。
