Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: improve and unify service start/stop logic
This commit introduces a more structured approach to starting, stopping, and managing Windows services. By abstracting service control operations into dedicated functions (`StopService`, `StartService`, etc.), it improves code readability and facilitates future maintenance. The modifications include: - Creation of files (`%APPDIR%`\privacy.sexy-<serviceName>`) for managing service restart states. This approach simplifies the process of determining whether a service was running before the script executed and should therefore be restarted afterward. - Using `DeleteFiles` and `ClearDirectoryContents` functions to safely remove files without affecting service operations. This is enabled by using shared funtions for service operations.
- Loading branch information