Fix crash when UAC blocks the program.
=_=英语不好连个说明和注释都写不出了
This commit is contained in:
parent
3442081d20
commit
353a8ff768
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -51,9 +52,21 @@ namespace Wox.Plugin.System
|
||||||
MessageBox.Show("couldn't start" + c.Title);
|
MessageBox.Show("couldn't start" + c.Title);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Process.Start(c.ExecutePath);
|
Process.Start(c.ExecutePath);
|
||||||
}
|
}
|
||||||
|
catch (Win32Exception)
|
||||||
|
{
|
||||||
|
//Do nothing.
|
||||||
|
//It may be caused if UAC blocks the program.
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue