关于运行本地EXE的问题
请问一下,目前我的条件是
本地在c:\temp\entry_print.exe 这个EXE是我要求执行的
而且这个是有GUI的,我是用来做打印的
现在是要求我的web 来点击一个按钮执行这个exe,当然要跳出GUI窗口呢
System.Diagnostics.Process Process2 = new System.Diagnostics.Process();
Process2.StartInfo.UseShellExecute = true;
Process2.StartInfo.CreateNoWindow = true;
Process2.StartInfo.FileName = "c:\\temp\\entry_print.exe";
Process2.Start(); //call the file
可是这样以后呢,如果在调试状态,也就是用localhost 来执行那么一切正确。
可是如果一发布, 比如192.168.100.111 来做的话,那么可以在进程管理器里面看到 entry_print.exe 这个进程,可是前台没有任何的显示
于是我做了个 test.bat 就是来运行这个entry_print.exe
c:
cd \temp
entry_print.exe
上面就是这个test.bat内容
System.Diagnostics.Process Process2 = new System.Diagnostics.Process();
Process2.StartInfo.UseShellExecute = true;
Process2.StartInfo.CreateNoWindow = true;
Process2.StartInfo.FileName = "c:\\temp\\entry_print.exe";
Process2.Start();
同样是上面的情况,在进程里面有,可是本地没有任何的反应,没有GUI出现。
请问各位大侠,如何可以运行本地的程序???