Skip to content

Commit

Permalink
win: enable any PowerShell run as TrustedInstaller
Browse files Browse the repository at this point in the history
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
undergroundwires committed Aug 27, 2024
1 parent dc5c873 commit b5c5da6
Showing 1 changed file with 313 additions and 380 deletions.
Loading

0 comments on commit b5c5da6

Please sign in to comment.