Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: enable any PowerShell run as TrustedInstaller
Previously, all logic was duplicated (such as disabling a service or setting registry value) with one TrustedInstaller (batchfile) version and one PowerShell version. This commit changes privacy.sexy scripts that runs as TrustedInstaller to be PowerShell scripts instead of batchscripts. This increases code-reuse with other existing functions and scripting more complex logic. It also introduces a new function to be able to run any PowerShell as TrustedInstaller and refactor existing functions to be reused with this function. - Instead of running batch scripts, add ability to run PowerShell as TrustedInstaller. - Introduce new shared function to allow any PowerShell optionally as TrustedInstaller. - Refactor running as PowerShell to reduce code duplication. Other supporting changes: - Improve `DisableServiceInRegistry` to incorprate waiting for dependent services to stop, add better log messages and refactor its code. - Use Base64 encoded version of `privacy.sexy` as it causes malware errors to resolve #421 - Add comments in generated code for disabling services and setting registry value to better document the code.
- Loading branch information