improve tasklist find

This commit is contained in:
pointfeev 2023-04-06 20:11:43 -04:00
parent aa94e2187e
commit 96a6af3c18
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<Version>4.8.0.0</Version>
<Version>4.8.1.0</Version>
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
<Company>CreamInstaller</Company>
<Product>Automatic DLC Unlocker Installer &amp; Configuration Generator</Product>

View file

@ -198,7 +198,7 @@ internal sealed partial class UpdateForm : CustomForm
StringBuilder commands = new();
commands.AppendLine(CultureInfo.InvariantCulture, $"\nTASKKILL /F /T /PID {Program.CurrentProcessId}");
commands.AppendLine(CultureInfo.InvariantCulture, $":LOOP");
commands.AppendLine(CultureInfo.InvariantCulture, $"TASKLIST | FIND \"{Program.CurrentProcessId}\"");
commands.AppendLine(CultureInfo.InvariantCulture, $"TASKLIST | FIND \" {Program.CurrentProcessId}\" ");
commands.AppendLine(CultureInfo.InvariantCulture, $"IF NOT ERRORLEVEL 1 (");
commands.AppendLine(CultureInfo.InvariantCulture, $" TIMEOUT /T 1");
commands.AppendLine(CultureInfo.InvariantCulture, $" GOTO LOOP");