-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: fix logic for terminating processes
This commit fixes and improves the process termination functionality in related functions. `KillProcessWhenItStarts` shared function: - Fix registry key values configured by removing unnecessary single quotes. - Rename to `TerminateExecutableOnLaunch` for clarity. - Rename parameter `processName` to `executableNameWithExtension` for clarity. - Add code comments. - Document the function. - Rename `%windir` to `%WINDIR%` for consistency in environment variable naming across scripts. - Integrate `KillProcess` for robustness. - Suppress errors in revert code to prevent false negatives. `KillProcess` shared function to be able to support the termination: - Rename to `TerminateRunningProcess` for clarity. - Rename parameters for clarity and consistency: - `processName` to `executableNameWithExtension`. - `processStartPath` to `revertExecutablePath`. - `processStartArgs` to `revertExecutableArgs`. - Make revert logic optional. - Add code comments.
- Loading branch information
1 parent
5a7d7d8
commit 807ae6a
Showing
1 changed file
with
72 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters