金蝶云·星空|插件中调用exe,exe没有运行
0
在插件中调用了启动exe的方法,协同环境测试的时候是可以的,但是部署到正式环境的时候exe没有启动。
- try
- {
- System.Diagnostics.Process p = new System.Diagnostics.Process();
- p.StartInfo.UseShellExecute = false;
- p.StartInfo = new System.Diagnostics.ProcessStartInfo(@"D:\KD\report\Report.exe", billno + " " + tempId + " " + begin + " " + end);
- p.Start();
- }
- catch (Exception e1)
- {
- this.View.ShowMessage(e1.Message);
- }
服务器上直接用批处理文件启动exe也是可以的
- [url=home.php?mod=space&uid=494331]@Echo[/url] off
- path = %path%;.\..\report\;
- start Report.exe WORK19012832 标签01 1 10000
- pause
exe单独测试也是可以,核心代码如下
- public Form1(string[] args)
- {
- if (args.Length>=4)
- {
- billno = args[0];
- tempid = args[1];
- begin = args[2];
- end = args[3];
- }
- InitializeComponent();
- DataSet ds = getData("exec Jr_Proc_CpBq '" + billno + "'," + begin + "," + end, "PG");
- StreamReader sr = new StreamReader(Application.StartupPath + "\\Config\\TempInfo.txt", false);
- String path = sr.ReadLine().ToString();
- path = path + "\" + tempid + ".frx";
- FastReport.Report rpt = new FastReport.Report();
- rpt.Load(path);
- //rpt.PrintSettings.ShowDialog = false;
- rpt.RegisterData(ds);
- rpt.Show();
- rpt.Dispose();
- System.Environment.Exit(0);
- }
不知道是什么问题导致的,请大神帮忙指正