@@ -175,18 +175,10 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
|
||||
private void StartIconApp(IconInfo icon, IconStartType type, bool useRelativePath = false)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Process p = new Process();
|
||||
//using ()
|
||||
//{
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardInput = true;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardError = true;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
|
||||
using (Process p = new Process())
|
||||
{
|
||||
string startArg = icon.StartArg;
|
||||
|
||||
if (startArg != null && Constants.SYSTEM_ICONS.ContainsKey(startArg))
|
||||
@@ -230,7 +222,11 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
switch (type)
|
||||
{
|
||||
case IconStartType.ADMIN_STARTUP:
|
||||
//p.StartInfo.Arguments = "1";//启动参数
|
||||
p.StartInfo.Verb = "runas";
|
||||
//p.StartInfo.CreateNoWindow = false; //设置显示窗口
|
||||
p.StartInfo.UseShellExecute = true;//不使用操作系统外壳程序启动进程
|
||||
//p.StartInfo.ErrorDialog = false;
|
||||
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
||||
{
|
||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||
@@ -290,15 +286,13 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
}
|
||||
}
|
||||
p.Start();
|
||||
p.Close();
|
||||
p.Dispose();
|
||||
if (useRelativePath)
|
||||
{
|
||||
//如果使用相对路径启动成功 那么重新设置程序绝对路径
|
||||
icon.Path = path;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
icon.Count++;
|
||||
|
||||
//隐藏搜索框
|
||||
|
||||
Reference in New Issue
Block a user