Fixed Process.Start error

This commit is contained in:
ZestyTS 2022-08-26 19:17:03 -07:00
parent a23a379cb2
commit bc5a1fc5d8

View file

@ -511,7 +511,18 @@ namespace UWUVCI_AIO_WPF
{
try
{
Process.Start("UWUVCI VWII.exe");
var p = new Process();
var fileName = Application.ResourceAssembly.Location;
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
if (!Path.GetFileName(file).Contains(Path.GetFileNameWithoutExtension(fileName)))
{
fileName = file;
break;
}
p.StartInfo.FileName = fileName;
p.Start();
Environment.Exit(0);
}
catch