This commit improves the existing Firefox privacy scripts and improves
the categorization and documentation to be simpler and more clear.
Changes:
- Rename and reorganize scripts for disabling browser telemetry and
default browser agent reporting to simplify the structure.
- Improve documentation across scripts to provide clearer guidance on
how the changes improve user privacy.
- Fix revert scripts by removing unnecessary registry key configuration.
This commit updates documentation to clarify the impacts of disabling
firewall services, specifically how they affect Windows Sandbox, Docker
and WSL.
This update responds to user feedback from issues #115, #152, #364. The
documentation now guides users more clearly on the consequences of their
actions, potentially preventing unintended service disruptions.
Changes include:
- Expand the caution notes to explicitly mention the impact on
virtualization and isolation features like Windows Sandbox, Docker and
WSL.
- Expand script titles to briefly mention affects on these features.
- Expand documentation to suggest system restart.
- Add an informative message to restart the computer in terminal outputs
after service changes to ensure the settings are applied.
This commit adjusts the recommendation level for scripts that disable
UWP app access to accommodate user issues #121, #339, #350. It also
extends their documentation to reflect the new changes and with
cautions.
Changes:
- Add caution text for all scripts about potential impacts.
- Move disabling app access to notifications from 'Standard' to
'Strict'. This addresses #121 and #339, where users report lack of
notification as unintended side-effects.
- Move disabling app access to phone calls from 'Standard' to 'Strict'.
This addresses #350 where its effect on the Phone Link app was
reported as an unintended side-effect.
- Consolidate removal of printing UIs under the same category.
- Improve documentation for printing app removal scripts.
- Add removal of previously unlisted 'Print Queue' app, #279.
- Combine removal of `Microsoft.Print3D` and `Windows.Print3D`
into a single script.
- Highlight the importance of removing 'Print 3D' app due to
security risks and recommend it on 'Standard'.
This commit improves the documentation of RSA key handling script and
changes its recommendation level to address potential issues with
Hyper-V (as reported in #363).
Changes:
- Add documentation to describe potential disruptions caused by stronger
RSA key requirements.
- Move RSA key script from 'Standard' to 'Strict' due to its impact on
Hyper-V VMs.
- Use bullet points for easier expansion in cautions of secret key
hardening scripts.
This commit improves disabling app access by correcting minor issues,
adding missing access control configurations and adding more
documentation to increase maintainability and user understanding of
privacy settings, resolving #138.
- Introduce shared functions to streamline modifications of app access,
improving maintainability and simplifying the codebase.
- Move disabling app access to first position in the category.
- Improve code comments for better clarity on generated outputs.
- Resolve error display in revert codes due to incorrect use of `reg
delete` commands.
- Fix disabling app access to trusted devices disables access to account
information, name and picture on older versions of Windows.
- Add missing privacy settings and configurations.
- Add more documentation to scripts
- Rename script names for consistency and clarity.
- Move disabling access to SMS/MMS to phone access disablement category.
- Set empty `REG_MULTI_SZ` values to null for GPO access settings to
maintain registry integrity.
This commit standardizes the management of registry keys and their
corresponding revert on delete action across all scripts using
`SetRegistryValue` function.
It improves script reliability, addresses previous errors, and corrects
the revert actions to match the default OS state when not explicitly set
by the OS.
Key changes:
- Use SetRegistryValue for uniformity.
- Remove error messages for non-existent registry keys, recognizing them
as expected states rather than errors.
- Add missing revert actions to scripts where they were absent.
- Correct the revert logic in existing scripts to match the default OS
configurations, particularly when the OS does not set a default value.
- Update documentation about default OS state for the related scripts.
This change improves maintainability by centralizing and standardizing
registry interactions, reducing the risk of errors and inconsistencies
in script behaviors.
This commit restructures the categorization of network security-related
scripts to improve clarity and align with user expectations. It involves
renaming and reorganizing categories to more accurately reflect their
functions beyond just IIS configurations.
This reorganization helps users find and utilize network security
scripts more efficiently and ensures that the categorization accurately
reflects the broader application of the scripts beyond server
configurations.
Changes:
- Merge network security enhancements under a single category.
- Rename categories for simplicity and increased technical accuracy.
- Flatten nested categories to streamline navigation and enhance
clarity.
- Update documentation to match the new category structures.
- Revise script recommendations to encourage broader use.
- Fix revert codes of some related scripts to reflect default OS
settings.
This commit addresses the issue where scripts fail to execute on Windows
environments with usernames containing spaces. The problem stemmed from
PowerShell and cmd shell's handling of spaces in quoted arguments.
The solution involves encoding PowerShell commands before execution,
which mitigates the quoting issues previously causing script failures.
This approach is now integrated into the execution flow, ensuring that
commands are correctly handled irrespective of user names or other
variables that may include spaces.
Changes:
- Implement encoding for PowerShell commands to handle spaces in usernames
and other similar scenarios.
- Update script documentation URLs to reflect changes in directory
structure.
Fixes#351
This commit refines the configuration of TLS and DTLS protocols on
Windows to enhance compatibility and stability across different
Windows versions.
Changes:
- Enable TLS 1.3 exclusively on Windows 11 and newer, addressing
stability concerns with previous Windows versions, and resolving
issue #175.
- Enable DTLS 1.2, replacing DTLS 1.3 due to lack of support in
Windows. DTLS is enabled only on Windows 10 version 16007 and later
for compatibility.
- Reorganize script categories for better clarity and manageability.
- Update revert codes for registry deletions to prevent false negative
error outputs.
- Adjust recommendation levels to encourage more scripts due to system
stability and documentation improvements introduced in this commit.
- Remove incorrect registry keys previously set for .NET apps.
- Add missing 64-bit registry keys for .NET apps.
- Rename scripts for improved simplicity and consistency.
- Improve documentation for affected scripts, correcting the
misleading information about DTLS 1.2 vulnerability.
- Convert hexadecimal values to decimal in scripts to improve
clarity.
- Introduce shared functions to reduce redundancy and improve
script maintainability.
- Add more comments in generated code and simplify existing comments.
This commit modifies the blocking behavior of `r.bing.com` due to its
extensive use across multiple Windows features, including Copilot and
Maps. Previously, included in the 'Cortana and Live Tiles' block list,
this host was causing issues for Copilot functionalites, as noted in
issue #329. By excluding `r.bing.com` from block list, this update aims
to prevent unintended disruptions without compromising the privacy gains
of other scripts.
Changes include:
- Exclude `r.bing.com` from the "Cortana and Live Tiles" block list.
- Improve documentation to clarify the role and exclusions.
- Improve documentation with consistent header for blocked hosts.
This commit groups scripts related to disabling protocols under same
category, streamlining the process for disabling protocols like NetBios,
SMBv1, and various TLS/SSL versions. It improves the documentation and
scripts of the related scripts.
Key changes:
- Introduce new category for disabling insecure protocols and move
related scripts under it.
- Remove .NET configuration from TLS 1.0 disabling to prevent unwanted
side effects on .NET applications, maintaining system integrity.
- Remove the script disabling DTLS 1.1 as this protocol does not exist.
- Recommend previously not recommended scripts:
- SSL 2.0 in 'Standard' because it's already removed from Windows.
- SSL 3.0 in 'Standard' because it's already disabled by default.
- TLS 1.0 in 'Strict' as it's deprecated on Windows.
- TLS 1.1 in 'Strict' as it's deprecated on Windows.
- Rename and reorder scripts for consistency and enhanced readability.
- Fix revert codes to accurately reflect successful operations, by
adding `2>nul` on `reg delete` commands.
- Expand documentation to include detailed precautions and references,
aiding users in understanding the implications of their actions
(addressing user feedback from #57, #131, #183, #185).
Other supporting changes:
- Convert hexadecimal values to decimal to enhance script readability.
- Refactor scripts to utilize shared functions, improving maintainability.
- Add detailed comments within the scripts to aid in comprehension.
- Minor updates to other crypto scripts for consistency.
- Reorganize protocol listing by age for a logical script flow.
- Standardize comments across various TLS configuration scripts for
clarity.
- Fix enabling DTLS 1.3 being categorized as disabling insecure
connection.
This commit addresses reports in issue #131 about third-party cloud
services like MEGA and Dropbox being affected by hash disabling. It
updates the documentation to guide users on the potential impact,
adjusts the recommendation levels along with other minor improvements.
- Recommend hash disabling scripts in 'Strict'.
- Expand and refine documentation, adding warnings to inform user
decisions (addressing issues #57, #131, #175, #183).
- Add a new shared function to standardize hash disabling, increasing
code maintainability.
- Change from hexadecimal to decimal in scripts for clarity.
- Improve code comments for better understanding.
- Add comments in generated to code to make it easier to follow.
- Fix revert codes showing errors by using `2>nul` in `reg delete`
commands.
- Rename scripts for consistent naming conventions.
Supporting changes in other SSL/TLS handshake scripts:
- Update documentation for consistency.
- Rename shared functions for consistency and clarity.
- Improve generated code comments for clarity.
Due to changes in how Windows handles the Snipping Tool, this commit
reclassifies the tool's disablement into its own distinct category.
This update introduces alternative methods to disable the tool,
enhances documentation, and improves script functionality.
Changes include:
- Move Snipping Tool removal to a standalone category for clearer
navigation.
- Expand documentation to better describe the tool's impact on privacy.
- Add methods to disable the tool without removing the app.
- Implement a shared function to disable specific Windows hotkeys.
- Rename Cortana shortcut disablement script for consistency.
- Introduce 'Disable insecure ciphers' category to organize and group
cipher disabling scripts.
- Expand documentation, adding cautionary notes to help users make
informed decisions, addressing issues #57, #131, #175, and #183.
- Implement `DisableCipherAlgorithm` function to standardize the
approach to disabling cipher algorithms, enhancing maintainability
and promoting code reuse.
- Replace hexadecimal numbers with decimals in scripts to improve
readability.
- Add comments to generated code for better understandability.
- Update revert codes to avoid incorrect error messages when
operations are successful, using `2>nul` in `reg delete` commands.
- Rename scripts for consistency, incorporating 'insecure' in titles.
- Adjust recommendations to disable all insecure ciphers in 'Strict'
mode due to security risks, and recommend disabling `NULL` in
'Standard' mode as it removes encryption.
- Remove disabling of `DES 56`, correcting a redundancy as this cipher
configuration does not exist.
This commit improves script clarity and user guidance on disabling
insecure renegotiations.
- Update script name for clarity.
- Improve documentation for better understanding.
- Recommend the script as 'Strict' to align with its security focus.
- Modify revert codes to suppress misleading error messages upon
successful reversion by including `2>nul` in `reg delete` commands.
- Convert hexadecimal to decimal in registry commands to improve
readability.
Reorganize and document scripts for disabling network features,
enhancing their discoverability and manageability. This commit
categorizes scripts related to disabling insecure network connections,
improves documentation, and makes these scripts more accessible.
- Group scripts under `Disable insecure connections` category.
- Move SMBv1 and NetBios disablement scripts to this new category.
- Improve documentation, highlighting the security improvements
and potential compatibility issues with older systems.
Addresses issues #57, #115, #183, #175, and #185 by simplifying the
process of troubleshooting and reversing changes if necessary.
This commit refines the reversion process for disabled services,
including handling cases where a service is missing, and enhances
documentation related to default service states. It corrects the
startup mode for the `gupdatem` service from 'Automatic' to 'Manual'.
Key changes:
- Add documentation on default service states and startup types.
- Introduce `ignoreMissingOnRevert` to skip errors when reverting
missing services, improving the user experience.
- Standardize script titles for consistency across service
disablement scripts.
- Correct the startup type for `gupdatem` to 'Manual', aligning
it with its actual default state.
Supporting changes:
- Update `DisableService` function to support `ignoreMissingOnRevert`,
allowing more flexibility in handling missing services on revert.
- Change `treatMissingStateAsOk` to `ignoreMissingOnRevert` for
clarity and consistency.
This commit enhances the documentation related to disabling the firewall
services in Windows, with a focus on the `winget` CLI's functionality,
resolving #142.
Changes:
- Expand documentation to include implications on `winget` CLI,
addressing the issue #142.
- Add documentation for disabling `mpsdrv` service.
- Align documentation for disabling `mpssvc` service to match updates
made for `mpsrv` to maintain consistency across documentation.
- Introduce documentation for parent categories affected by scripts
that disable these services.
- Add documentation for parent categories for disabling these firewall
services.
The documentation aims to provide users with a comprehensive
understanding of how these changes affect both system performance and
security posture.
This commit improves the IntelliCode privacy settings for Visual Studio
by adjusting registry entries to prevent data collection without
impacting IntelliCode's functionality.
- Fix registry value setting for `DisableRemoteAnalysis` to prevent
unexpected hangs in Visual Studio.
This resolves issues reported in #267 and #268.
- Change the script recommentation level to 'Standard', and remove
previous warnings about potential hangups, based on the successful
mitigation of these issues.
This reverts 7f7a84e3ba.
- Incorporate feedback from an official Microsoft statement
(MicrosoftDocs/intellicode#510), acknowledging the discontinuation of
certain IntelliCode backend services. This renders the remote analysis
feature obsolete.
- Revise the documentation to make it more accessible and easier to
understand.
- Migrate feature disablement to PowerShell for clarity and robustness.
- Improve log outputs and error handling for missing or default-disabled
features. This fixes false-positive errors by treating the absence of
a targeted feature as a success condition, and treats features
disabled by the OS as non-issues.
- Fix revert logic to align with OS defaults, correcting previous
behavior that indiscriminately enabled features without considering
their default state.
- Fix usage of incorrect feature name for `LDPPrintService`, correcting
attempts to disable a non-existing feature.
- Standardize script recommendations for outdated or missing features
on modern Windows versions by recommending them on 'Standard'
selection, providing clearer guidance for users.
- Rename feature-related scripts for consistency with Windows display
names, improving consistency and script discoverability.
- Expand documentation for all feature-disabling scripts, adding
details such as display names, descriptions, and default states,
thereby informing users about the specifics and rationale of each
script.
- Rename `DisableFeature` function to `DisableWindowsFeature` for
increased descriptiveness and alignment with PowerShell conventions.
- Harmonize the use of the `DisableWindowsFeature` function across
scripts targeting various features, including SMBv1 and PowerShell
2.0 downgrade attacks, enhancing consistency and maintainability.
- Add code comments in the generated disable/enable feature scripts,
improving understandability for users.
- Add the ability to revert to default OS behavior for feature
enablement/disablement to align with OS defaults.
- Consolidate secret key improvement scripts into a single category.
- Simplify script names to improve user understanding.
- Expand and refine documentation, adding cautionary notes for clarity
and helping users make informed decisions (addresses issues #57, #131,
#175, #183).
- Adjust recommendation levels for scripts to 'Standard' to reflect
their adoption in modern Windows and align with security standards:
- Set Diffie-Hellman key exchange minimum to 2048 bits, matching
modern Windows defaults
- Align RSA key size with Microsoft's upcoming deprecation of 1024-bit
keys.
- Improve the revert process by suppressing false error messages using
`2>nul` in `reg delete` commands.
- Introduce a unified approach to adjust key sizes in key exchange
algorithms with `RequireMinimumKeySize` function.
- Modify the Diffie-Hellman key exchange to a 2048-bit minimum instead
of 4096 bits to balance security with broader software compatibility.
This attempts to reduce side-effects on third-party software as
reported in #57, #131, #183).
- Replace hexadecimal values with decimal equivalents in registry edits
to facilitate better maintainability and readability.
This commit improves Windows scripts related to phone apps, extending
documentation, renaming scripts for clarity, removing unnecessary
scripts and adjusting recommendation levels.
Changes:
- Add script to disable the 'Call' system app, identified as missing in
issue #279.
- Update documentation for each phone-related app to include
descriptions and cautionary advice, focusing on privacy and
system performance benefits.
- Rename scripts for better alignment with actual app names and to
correct misconceptions:
- 'Communications - Phone' to 'Microsoft Phone'
- 'Your Phone Companion' to 'Your Phone'
- Remove the script for deleting `Microsoft.Windows.Phone` package,
correcting a community misreport.
- Adjust recommendations to remove Phone-related apps, considering their
limited necessity for OS functionality and common software use.
This commit fixes dead URLs and updates documentation references,
improving accuracy and reliability.
Key changes:
- Fix dead URLs by using archived snapshots when they are detected as
down by tests.
- Update URLs to their new redirected locations.
Other supporting changes:
- Introduce long URLs for `archive.ph` links to retain the original
URLs within the documentation. It simplifies the maintenance by
removing the need to document the original locations along with the
short URLs.
- Improve some of the documentation to use more current sources,
replacing the outdated ones.
This commit addresses a regression from refactoring in #215.
It restores YAML escape mechanism with quoting around 'manual' in the
`powerShellValue` attribute to ensure PowerShell interprets the value
correctly.
This change is documented with a comment to avoid future omissions.
This reverts commit c27172c32e.
This commit improves the safety mechanisms in the script for deleting
OneDrive user data on Windows.
Key changes:
- System Integrity Protection: The script now checks if user shell
folders point to the OneDrive directory. If they do, it halts the
deletion and provides guidance to the user. This ensures system
stability is not compromised.
- Data Loss Prevention: The script will no longer delete files or
non-empty folders. This precaution helps to avoid unintended data
loss.
Other supporting changes:
- This script now covers OneDrive folders for multi-account users.
- Separation of concerns: The 'Remove OneDrive residual files' script is
is divided into two distinct scripts for better maintainability and
documentation clarity:
1. 'Remove OneDrive user data and synced folders'
2. 'Remove OneDrive installation files and cache'
- Fix an issue with the Windows 11 check in the 'Disable automatic
OneDrive installation' revert script.
- Update related documentation with archived URLs for reliability.
- Fix indentation of OneDrive removal scripts.
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.
- Introduce new category for host blocking.
- Add new scripts to block tracking hosts Windows connects to.
- Relocate Dropbox host blocking under new category.
- Update comments in `BlockViaHostsFile` function for clarity.
This commit improves the organization of service disabling scripts by
relocating the "Disable OS services" section. It improves documentation
and script/category titles to enhance clarity and accessibility for the
divers user base of privacy.sexy, including those with non-technical
backgrounds.
Key changes:
- Move "Disable OS services" to "Remove bloatware" to simplify
navigation and prepare for new categories (for #26).
- Rename "Disable OS services" to "Disable non-essential services"
for better understanding.
- Relocate "Disable NetBios for all interfaces" to "Security
improvements" due to its relevance to security rather than bloatware.
- Improve documentation.
- Simplify script names by removing technical jargon, making them more
more accessible.
Introduce scripts across Windows, macOS and Linux to allow privacy.sexy
users to erase their script usage traces, improving privacy protection.
Key changes:
- Add category to clear privacy.sexy data.
- Add scripts for deleting privacy.sexy's script execution history and
activity logs.
Supporting changes:
- Update documentation to highlight the new capability for users to
clear privacy.sexy-generated data.
- Add shared functions for directory cleanup for Linux and macOS.
- Add code annotations to hint unified approach across all supported
operating systems.
This commit implements scripts to disable Windows Copilot (Copilot in
Windows), addressing issues #263 and #266.
Changes include:
- Add category and scripts to disable Windows copilot.
- Incorporate a restart explorer suggestion across all taskbar
modification scripts to ensure consistency in user experience.
- Add disabling bing search suggestions, resolving #117.
- Fix revert codes to align with default OS configurations.
- Implement message for recommended explorer.exe restart.
- Simplify script names for ease of understanding.
- Provide detailed documentation for each script change.
- Correct `BingSearchEnabled` registry path from HKLM to HKCU.
- Improve categorization of search privacy scripts.
This commit adds scripts to secure clipboard by disabling clipboard
synchronization and history. These changes aim to prevent sensitive data
like passwords and credit card details from being inadvertently stored
or shared via the cloud.
This commit adds missing extension apps seen since Windows 11 22H2 and
improves documentation scripts and category of extension app removal.
Addition of new extension apps found since Windows 11 22H2:
- HEVC Video Extensions (`Microsoft.HEVCVideoExtension`)
- Raw Image Extension (`Microsoft.RawImageExtension`)
Documentation improvements:
- Fix links that are not correctly archived.
- Add cautionary notes for all extension app removal scripts.
- Add security implications associated with these extensions.
This commit improves documentation for removal of Windows store apps
along with adding related research.
1. Improve Store app removal documentation:
The documentation for scripts that remove Store apps has been
enhanced. It now includes information on the default preinstallation
status of these apps across various Windows versions. This update
covers Windows 10 (from version 19H2 to 23H2) and Windows 11 (from
version 21H2 to 23H2), enabling users to identify potentially
preinstalled apps that might affect privacy.
2. Add research documentation:
A detailed research documentation on Windows Store apps has been
introduced for Windows 10 (versions 1909 to 22H2) and Windows 11
(versions 21H2 to 23H2). This includes lists of preinstalled Store
apps, complete with package information. This research aids in
understanding which default apps are present in different Windows
versions and their status regarding removal. The documentation also
includes the PowerShell script used for this research, serving as a
resource for future updates and expansion.
This commit addresses the language dependency of the `takeown /d y`
command in non-English Windows versions by using the `choice` utility.
This utility dynamically determines the equivalent of 'yes' in the
current system language, resolving issues encountered in the delete
script.
Other solution options such as enumerating language equivalents,
adjusting script culture settings, using side-effects of the `copy`
command, and parsing `takeown` help documentation proved either
impractical or unreliable.
The `choice` command has been successfully tested in both English and
German environments, ensuring reliable execution across various locales.
This change replaces the previous `takeown` usage in the script,
its reliability across diverse Windows locales.
This commit adds Windows update postponement techniques.
This provides users more control over the update process, aiming to
prevent automatic re-enabling of updates without user consent.
These scripts are tested and validated on Windows 10 (22H2 onwards) and
Windows 11 (22H3 onwards), introducing registry modifications for
sustained pause durations.
This commit improves disabling of Application Experience component by
improving the categorization, documentation, existing scripts and adding
new scripts. It renames the scripts to be more user-friendly but still
technically accurate.
- Rename scripts to make them easier for non-technical users to
understand.
- Improve existing documentation and add more documentation.
- Add new scripts for:
- 'Disable "MareBackup" task'
- 'Disable "SdbinstMergeDbTask" task'
- 'Disable "PcaPatchDbTask" task'
- Improve `CompatTelRunner.exe` disabling to soft-delete the file.
This commit strengthens user control over the Windows Update Medic
Service (`WaaSMedicSvc`) and related components. These changes aim to
provide users with more control over Windows updates and telemetry data
shared with Microsoft, addressing privacy concerns.
Updates include:
- Soft deletion of various Windows Update Medic Service files and
remediation files to prevent automatic re-enabling of Windows updates.
- Termination of `upfc.exe` to stop it from reactivating Windows Update
Medic Service, thereby allowing users to maintain their desired update
settings.
- Improving documentation with cautionary notes to guide users through
poential impacts of these changes on system stability and update
integrity.
- Including rationale behind the exclusion of `sedsvc`.
- Better documentation and output messages of `DisableService` function.
Recommending the script that removes "Xbox Identity Provider" app
(`Microsoft.XboxIdentityProvider`) at the "Standard" level has led to
unforeseen consequences for Windows users using Xbox sign-in.
This commit introduces additional documentation and reduces the
recommendation level to mitigate these issues.
- Change recommendation level from "Standard" to "Strict".
- Improve documentation to outline the impact of uninstalling the "Xbox
Identity Provider" app.
- Update script title to warn users about the breaking behavior.
- Reduce recommendation level from "Standard" to "Strict" due to its
potential breaking behavior.
- Add detailed documentation.
- Simplify script title for broader accessibility while maintaining
technical accuracy.
- Note potential impact on remote system management in the script title.
- Adjust revert code align with recent Windows OS version.
This commit fixes the issue of Windows Security app not being removed in
Windows 11. It addresses the problem by extending the app uninstallation
process to cover the new app package specific to Windows 11. It improves
the overall design of templated functions for store app removal to
implement the fix.
- Improve Windows Security removal script:
- Add support for removing `Microsoft.SecHealthUI` in Windows 11.
- Revise script documentation for clarity and correct typos.
- Redesign uninstallion of Store apps:
- Change `UninstallSystemApp` to `UninstallNonRemovableStoreApp` for
wider usage. This change is due to `Microsoft.SecHealthUI` being
non-removable yet not a system app.
- Refactor app data cleanup into two distinct functions
(`ClearStoreAppDataBeforeUninstallation` and
`ClearStoreAppDataAfterUninstallation`) for better clarity and
maintainability. This also helps in testing by allowing easier
reordering of operations.
- Seperate between simple non-removable app uninstallation and
uninstallation with cleanup in separate functions, highlighting that
the latter is more invasive and should be used cautiously. This
addresses permission issues encountered with `SecHealthUI` app
removal during cleanup on Windows 11.
- Separate uninstalling app and uninstalling app with cleanup to
different functions, document that cleanup should no longer be
prefered as it's invasive and too aggresive. Cleanup logic
introduces permission issues/errors for `SecHealthUI` in Windows 11.
- Extend app soft-deletion to include the default Windows app folder,
this ensures that the cleanup covers any kind of Store apps (not
only system apps).
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.