SVN r924
SVN-Revision: r924
This commit is contained in:
@@ -513,8 +513,24 @@ namespace Lskj.Control.Model
|
||||
// 特殊处理程序
|
||||
else if (dllName.Contains(".exe") && !model.WipeExes.Contains(dllName.ToString()) && (dllName.ToLower() != "lstest.exe"))
|
||||
{
|
||||
//删除选中行的json信息
|
||||
if(!string.IsNullOrWhiteSpace(maintabFocusedRowJson))paramList.Remove(maintabFocusedRowJson);
|
||||
// 创建进程启动信息对象
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.FileName = File.Exists(dllName) ? dllName : PubUtil.AbsolutelyLibPath + dllName; // 指定要启动的 EXE 路径
|
||||
// 将参数数组拼接为命令行字符串(注意空格处理)
|
||||
// 若参数包含空格,需要用双引号包裹,避免被解析为多个参数
|
||||
startInfo.Arguments = string.Join(" ", paramList.Select(arg =>
|
||||
arg.Contains(" ") ? $"\"{arg}\"" : arg
|
||||
));
|
||||
// 可选:设置进程启动选项
|
||||
startInfo.UseShellExecute = false; // 不使用系统外壳程序(建议为 false,便于重定向输入输出)
|
||||
startInfo.CreateNoWindow = false; // 是否在新窗口中启动(false 为显示窗口)
|
||||
// 启动进程
|
||||
Process process = Process.Start(startInfo);
|
||||
|
||||
// 执行exe程序
|
||||
WinHelper.WinExec(File.Exists(dllName) ? dllName : PubUtil.AbsolutelyLibPath + dllName, 1);
|
||||
//WinHelper.WinExec(File.Exists(dllName) ? dllName : PubUtil.AbsolutelyLibPath + dllName, 1);
|
||||
|
||||
}
|
||||
else if (dllName.StartsWith("www.") ||
|
||||
|
||||
Reference in New Issue
Block a user