Merge pull request #27 from zsxsoft/master

Fix crash when UAC blocks the program.
This commit is contained in:
Yeechan Lu
2014-02-08 14:43:02 +08:00

View File

@@ -1,5 +1,6 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
@@ -51,9 +52,21 @@ namespace Wox.Plugin.System
MessageBox.Show("couldn't start" + c.Title);
}
else
{
try
{
Process.Start(c.ExecutePath);
}
catch (Win32Exception)
{
//Do nothing.
//It may be caused if UAC blocks the program.
}
catch (Exception e)
{
throw e;
}
}
}
}).ToList();
}