807ae6a8f8
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.