Giter Club home page Giter Club logo

undergroundwires / privacy.sexy Goto Github PK

View Code? Open in Web Editor NEW
3.5K 59.0 150.0 18.18 MB

Open-source tool to enforce privacy & security best-practices on Windows, macOS and Linux, because privacy is sexy

Home Page: https://privacy.sexy

License: GNU Affero General Public License v3.0

Dockerfile 0.02% JavaScript 1.18% HTML 0.11% Vue 7.71% TypeScript 89.72% SCSS 0.88% Python 0.37%
privacy privacy-tools privacy-protection tweaks-collection domain-driven-design security-tools security-hardening bloatware-removal bloatware debotnet

privacy.sexy's Introduction

privacy.sexy โ€” Privacy is sexy

Enforce privacy & security best-practices on Windows, macOS and Linux, because privacy is sexy.

donation badge contributions are welcome Maintainability
Unit tests status Integration tests status E2E tests status
Status of dependency security checks Status of Static Analysis Security Testing (SAST)
Status of quality checks Status of build checks Status of runtime error checks for the desktop application Status of script checks Status of external URL checks
Git release status Site release status Desktop application release status
Auto-versioned by bump-everywhere

Get started

For a detailed comparison of features between the desktop and web versions of privacy.sexy, see Desktop vs. Web Features.

๐Ÿ’ก Regularly applying your configuration with privacy.sexy is recommended, especially after each new release and major operating system updates. Each version updates scripts to enhance stability, privacy, and security.

privacy.sexy application

Features

  • Rich: Hundreds of scripts that aims to give you control of your data.
  • Free: Both free as in "beer" and free as in "speech".
  • Transparent. Have full visibility into what the tweaks do as you enable them.
  • Reversible. Revert if something feels wrong.
  • Accessible. No need to run any compiled software on your computer with web version.
  • Secure: Security is a top priority at privacy.sexy with comprehensive safeguards in place.
  • Open. What you see as code in this repository is what you get. The application itself, its infrastructure and deployments are open-source and automated thanks to bump-everywhere.
  • Tested. A lot of tests. Automated and manual. Community-testing and verification. Stability improvements comes before new features.
  • Extensible. Effortlessly extend scripts with a custom designed templating language.
  • Portable and simple. Every script is independently executable without cross-dependencies.

Support

Sponsor ๐Ÿ’•. Consider sponsoring on GitHub Sponsors, or you can donate using other ways such as crypto or a coffee.

Star ๐Ÿคฉ. Feel free to give it a star โญ .

Contribute ๐Ÿ‘ท. Contributions of any type are welcome. See CONTRIBUTING.md as the starting point. It includes useful information like how to add new scripts.

Additional Install Options

  • Check the releases page for all available versions.
  • Other unofficial channels (not maintained by privacy.sexy) for Windows include:
    • Scoop ๐Ÿฅ„ (latest version):

        scoop bucket add extras
        scoop install privacy.sexy
    • winget ๐ŸชŸ (may be outdated):

        winget install -e --id undergroundwires.privacy.sexy

      With winget, updates require manual submission; the auto-update feature within privacy.sexy will notify you of new releases post-installation.

Development

Refer to development.md for Docker usage and reading more about setting up your development environment.

Check architecture.md for an overview of design and how different parts and layers work together. You can refer to application.md for a closer look at application layer codebase and presentation.md for code related to GUI layer. collection-files.md explains the YAML files that are the core of the application and templating.md documents how to use templating language in those files. In ci-cd.md, you can read more about the pipelines that automates maintenance tasks and ensures you get what see.

docs/ folder includes all other documentation.

Security

Security is a top priority at privacy.sexy. An extensive commitment to security verification ensures this priority. For any security concerns or vulnerabilities, please consult the Security Policy.

privacy.sexy's People

Contributors

bricedobson avatar cjerrington avatar couleurm avatar dependabot[bot] avatar fs00 avatar greaterthanstar avatar he3als avatar marc05 avatar permanently avatar snowznz avatar sopla4ever avatar tromcho avatar undergroundwires avatar undergroundwires-bot avatar weigurde avatar zy26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

privacy.sexy's Issues

Delete default0 ghost telemetry user

There the script in the "Privacy cleanup" folder named "Delete default0 ghost telemetry user". I've taken a look at what it does, and for some reason I wanted to list the users on my system so I ran net user. What I see is that there's no defaultuser0, but there is a defaultuser1.

Could the 2 be related, or is defaultuser1 something different?

What script disables the night light settings?

Hello,
I used this script generator to harden privacy on my Win machine. I also tried to remove as much bloatware as possible. I am overall happy except for one thing. The Windows settings of night light is inaccessible.

Do you know, which script could have disabled this feature and what would be his reverse form?

Thank you

Enhancement - Make the collections compatible with PowerShell script

I agree we should better support PowerShell scripts (#53), I think a better way is to use pure PowerShell scripts to replace the .yaml files. Meta-information such as os, actions, category, etc. can be placed in the comment based help of the PowerShell functions.

In this way, the collections will have better compatibility and can be easily called and configured using other PowerShell scripts (such as Disassembler0/Win10-Initial-Setup-Script) without using npm, browser or executables.

The common script file format and interchangeable front ends can also encourage and promote other contributors.

Add more scripts

Based on comment in #15

  • Do not let apps accesss my name, picture, and other account info
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps access my calendar
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{D89823BA-7180-4B81-B50C-7E471E6121A3}" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps use camera
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps access my contacts
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{7D7E8402-7C54-4821-A34E-AEEFD62DED93}" /t REG_SZ /v "Value" /d DENY /f
  • (already exists) Do not let apps access my location
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps access text/mms
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /t REG_SZ /v "Value" /d DENY /f
  • (already exists) Do not let apps use microphone
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps share and sync non-explicitly paired wireless devices over uPnP
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" /t REG_SZ /v "Value" /d DENY /f
  • Do not let apps access radios
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /t REG_SZ /v "Value" /d DENY /f
  • Disable Advertising ID
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /t REG_DWORD /v Enabled /d 0 /f
  • (already exists) Set feedback frequency to zero
  • (already exists) Disable smartscreen
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /t REG_DWORD /v EnableWebContentEvaluation /d 0 /f
  • Do not send typing info to microsoft
    • (already exists) reg add "HKCU\SOFTWARE\Microsoft\Input\TIPC" /t REG_DWORD /v Enabled /d 0 /f
    • (already exists) reg add "HKCU\SOFTWARE\Microsoft\Personalization\Settings" /t REG_DWORD /v AcceptedPrivacyPolicy /d 0 /f
    • reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v Enabled /d 0 /f
    • (already exists) reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /t REG_DWORD /v RestrictImplicitTextCollection /d 1 /f
    • (already exists) reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /t REG_DWORD /v RestrictImplicitInkCollection /d 1 /f
    • (already exists) reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /t REG_DWORD /v HarvestContacts /d 0 /f
  • Disable Automatic Installation of Microsoft Edge Chromium

Enhancement - ability to directly link (permalink) to a specific script

Hello, great project thanks for doing this.

Enhancement idea - Being able to link directly to a specific script would be a very useful way of sharing scripts with other people. We could just link them to something like https://privacy.sexy/x/y/z and they can always see the latest script there.

Missing line breaks in 'Spectre variant 2 and meltdown (own OS)'

I don't think this script is supposed to run on a single line, as it exits out of the entire Command Prompt when run.

This is the default generated script (as of v0.7.3):

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d 3 /f wmic cpu get name | findstr "Intel" >nul && ( reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 0 /f ) wmic cpu get name | findstr "AMD" >nul && ( reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 64 /f )

This is what works for me:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d 3 /f
wmic cpu get name | findstr "Intel" >nul && ( reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 0 /f )
wmic cpu get name | findstr "AMD" >nul && ( reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 64 /f )

Simple fix, but hope this helps :^).

Export as json(?) and then load

Problem Description

I would love to be able to load previously created script and change some of the settings or just see with nice GUI what does the script do

Proposed solution

I assume, that parsing script is not an option, so next best thing would be exporting to JSON or another format.

I am thinking about putting created JSON in a comment as first/last line and then the only thing to do is to get that line and parse it as JSON.

Alternatives considered

I can read script myself, but GUI is nice, especially when showing it to non-tech people.

Problems with microphone input and establishing SSL/TLS connections

Describe the bug

I just used the script, didn't choose any crazy options. but now no programs get input from my mic? I need to do zoom classes, and this is kind of a big problem.

OS

windows 10 20h2 19042.746

Scripts

privacy-script.zip

this was the script i ran (in zip form cause i cant upload .bat)

To Reproduce

Steps to reproduce the problem:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[Feature] On/off toggle for tweaks

  • Add support in application.yml
  • Support in the GUI
  • Documention, maybe a CONTRIBUTING.md
  • Reference implementations for some of the scripts

[BUG]: Xbox sign in not working

Describe the bug

xbox sign in not working

OS

21H1

Screenshots

Scripts

Click to expand
        @echo off
        :: https://privacy.sexy โ€” v0.10.2 โ€” Fri, 28 May 2021 02:35:54 GMT
        :: Ensure admin privileges
        fltmc >nul 2>&1 || (
            echo Administrator privileges are required.
            PowerShell Start -Verb RunAs '%0' 2> nul || (
                echo Right-click on the script and select "Run as administrator".
                pause & exit 1
            )
            exit 0
        )
        
        
        :: ----------------------------------------------------------
        :: ------------Delete controversial default0 user------------
        :: ----------------------------------------------------------
        echo --- Delete controversial default0 user
        net user defaultuser0 /delete 2>nul
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Enable Reset Base in Dism Component Store---------
        :: ----------------------------------------------------------
        echo --- Enable Reset Base in Dism Component Store
        reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DisableResetbase" /t "REG_DWORD" /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Remove Default Apps Associations-------------
        :: ----------------------------------------------------------
        echo --- Remove Default Apps Associations
        dism /online /Remove-DefaultAppAssociations
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Clear (Reset) Network Data Usage-------------
        :: ----------------------------------------------------------
        echo --- Clear (Reset) Network Data Usage
        setlocal EnableDelayedExpansion 
            SET /A dps_service_running=0
            SC queryex "DPS"|Find "STATE"|Find /v "RUNNING">Nul||(
                SET /A dps_service_running=1
                net stop DPS
            )
            del /F /S /Q /A "%windir%\System32\sru*"
            IF !dps_service_running! == 1 (
                net start DPS
            )
        endlocal
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Clear Java cache---------------------
        :: ----------------------------------------------------------
        echo --- Clear Java cache
        rd /s /q "%APPDATA%\Sun\Java\Deployment\cache"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Clear Flash traces--------------------
        :: ----------------------------------------------------------
        echo --- Clear Flash traces
        rd /s /q "%APPDATA%\Macromedia\Flash Player"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Clear Steam dumps, logs, and traces------------
        :: ----------------------------------------------------------
        echo --- Clear Steam dumps, logs, and traces
        del /f /q %ProgramFiles(x86)%\Steam\Dumps
        del /f /q %ProgramFiles(x86)%\Steam\Traces
        del /f /q %ProgramFiles(x86)%\Steam\appcache\*.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Clear Visual Studio telemetry and feedback data------
        :: ----------------------------------------------------------
        echo --- Clear Visual Studio telemetry and feedback data
        rmdir /s /q "%AppData%\vstelemetry" 2>nul
        rmdir /s /q "%LocalAppData%\Microsoft\VSApplicationInsights" 2>nul
        rmdir /s /q "%ProgramData%\Microsoft\VSApplicationInsights" 2>nul
        rmdir /s /q "%Temp%\Microsoft\VSApplicationInsights" 2>nul
        rmdir /s /q "%Temp%\VSFaultInfo" 2>nul
        rmdir /s /q "%Temp%\VSFeedbackPerfWatsonData" 2>nul
        rmdir /s /q "%Temp%\VSFeedbackVSRTCLogs" 2>nul
        rmdir /s /q "%Temp%\VSRemoteControl" 2>nul
        rmdir /s /q "%Temp%\VSTelem" 2>nul
        rmdir /s /q "%Temp%\VSTelem.Out" 2>nul
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Clear Dotnet CLI telemetry----------------
        :: ----------------------------------------------------------
        echo --- Clear Dotnet CLI telemetry
        rmdir /s /q "%USERPROFILE%\.dotnet\TelemetryStorageService" 2>nul
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Clear regedit last key------------------
        :: ----------------------------------------------------------
        echo --- Clear regedit last key
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Clear regedit favorites------------------
        :: ----------------------------------------------------------
        echo --- Clear regedit favorites
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Clear list of recent programs opened-----------
        :: ----------------------------------------------------------
        echo --- Clear list of recent programs opened
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRU" /va /f
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRULegacy" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Clear Adobe Media Browser MRU---------------
        :: ----------------------------------------------------------
        echo --- Clear Adobe Media Browser MRU
        reg delete "HKCU\Software\Adobe\MediaBrowser\MRU" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Clear MSPaint MRU---------------------
        :: ----------------------------------------------------------
        echo --- Clear MSPaint MRU
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Clear Wordpad MRU---------------------
        :: ----------------------------------------------------------
        echo --- Clear Wordpad MRU
        reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Wordpad\Recent File List" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Clear Map Network Drive MRU MRU--------------
        :: ----------------------------------------------------------
        echo --- Clear Map Network Drive MRU MRU
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Clear Windows Search Assistant history----------
        :: ----------------------------------------------------------
        echo --- Clear Windows Search Assistant history
        reg delete "HKCU\Software\Microsoft\Search Assistant\ACMru" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Clear list of Recent Files Opened, by Filetype------
        :: ----------------------------------------------------------
        echo --- Clear list of Recent Files Opened, by Filetype
        reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f
        reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Clear windows media player recent files and URLs-----
        :: ----------------------------------------------------------
        echo --- Clear windows media player recent files and URLs
        reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f
        reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentURLList" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\MediaPlayer\Player\RecentFileList" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\MediaPlayer\Player\RecentURLList" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Clear Most Recent Application's Use of DirectX------
        :: ----------------------------------------------------------
        echo --- Clear Most Recent Application's Use of DirectX
        reg delete "HKCU\Software\Microsoft\Direct3D\MostRecentApplication" /va /f
        reg delete "HKLM\SOFTWARE\Microsoft\Direct3D\MostRecentApplication" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Clear Windows Run MRU & typedpaths------------
        :: ----------------------------------------------------------
        echo --- Clear Windows Run MRU ^& typedpaths
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f
        reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths" /va /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Clear recently accessed files---------------
        :: ----------------------------------------------------------
        echo --- Clear recently accessed files
        del /f /q "%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Clear Internet Explorer traces--------------
        :: ----------------------------------------------------------
        echo --- Clear Internet Explorer traces
        del /f /q "%localappdata%\Microsoft\Windows\INetCache\IE\*"
        reg delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\TypedURLs" /va /f
        reg delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\TypedURLsTime" /va /f
        rd /s /q "%localappdata%\Microsoft\Internet Explorer"
        rd /s /q "%APPDATA%\Microsoft\Windows\Cookies"
        rd /s /q "%USERPROFILE%\Cookies"
        rd /s /q "%USERPROFILE%\Local Settings\Traces"
        rd /s /q "%localappdata%\Temporary Internet Files"
        rd /s /q "%localappdata%\Microsoft\Windows\Temporary Internet Files"
        rd /s /q "%localappdata%\Microsoft\Windows\INetCookies\PrivacIE"
        rd /s /q "%localappdata%\Microsoft\Feeds Cache"
        rd /s /q "%localappdata%\Microsoft\InternetExplorer\DOMStore"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Clear Google Chrome traces----------------
        :: ----------------------------------------------------------
        echo --- Clear Google Chrome traces
        del /f /q "%localappdata%\Google\Software Reporter Tool\*.log"
        rd /s /q "%USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data"
        rd /s /q "%localappdata%\Google\Chrome\User Data"
        rd /s /q "%localappdata%\Google\CrashReports\""
        rd /s /q "%localappdata%\Google\Chrome\User Data\Crashpad\reports\""
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Clear Opera traces--------------------
        :: ----------------------------------------------------------
        echo --- Clear Opera traces
        rd /s /q "%USERPROFILE%\AppData\Local\Opera\Opera"
        rd /s /q "%APPDATA%\Opera\Opera"
        rd /s /q "%USERPROFILE%\Local Settings\Application Data\Opera\Opera"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Clear Safari traces--------------------
        :: ----------------------------------------------------------
        echo --- Clear Safari traces
        rd /s /q "%USERPROFILE%\AppData\Local\Apple Computer\Safari\Traces"
        rd /s /q "%APPDATA%\Apple Computer\Safari"
        del /q /s /f "%USERPROFILE%\AppData\Local\Apple Computer\Safari\Cache.db"
        del /q /s /f "%USERPROFILE%\AppData\Local\Apple Computer\Safari\WebpageIcons.db"
        rd /s /q "%USERPROFILE%\Local Settings\Application Data\Apple Computer\Safari\Traces"
        del /q /s /f "%USERPROFILE%\Local Settings\Application Data\Apple Computer\Safari\Cache.db"
        del /q /s /f "%USERPROFILE%\Local Settings\Application Data\Safari\WebpageIcons.db"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Clear browsing history and caches-------------
        :: ----------------------------------------------------------
        echo --- Clear browsing history and caches
        set ignoreFiles="content-prefs.sqlite" "permissions.sqlite" "favicons.sqlite"
        for %%d in ("%APPDATA%\Mozilla\Firefox\Profiles\"
                    "%USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\"
                ) do (
            IF EXIST %%d (
                FOR /d %%p IN (%%d*) DO (
                    for /f "delims=" %%f in ('dir /b /s "%%p\*.sqlite" 2^>nul') do (
                        set "continue="
                        for %%i in (%ignoreFiles%) do ( 
                            if %%i == "%%~nxf" (
                                set continue=1
                            )
                        )
                        if not defined continue (
                            del /q /s /f %%f
                        )
                    )
                )
            )
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Clear Windows temp files-----------------
        :: ----------------------------------------------------------
        echo --- Clear Windows temp files
        del /f /q %localappdata%\Temp\*
        rd /s /q "%WINDIR%\Temp"
        rd /s /q "%TEMP%"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Clear main telemetry file-----------------
        :: ----------------------------------------------------------
        echo --- Clear main telemetry file
        if exist "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" (
            takeown /f "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /r /d y
            icacls "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /grant administrators:F /t
            echo "" > "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
            echo Clear successful: "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
        ) else (
            echo "Main telemetry file does not exist. Good!"
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: Clear Optional Component Manager and COM+ components logs-
        :: ----------------------------------------------------------
        echo --- Clear Optional Component Manager and COM+ components logs
        del /f /q %SystemRoot%\comsetup.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Clear Distributed Transaction Coordinator logs------
        :: ----------------------------------------------------------
        echo --- Clear Distributed Transaction Coordinator logs
        del /f /q %SystemRoot%\DtcInstall.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Clear Windows Deployment Upgrade Process Logs-------
        :: ----------------------------------------------------------
        echo --- Clear Windows Deployment Upgrade Process Logs
        del /f /q %SystemRoot%\setupact.log
        del /f /q %SystemRoot%\setuperr.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Clear Windows Setup Logs-----------------
        :: ----------------------------------------------------------
        echo --- Clear Windows Setup Logs
        del /f /q %SystemRoot%\setupapi.log
        del /f /q %SystemRoot%\Panther\*
        del /f /q %SystemRoot%\inf\setupapi.app.log
        del /f /q %SystemRoot%\inf\setupapi.dev.log
        del /f /q %SystemRoot%\inf\setupapi.offline.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Clear Windows System Assessment Tool logs---------
        :: ----------------------------------------------------------
        echo --- Clear Windows System Assessment Tool logs
        del /f /q %SystemRoot%\Performance\WinSAT\winsat.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Clear Password change events---------------
        :: ----------------------------------------------------------
        echo --- Clear Password change events
        del /f /q %SystemRoot%\debug\PASSWD.LOG
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Clear user web cache database---------------
        :: ----------------------------------------------------------
        echo --- Clear user web cache database
        del /f /q %localappdata%\Microsoft\Windows\WebCache\*.*
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Clear system temp folder when no one is logged in-----
        :: ----------------------------------------------------------
        echo --- Clear system temp folder when no one is logged in
        del /f /q %SystemRoot%\ServiceProfiles\LocalService\AppData\Local\Temp\*.*
        :: ----------------------------------------------------------
        
        
        :: Clear DISM (Deployment Image Servicing and Management) Logs
        echo --- Clear DISM (Deployment Image Servicing and Management) Logs
        del /f /q  %SystemRoot%\Logs\CBS\CBS.log
        del /f /q  %SystemRoot%\Logs\DISM\DISM.log
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Common Language Runtime Logs---------------
        :: ----------------------------------------------------------
        echo --- Common Language Runtime Logs
        del /f /q "%LocalAppData%\Microsoft\CLR_v4.0\UsageTraces\*"
        del /f /q "%LocalAppData%\Microsoft\CLR_v4.0_32\UsageTraces\*"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Network Setup Service Events Logs-------------
        :: ----------------------------------------------------------
        echo --- Network Setup Service Events Logs
        del /f /q "%SystemRoot%\Logs\NetSetup\*"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Clear Windows update and SFC scan logs----------
        :: ----------------------------------------------------------
        echo --- Clear Windows update and SFC scan logs
        del /f /q %SystemRoot%\Temp\CBS\*
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Clear Windows Update Medic Service logs----------
        :: ----------------------------------------------------------
        echo --- Clear Windows Update Medic Service logs
        takeown /f %SystemRoot%\Logs\waasmedic /r /d y
        icacls %SystemRoot%\Logs\waasmedic /grant administrators:F /t
        rd /s /q %SystemRoot%\Logs\waasmedic
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Clear Cryptographic Services Traces------------
        :: ----------------------------------------------------------
        echo --- Clear Cryptographic Services Traces
        del /f /q %SystemRoot%\System32\catroot2\dberr.txt
        del /f /q %SystemRoot%\System32\catroot2.log
        del /f /q %SystemRoot%\System32\catroot2.jrs
        del /f /q %SystemRoot%\System32\catroot2.edb
        del /f /q %SystemRoot%\System32\catroot2.chk
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable cloud speech recognition-------------
        :: ----------------------------------------------------------
        echo --- Disable cloud speech recognition
        reg add "HKCU\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /v "HasAccepted" /t "REG_DWORD" /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Disable active probing (pings to MSFT NCSI server)----
        :: ----------------------------------------------------------
        echo --- Disable active probing (pings to MSFT NCSI server)
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v "EnableActiveProbing" /t REG_DWORD /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Opt out from Windows privacy consent-----------
        :: ----------------------------------------------------------
        echo --- Opt out from Windows privacy consent
        reg add "HKCU\SOFTWARE\Microsoft\Personalization\Settings" /v "AcceptedPrivacyPolicy" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Disable Windows feedback-----------------
        :: ----------------------------------------------------------
        echo --- Disable Windows feedback
        reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f 
        reg delete "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "PeriodInNanoSeconds" /f
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f 
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Disable text and handwriting collection----------
        :: ----------------------------------------------------------
        echo --- Disable text and handwriting collection
        reg add "HKCU\Software\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f
        reg add "HKLM\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "AllowInputPersonalization" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /v "HarvestContacts" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Turn off sensors---------------------
        :: ----------------------------------------------------------
        echo --- Turn off sensors
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableSensors" /t REG_DWORD /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable Wi-Fi sense--------------------
        :: ----------------------------------------------------------
        echo --- Disable Wi-Fi sense
        reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v "value" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v "value" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" /v "AutoConnectAllowedOEM" /t REG_DWORD /d 0 /f 
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Hide most used apps (tracks app launch)----------
        :: ----------------------------------------------------------
        echo --- Hide most used apps (tracks app launch)
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /d 0 /t REG_DWORD /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Disable Inventory Collector----------------
        :: ----------------------------------------------------------
        echo --- Disable Inventory Collector
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableInventory" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Disable Website Access of Language List----------
        :: ----------------------------------------------------------
        echo --- Disable Website Access of Language List
        reg add "HKCU\Control Panel\International\User Profile" /v "HttpAcceptLanguageOptOut" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable Auto Downloading Maps---------------
        :: ----------------------------------------------------------
        echo --- Disable Auto Downloading Maps
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Maps" /v "AllowUntriggeredNetworkTrafficOnSettingsPage" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Maps" /v "AutoDownloadAndUpdateMapData" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Disable steps recorder------------------
        :: ----------------------------------------------------------
        echo --- Disable steps recorder
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable feedback on write (sending typing info)------
        :: ----------------------------------------------------------
        echo --- Disable feedback on write (sending typing info)
        reg add "HKLM\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Disable Activity Feed-------------------
        :: ----------------------------------------------------------
        echo --- Disable Activity Feed
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableActivityFeed" /d "0" /t REG_DWORD /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Disable Customer Experience Improvement (CEIP/SQM)----
        :: ----------------------------------------------------------
        echo --- Disable Customer Experience Improvement (CEIP/SQM)
        reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Disable Application Impact Telemetry (AIT)--------
        :: ----------------------------------------------------------
        echo --- Disable Application Impact Telemetry (AIT)
        reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable diagnostics telemetry---------------
        :: ----------------------------------------------------------
        echo --- Disable diagnostics telemetry
        reg add "HKLM\SYSTEM\ControlSet001\Services\DiagTrack" /v "Start" /t REG_DWORD /d 4 /f 
        reg add "HKLM\SYSTEM\ControlSet001\Services\dmwappushsvc" /v "Start" /t REG_DWORD /d 4 /f 
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\dmwappushservice" /v "Start" /t REG_DWORD /d 4 /f 
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service" /v "Start" /t REG_DWORD /d 4 /f
        sc stop "DiagTrack" & sc config "DiagTrack" start=disabled
        sc stop "dmwappushservice" & sc config "dmwappushservice" start=disabled
        sc stop "diagnosticshub.standardcollector.service" & sc config "diagnosticshub.standardcollector.service" start=disabled
        sc stop "diagsvc" & sc config "diagsvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable Customer Experience Improvement Program------
        :: ----------------------------------------------------------
        echo --- Disable Customer Experience Improvement Program
        schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
        schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
        schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Disable telemetry in data collection policy--------
        :: ----------------------------------------------------------
        echo --- Disable telemetry in data collection policy
        reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /d 0 /t REG_DWORD /f
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "LimitEnhancedDiagnosticDataWindowsAnalytics" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f 
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable license telemetry-----------------
        :: ----------------------------------------------------------
        echo --- Disable license telemetry
        reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v "NoGenTicket" /t "REG_DWORD" /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Disable error reporting------------------
        :: ----------------------------------------------------------
        echo --- Disable error reporting
        :: Disable Windows Error Reporting (WER)
        reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f
        reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t "REG_DWORD" /d "1" /f
        :: DefaultConsent / 1 - Always ask (default) / 2 - Parameters only / 3 - Parameters and safe data / 4 - All data
        reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d "0" /f
        reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultOverrideBehavior" /t REG_DWORD /d "1" /f
        :: Disable WER sending second-level data
        reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d "1" /f
        :: Disable WER crash dialogs, popups
        reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d "1" /f
        schtasks /Change /TN "Microsoft\Windows\ErrorDetails\EnableErrorDetailsUpdate" /Disable
        schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable
        :: Disable Windows Error Reporting Service
        sc stop "WerSvc" & sc config "WerSvc" start=disabled
        sc stop "wercplsupport" & sc config "wercplsupport" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Disable devicecensus.exe (telemetry) task---------
        :: ----------------------------------------------------------
        echo --- Disable devicecensus.exe (telemetry) task
        schtasks /change /TN "Microsoft\Windows\Device Information\Device" /disable
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Disable devicecensus.exe (telemetry) process-------
        :: ----------------------------------------------------------
        echo --- Disable devicecensus.exe (telemetry) process
        reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\'DeviceCensus.exe'" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
        :: ----------------------------------------------------------
        
        
        :: Disable sending information to Customer Experience Improvement Program
        echo --- Disable sending information to Customer Experience Improvement Program
        schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /disable
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable Application Impact Telemetry Agent task------
        :: ----------------------------------------------------------
        echo --- Disable Application Impact Telemetry Agent task
        schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /disable
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --Disable "Disable apps to improve performance" reminder--
        :: ----------------------------------------------------------
        echo --- Disable "Disable apps to improve performance" reminder
        schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /disable
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Disable Microsoft Compatibility Appraiser task------
        :: ----------------------------------------------------------
        echo --- Disable Microsoft Compatibility Appraiser task
        schtasks /change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /disable
        :: ----------------------------------------------------------
        
        
        :: Disable CompatTelRunner.exe (Microsoft Compatibility Appraiser) process
        echo --- Disable CompatTelRunner.exe (Microsoft Compatibility Appraiser) process
        reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\'CompatTelRunner.exe'" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Turn off location scripting----------------
        :: ----------------------------------------------------------
        echo --- Turn off location scripting
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocationScripting" /t REG_DWORD /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Turn off location---------------------
        :: ----------------------------------------------------------
        echo --- Turn off location
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /d "1" /t REG_DWORD /f
        :: For older Windows (before 1903)
        reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "SensorPermissionState" /d "0" /t REG_DWORD /f
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "Value" /t REG_SZ /d "Deny" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Do not allow search to use location------------
        :: ----------------------------------------------------------
        echo --- Do not allow search to use location
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowSearchToUseLocation" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable web search in search bar-------------
        :: ----------------------------------------------------------
        echo --- Disable web search in search bar
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable Bing search--------------------
        :: ----------------------------------------------------------
        echo --- Disable Bing search
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Do not allow Cortana-------------------
        :: ----------------------------------------------------------
        echo --- Do not allow Cortana
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Do not allow Cortana experience--------------
        :: ----------------------------------------------------------
        echo --- Do not allow Cortana experience
        reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" /v "value" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Do not allow search and Cortana to search cloud sources like OneDrive and SharePoint
        echo --- Do not allow search and Cortana to search cloud sources like OneDrive and SharePoint
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCloudSearch" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Disable Cortana speech interaction while the system is locked
        echo --- Disable Cortana speech interaction while the system is locked
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortanaAboveLock" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Opt out from Cortana consent---------------
        :: ----------------------------------------------------------
        echo --- Opt out from Cortana consent
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "CortanaConsent" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Do not allow Cortana to be enabled------------
        :: ----------------------------------------------------------
        echo --- Do not allow Cortana to be enabled
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CanCortanaBeEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -Disable Cortana (Internet search results in start menu)--
        :: ----------------------------------------------------------
        echo --- Disable Cortana (Internet search results in start menu)
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f 
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f 
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Remove the Cortana taskbar icon--------------
        :: ----------------------------------------------------------
        echo --- Remove the Cortana taskbar icon
        reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v "ShowCortanaButton" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Cortana in ambient mode--------------
        :: ----------------------------------------------------------
        echo --- Disable Cortana in ambient mode
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaInAmbientMode" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Prevent Cortana from displaying history----------
        :: ----------------------------------------------------------
        echo --- Prevent Cortana from displaying history
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "HistoryViewEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Prevent Cortana from using device history---------
        :: ----------------------------------------------------------
        echo --- Prevent Cortana from using device history
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "DeviceHistoryEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable "Hey Cortana" voice activation----------
        :: ----------------------------------------------------------
        echo --- Disable "Hey Cortana" voice activation
        reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationOn" /t REG_DWORD /d 0 /f
        reg add "HKLM\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationDefaultOn" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -Disable Cortana listening to commands on Windows key + C-
        :: ----------------------------------------------------------
        echo --- Disable Cortana listening to commands on Windows key + C
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "VoiceShortcut" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable using Cortana even when device is locked-----
        :: ----------------------------------------------------------
        echo --- Disable using Cortana even when device is locked
        reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationEnableAboveLockscreen" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Disable automatic update of Speech Data----------
        :: ----------------------------------------------------------
        echo --- Disable automatic update of Speech Data
        reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "ModelDownloadAllowed" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Disable Cortana voice support during Windows setup----
        :: ----------------------------------------------------------
        echo --- Disable Cortana voice support during Windows setup
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "DisableVoice" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable search indexing encrypted items / stores-----
        :: ----------------------------------------------------------
        echo --- Disable search indexing encrypted items / stores
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowIndexingEncryptedStoresOrItems" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --Do not use automatic language detection when indexing---
        :: ----------------------------------------------------------
        echo --- Do not use automatic language detection when indexing
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AlwaysUseAutoLangDetection" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Disable ad customization with Advertising ID-------
        :: ----------------------------------------------------------
        echo --- Disable ad customization with Advertising ID
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d "0" /f 
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Turn Off Suggested Content in Settings app--------
        :: ----------------------------------------------------------
        echo --- Turn Off Suggested Content in Settings app
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /d "0" /t REG_DWORD /f
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /d "0" /t REG_DWORD /f
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /d "0" /t REG_DWORD /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable Windows Tips-------------------
        :: ----------------------------------------------------------
        echo --- Disable Windows Tips
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableSoftLanding" /t REG_DWORD /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: Disable Windows Spotlight (random wallpaper on lock screen)
        echo --- Disable Windows Spotlight (random wallpaper on lock screen)
        reg add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightFeatures" /t "REG_DWORD" /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable Microsoft consumer experiences----------
        :: ----------------------------------------------------------
        echo --- Disable Microsoft consumer experiences
        reg add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t "REG_DWORD" /d "1" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Do not allow the use of biometrics------------
        :: ----------------------------------------------------------
        echo --- Do not allow the use of biometrics
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Biometrics" /v "Enabled" /t REG_DWORD /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Do not allow users to log on using biometrics-------
        :: ----------------------------------------------------------
        echo --- Do not allow users to log on using biometrics
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Biometrics\Credential Provider" /v "Enabled" /t "REG_DWORD" /d "0" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Do not start Windows Biometric Service----------
        :: ----------------------------------------------------------
        echo --- Do not start Windows Biometric Service
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\WbioSrvc" /v "Start" /t REG_DWORD /d 4 /f
        sc stop "WbioSrvc" & sc config "WbioSrvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Windows Insider Service--------------
        :: ----------------------------------------------------------
        echo --- Disable Windows Insider Service
        sc stop "wisvc" & sc config "wisvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Do not let Microsoft try features on this build------
        :: ----------------------------------------------------------
        echo --- Do not let Microsoft try features on this build
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Disable getting preview builds of Windows---------
        :: ----------------------------------------------------------
        echo --- Disable getting preview builds of Windows
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable all settings sync-----------------
        :: ----------------------------------------------------------
        echo --- Disable all settings sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSyncOnPaidNetwork" /t REG_DWORD /d 1 /f
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" /v "SyncPolicy" /t REG_DWORD /d 5 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Application Setting Sync-------------
        :: ----------------------------------------------------------
        echo --- Disable Application Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable App Sync Setting Sync---------------
        :: ----------------------------------------------------------
        echo --- Disable App Sync Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Credentials Setting Sync-------------
        :: ----------------------------------------------------------
        echo --- Disable Credentials Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableCredentialsSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableCredentialsSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Credentials" /v "Enabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable Desktop Theme Setting Sync------------
        :: ----------------------------------------------------------
        echo --- Disable Desktop Theme Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableDesktopThemeSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableDesktopThemeSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Disable Personalization Setting Sync-----------
        :: ----------------------------------------------------------
        echo --- Disable Personalization Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisablePersonalizationSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisablePersonalizationSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable Start Layout Setting Sync-------------
        :: ----------------------------------------------------------
        echo --- Disable Start Layout Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableStartLayoutSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableStartLayoutSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Web Browser Setting Sync-------------
        :: ----------------------------------------------------------
        echo --- Disable Web Browser Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Disable Windows Setting Sync---------------
        :: ----------------------------------------------------------
        echo --- Disable Windows Setting Sync
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWindowsSettingSync" /t REG_DWORD /d 2 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWindowsSettingSyncUserOverride" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable Language Setting Sync---------------
        :: ----------------------------------------------------------
        echo --- Disable Language Setting Sync
        reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v "Enabled" /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable NET Core CLI telemetry--------------
        :: ----------------------------------------------------------
        echo --- Disable NET Core CLI telemetry
        setx DOTNET_CLI_TELEMETRY_OPTOUT 1
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable PowerShell 7+ telemetry--------------
        :: ----------------------------------------------------------
        echo --- Disable PowerShell 7+ telemetry
        setx POWERSHELL_TELEMETRY_OPTOUT 1
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable Google update service---------------
        :: ----------------------------------------------------------
        echo --- Disable Google update service
        sc stop "gupdate" & sc config "gupdate" start=disabled
        sc stop "gupdatem" & sc config "gupdatem" start=disabled
        schtasks /change /disable /tn "GoogleUpdateTaskMachineCore"
        schtasks /change /disable /tn "GoogleUpdateTaskMachineUA"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Disable Adobe Acrobat update service-----------
        :: ----------------------------------------------------------
        echo --- Disable Adobe Acrobat update service
        sc stop "AdobeARMservice" & sc config "AdobeARMservice" start=disabled
        sc stop "adobeupdateservice" & sc config "adobeupdateservice" start=disabled
        sc stop "adobeflashplayerupdatesvc" & sc config "adobeflashplayerupdatesvc" start=disabled
        schtasks /change /tn "Adobe Acrobat Update Task" /disable
        schtasks /change /tn "Adobe Flash Player Updater" /disable
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable Razer Game Scanner Service------------
        :: ----------------------------------------------------------
        echo --- Disable Razer Game Scanner Service
        sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Disable Logitech Gaming Registry Service---------
        :: ----------------------------------------------------------
        echo --- Disable Logitech Gaming Registry Service
        sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Disable Dropbox auto update service------------
        :: ----------------------------------------------------------
        echo --- Disable Dropbox auto update service
        sc stop "dbupdate" & sc config "dbupdate" start=disabled
        sc stop "dbupdatem" & sc config "dbupdatem" start=disabled
        schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineCore"
        schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineUA" 
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable visual studio telemetry--------------
        :: ----------------------------------------------------------
        echo --- Disable visual studio telemetry
        reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable Visual Studio feedback--------------
        :: ----------------------------------------------------------
        echo --- Disable Visual Studio feedback
        reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: Stop and disable Visual Studio Standard Collector Service-
        :: ----------------------------------------------------------
        echo --- Stop and disable Visual Studio Standard Collector Service
        sc stop "VSStandardCollectorService150" & sc config "VSStandardCollectorService150" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Disable SQM OS key--------------------
        :: ----------------------------------------------------------
        echo --- Disable SQM OS key
        if %PROCESSOR_ARCHITECTURE%==x86 ( REM is 32 bit?
            reg add "HKLM\SOFTWARE\Microsoft\VSCommon\14.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
            reg add "HKLM\SOFTWARE\Microsoft\VSCommon\15.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
            reg add "HKLM\SOFTWARE\Microsoft\VSCommon\16.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
        ) else (
            reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\14.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
            reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
            reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Disable SQM group policy-----------------
        :: ----------------------------------------------------------
        echo --- Disable SQM group policy
        reg add "HKLM\Software\Policies\Microsoft\VisualStudio\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Uninstall NVIDIA telemetry tasks-------------
        :: ----------------------------------------------------------
        echo --- Uninstall NVIDIA telemetry tasks
        if exist "%ProgramFiles%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL" (
            rundll32 "%PROGRAMFILES%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetryContainer
            rundll32 "%PROGRAMFILES%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetry
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Delete NVIDIA residual telemetry files----------
        :: ----------------------------------------------------------
        echo --- Delete NVIDIA residual telemetry files
        del /s %SystemRoot%\System32\DriverStore\FileRepository\NvTelemetry*.dll
        rmdir /s /q "%ProgramFiles(x86)%\NVIDIA Corporation\NvTelemetry" 2>nul
        rmdir /s /q "%ProgramFiles%\NVIDIA Corporation\NvTelemetry" 2>nul
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Opt out from NVIDIA telemetry---------------
        :: ----------------------------------------------------------
        echo --- Opt out from NVIDIA telemetry
        reg add "HKLM\SOFTWARE\NVIDIA Corporation\NvControlPanel2\Client" /v "OptInOrOutPreference" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID44231" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID64640" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID66610" /t REG_DWORD /d 0 /f 
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global\Startup" /v "SendTelemetryData" /t REG_DWORD /d 0 /f
        reg add "HKLM\SYSTEM\CurrentControlSet\services\NvTelemetryContainer" /v "Start" /t REG_DWORD /d 4 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable NVIDIA telemetry services-------------
        :: ----------------------------------------------------------
        echo --- Disable NVIDIA telemetry services
        schtasks /change /TN NvTmMon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
        schtasks /change /TN NvTmRep_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
        schtasks /change /TN NvTmRepOnLogon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Disable Visual Studio Code telemetry-----------
        :: ----------------------------------------------------------
        echo --- Disable Visual Studio Code telemetry
        PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = \"$env:APPDATA\Code\User\settings.json\"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host \"No updates. Settings file was not at $jsonfile\"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'telemetry.enableTelemetry' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Disable Visual Studio Code crash reporting--------
        :: ----------------------------------------------------------
        echo --- Disable Visual Studio Code crash reporting
        PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = \"$env:APPDATA\Code\User\settings.json\"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host \"No updates. Settings file was not at $jsonfile\"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'telemetry.enableCrashReporter' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Do not run Microsoft online experiments----------
        :: ----------------------------------------------------------
        echo --- Do not run Microsoft online experiments
        PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = \"$env:APPDATA\Code\User\settings.json\"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host \"No updates. Settings file was not at $jsonfile\"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'workbench.enableExperiments' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Disable Microsoft Office logging-------------
        :: ----------------------------------------------------------
        echo --- Disable Microsoft Office logging
        reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Outlook\Options\Mail" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Mail" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Outlook\Options\Calendar" /v "EnableCalendarLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Calendar" /v "EnableCalendarLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Word\Options" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Word\Options" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\OSM" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\OSM" /v "EnableLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\OSM" /v "EnableUpload" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\OSM" /v "EnableUpload" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Disable client telemetry-----------------
        :: ----------------------------------------------------------
        echo --- Disable client telemetry
        reg add "HKCU\SOFTWARE\Microsoft\Office\Common\ClientTelemetry" /v "DisableTelemetry" /t REG_DWORD /d 1 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\ClientTelemetry" /v "DisableTelemetry" /t REG_DWORD /d 1 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\Common\ClientTelemetry" /v "VerboseLogging" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\ClientTelemetry" /v "VerboseLogging" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Customer Experience Improvement Program----------
        :: ----------------------------------------------------------
        echo --- Customer Experience Improvement Program
        reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Common" /v "QMEnable" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common" /v "QMEnable" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Disable feedback---------------------
        :: ----------------------------------------------------------
        echo --- Disable feedback
        reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Common\Feedback" /v "Enabled" /t REG_DWORD /d 0 /f
        reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Feedback" /v "Enabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Disable telemetry agent------------------
        :: ----------------------------------------------------------
        echo --- Disable telemetry agent
        schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /DISABLE
        schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack2016" /DISABLE
        schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /DISABLE
        schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn2016" /DISABLE
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable live tile data collection-------------
        :: ----------------------------------------------------------
        echo --- Disable live tile data collection
        reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "PreventLiveTileDataCollection" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable MFU tracking-------------------
        :: ----------------------------------------------------------
        echo --- Disable MFU tracking
        reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "DisableMFUTracking" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable recent apps--------------------
        :: ----------------------------------------------------------
        echo --- Disable recent apps
        reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "DisableRecentApps" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Turn off backtracking-------------------
        :: ----------------------------------------------------------
        echo --- Turn off backtracking
        reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "TurnOffBackstack" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable Search Suggestions in Edge------------
        :: ----------------------------------------------------------
        echo --- Disable Search Suggestions in Edge
        reg add "HKLM\SOFTWARE\Policies\Microsoft\MicrosoftEdge\SearchScopes" /v "ShowSearchSuggestionsGlobal" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Disable Edge usage and crash-related data reporting (shows "Your browser is managed")
        echo --- Disable Edge usage and crash-related data reporting (shows "Your browser is managed")
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Disable sending site information (shows "Your browser is managed")
        echo --- Disable sending site information (shows "Your browser is managed")
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "SendSiteInfoToImproveServices" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Disable Geolocation in Internet Explorer---------
        :: ----------------------------------------------------------
        echo --- Disable Geolocation in Internet Explorer
        reg add "HKCU\Software\Policies\Microsoft\Internet Explorer\Geolocation" /v "PolicyDisableGeolocation" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Disable Internet Explorer InPrivate logging--------
        :: ----------------------------------------------------------
        echo --- Disable Internet Explorer InPrivate logging
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\Safety\PrivacIE" /v "DisableLogging" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable Internet Explorer CEIP--------------
        :: ----------------------------------------------------------
        echo --- Disable Internet Explorer CEIP
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\SQM" /v "DisableCustomerImprovementProgram" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Disable calling legacy WCM policies------------
        :: ----------------------------------------------------------
        echo --- Disable calling legacy WCM policies
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "CallLegacyWCMPolicies" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Disable SSLv3 fallback------------------
        :: ----------------------------------------------------------
        echo --- Disable SSLv3 fallback
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "EnableSSL3Fallback" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Disable ignoring cert errors---------------
        :: ----------------------------------------------------------
        echo --- Disable ignoring cert errors
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "PreventIgnoreCertErrors" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable Chrome Software Reporter Tool-----------
        :: ----------------------------------------------------------
        echo --- Disable Chrome Software Reporter Tool
        icacls "%localappdata%\Google\Chrome\User Data\SwReporter" /inheritance:r /deny "*S-1-1-0:(OI)(CI)(F)" "*S-1-5-7:(OI)(CI)(F)"
        cacls "%localappdata%\Google\Chrome\User Data\SwReporter" /e /c /d %username%
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "DisallowRun" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun" /v "1" /t REG_SZ /d "software_reporter_tool.exe" /f
        :: ----------------------------------------------------------
        
        
        :: Disable Chrome metrics reporting (shows "Your browser is managed")
        echo --- Disable Chrome metrics reporting (shows "Your browser is managed")
        reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Do not share scanned software data to Google (shows "Your browser is managed")
        echo --- Do not share scanned software data to Google (shows "Your browser is managed")
        reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "ChromeCleanupReportingEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: Prevent Chrome from scanning the system for cleanup (shows "Your browser is managed")
        echo --- Prevent Chrome from scanning the system for cleanup (shows "Your browser is managed")
        reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "ChromeCleanupEnabled" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Disable Firefox metrics reporting-------------
        :: ----------------------------------------------------------
        echo --- Disable Firefox metrics reporting
        reg add HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableTelemetry /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Disable default browser agent reporting policy------
        :: ----------------------------------------------------------
        echo --- Disable default browser agent reporting policy
        reg add HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableDefaultBrowserAgent /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable default browser agent reporting services-----
        :: ----------------------------------------------------------
        echo --- Disable default browser agent reporting services
        schtasks.exe /change /disable /tn "\Mozilla\Firefox Default Browser Agent 308046B0AF4A39CB"
        schtasks.exe /change /disable /tn "\Mozilla\Firefox Default Browser Agent D2CEEC440E2074BD"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Do not send Windows Media Player statistics--------
        :: ----------------------------------------------------------
        echo --- Do not send Windows Media Player statistics
        reg add "HKCU\SOFTWARE\Microsoft\MediaPlayer\Preferences" /v "UsageTracking" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable metadata retrieval----------------
        :: ----------------------------------------------------------
        echo --- Disable metadata retrieval
        reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventCDDVDMetadataRetrieval" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventMusicFileMetadataRetrieval" /t REG_DWORD /d 1 /f
        reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventRadioPresetsRetrieval" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\WMDRM" /v "DisableOnline" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---Disable Windows Media Player Network Sharing Service---
        :: ----------------------------------------------------------
        echo --- Disable Windows Media Player Network Sharing Service
        sc stop "WMPNetworkSvc" & sc config "WMPNetworkSvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable administrative shares---------------
        :: ----------------------------------------------------------
        echo --- Disable administrative shares
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "AutoShareWks" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Disable AutoPlay and AutoRun---------------
        :: ----------------------------------------------------------
        echo --- Disable AutoPlay and AutoRun
        :: 255 (0xff) means all drives
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f 
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoAutorun" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable remote Assistance-----------------
        :: ----------------------------------------------------------
        echo --- Disable remote Assistance
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowToGetHelp" /t REG_DWORD /d 0 /f
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowFullControl" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable lock screen camera----------------
        :: ----------------------------------------------------------
        echo --- Disable lock screen camera
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v "NoLockScreenCamera" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -Prevent the storage of the LAN Manager hash of passwords-
        :: ----------------------------------------------------------
        echo --- Prevent the storage of the LAN Manager hash of passwords
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "NoLMHash" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: Disable Windows Installer Always install with elevated privileges
        echo --- Disable Windows Installer Always install with elevated privileges
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v "AlwaysInstallElevated" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Prevent WinRM from using Basic Authentication-------
        :: ----------------------------------------------------------
        echo --- Prevent WinRM from using Basic Authentication
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" /v "AllowBasic" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Restrict anonymous enumeration of shares---------
        :: ----------------------------------------------------------
        echo --- Restrict anonymous enumeration of shares
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\LSA" /v "RestrictAnonymous" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Refuse less secure authentication-------------
        :: ----------------------------------------------------------
        echo --- Refuse less secure authentication
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "LmCompatibilityLevel" /t REG_DWORD /d 5 /f
        :: ----------------------------------------------------------
        
        
        :: Enable Structured Exception Handling Overwrite Protection (SEHOP)
        echo --- Enable Structured Exception Handling Overwrite Protection (SEHOP)
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Block Anonymous enumeration of SAM accounts--------
        :: ----------------------------------------------------------
        echo --- Block Anonymous enumeration of SAM accounts
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "RestrictAnonymousSAM" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---Restrict anonymous access to Named Pipes and Shares----
        :: ----------------------------------------------------------
        echo --- Restrict anonymous access to Named Pipes and Shares
        reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters" /v "RestrictNullSessAccess" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable the Windows Connect Now wizard----------
        :: ----------------------------------------------------------
        echo --- Disable the Windows Connect Now wizard
        reg add "HKLM\Software\Policies\Microsoft\Windows\WCN\UI" /v "DisableWcnUi" /t REG_DWORD /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableFlashConfigRegistrar" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableInBand802DOT11Registrar" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableUPnPRegistrar" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableWPDRegistrar" /t REG_DWORD /d 0 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "EnableRegistrars" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Disable unsafe SMBv1 protocol---------------
        :: ----------------------------------------------------------
        echo --- Disable unsafe SMBv1 protocol
        dism /online /Disable-Feature /FeatureName:"SMB1Protocol" /NoRestart
        dism /Online /Disable-Feature /FeatureName:"SMB1Protocol-Client" /NoRestart
        dism /Online /Disable-Feature /FeatureName:"SMB1Protocol-Server" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Disable PowerShell 2.0 against downgrade attacks-----
        :: ----------------------------------------------------------
        echo --- Disable PowerShell 2.0 against downgrade attacks
        dism /online /Disable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2Root" /NoRestart
        dism /online /Disable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable lock screen app notifications-----------
        :: ----------------------------------------------------------
        echo --- Disable lock screen app notifications
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "DisableLockScreenAppNotifications" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Disable Live Tiles push notifications-----------
        :: ----------------------------------------------------------
        echo --- Disable Live Tiles push notifications
        reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoTileApplicationNotification" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Turn off "Look For An App In The Store" option------
        :: ----------------------------------------------------------
        echo --- Turn off "Look For An App In The Store" option
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoUseStoreOpenWith" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Do not show recently used files in Quick Access------
        :: ----------------------------------------------------------
        echo --- Do not show recently used files in Quick Access
        if %PROCESSOR_ARCHITECTURE%==x86 ( REM is 32 bit?
            reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /d 0 /t REG_DWORD /f
        ) else (
            reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}" /f
            reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}" /f
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Disable online tips--------------------
        :: ----------------------------------------------------------
        echo --- Disable online tips
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "AllowOnlineTips" /t REG_DWORD /d 0 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------Turn off Internet File Association service--------
        :: ----------------------------------------------------------
        echo --- Turn off Internet File Association service
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInternetOpenWith" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Turn off the "Order Prints" picture task---------
        :: ----------------------------------------------------------
        echo --- Turn off the "Order Prints" picture task
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoOnlinePrintsWizard" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Disable the file and folder Publish to Web option-----
        :: ----------------------------------------------------------
        echo --- Disable the file and folder Publish to Web option
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoPublishingWizard" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---Prevent downloading a list of providers for wizards----
        :: ----------------------------------------------------------
        echo --- Prevent downloading a list of providers for wizards
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoWebServices" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Do not keep history of recently opened documents-----
        :: ----------------------------------------------------------
        echo --- Do not keep history of recently opened documents
        reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----Clear history of recently opened documents on exit----
        :: ----------------------------------------------------------
        echo --- Clear history of recently opened documents on exit
        reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ClearRecentDocsOnExit" /t REG_DWORD /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Delivery Optimization (P2P Windows Updates)--------
        :: ----------------------------------------------------------
        echo --- Delivery Optimization (P2P Windows Updates)
        sc stop "DoSvc" & sc config "DoSvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Program Compatibility Assistant Service----------
        :: ----------------------------------------------------------
        echo --- Program Compatibility Assistant Service
        sc stop "PcaSvc" & sc config "PcaSvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Downloaded Maps Manager------------------
        :: ----------------------------------------------------------
        echo --- Downloaded Maps Manager
        sc stop "MapsBroker" & sc config "MapsBroker" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Microsoft Retail Demo experience-------------
        :: ----------------------------------------------------------
        echo --- Microsoft Retail Demo experience
        sc stop "RetailDemo" & sc config "RetailDemo" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Windows Push Notification Service-------------
        :: ----------------------------------------------------------
        echo --- Windows Push Notification Service
        sc stop "WpnService" & sc config "WpnService" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------User Data Storage (UnistoreSvc) Service----------
        :: ----------------------------------------------------------
        echo --- User Data Storage (UnistoreSvc) Service
        sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------Sync Host (OneSyncSvc) Service Service----------
        :: ----------------------------------------------------------
        echo --- Sync Host (OneSyncSvc) Service Service
        sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------App Connector app---------------------
        :: ----------------------------------------------------------
        echo --- App Connector app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Appconnector' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Uninstall Cortana app-------------------
        :: ----------------------------------------------------------
        echo --- Uninstall Cortana app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.549981C3F5F10' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Windows Maps app---------------------
        :: ----------------------------------------------------------
        echo --- Windows Maps app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsMaps' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------MSN Weather app----------------------
        :: ----------------------------------------------------------
        echo --- MSN Weather app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingWeather' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------MSN Sports app----------------------
        :: ----------------------------------------------------------
        echo --- MSN Sports app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingSports' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------MSN News app-----------------------
        :: ----------------------------------------------------------
        echo --- MSN News app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingNews' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------MSN Money app-----------------------
        :: ----------------------------------------------------------
        echo --- MSN Money app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingFinance' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------My Office app-----------------------
        :: ----------------------------------------------------------
        echo --- My Office app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftOfficeHub' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Microsoft Advertising app-----------------
        :: ----------------------------------------------------------
        echo --- Microsoft Advertising app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Advertising.Xaml' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Network Speed Test app------------------
        :: ----------------------------------------------------------
        echo --- Network Speed Test app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.NetworkSpeedTest' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: Microsoft AAD Broker Plugin app (breaks Office app authentication)
        echo --- Microsoft AAD Broker Plugin app (breaks Office app authentication)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.AAD.BrokerPlugin'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---Bio enrollment app (breaks biometric authentication)---
        :: ----------------------------------------------------------
        echo --- Bio enrollment app (breaks biometric authentication)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.BioEnrollment'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Microsoft Edge (Legacy) app----------------
        :: ----------------------------------------------------------
        echo --- Microsoft Edge (Legacy) app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.MicrosoftEdge'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------Microsoft Edge (Legacy) Dev Tools Client app-------
        :: ----------------------------------------------------------
        echo --- Microsoft Edge (Legacy) Dev Tools Client app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.MicrosoftEdgeDevToolsClient'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Win32 Web View Host app / Desktop App Web Viewer-----
        :: ----------------------------------------------------------
        echo --- Win32 Web View Host app / Desktop App Web Viewer
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Win32WebViewHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Microsoft PPI Projection app---------------
        :: ----------------------------------------------------------
        echo --- Microsoft PPI Projection app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.PPIProjection'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: Cloud Experience Host app (breaks Microsoft cloud/corporate sign in)
        echo --- Cloud Experience Host app (breaks Microsoft cloud/corporate sign in)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.CloudExperienceHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: Content Delivery Manager app (automatically installs apps)
        echo --- Content Delivery Manager app (automatically installs apps)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.ContentDeliveryManager'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Holographic First Run app-----------------
        :: ----------------------------------------------------------
        echo --- Holographic First Run app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.Holographic.FirstRun'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Windows 10 Family Safety / Parental Controls app-----
        :: ----------------------------------------------------------
        echo --- Windows 10 Family Safety / Parental Controls app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.ParentalControls'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: My People / People Bar App on taskbar (People Experience Host)
        echo --- My People / People Bar App on taskbar (People Experience Host)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.PeopleExperienceHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Secondary Tile Experience app---------------
        :: ----------------------------------------------------------
        echo --- Secondary Tile Experience app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.SecondaryTileExperience'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: Secure Assessment Browser app (breaks Microsoft Intune/Graph)
        echo --- Secure Assessment Browser app (breaks Microsoft Intune/Graph)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.SecureAssessmentBrowser'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Kill OneDrive process-------------------
        :: ----------------------------------------------------------
        echo --- Kill OneDrive process
        taskkill /f /im OneDrive.exe
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Uninstall OneDrive--------------------
        :: ----------------------------------------------------------
        echo --- Uninstall OneDrive
        if %PROCESSOR_ARCHITECTURE%==x86 (
            %SystemRoot%\System32\OneDriveSetup.exe /uninstall 2>nul
        ) else (
            %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall 2>nul
        )
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Remove OneDrive leftovers-----------------
        :: ----------------------------------------------------------
        echo --- Remove OneDrive leftovers
        rd "%UserProfile%\OneDrive" /q /s
        rd "%LocalAppData%\Microsoft\OneDrive" /q /s
        rd "%ProgramData%\Microsoft OneDrive" /q /s
        rd "%SystemDrive%\OneDriveTemp" /q /s
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Delete OneDrive shortcuts-----------------
        :: ----------------------------------------------------------
        echo --- Delete OneDrive shortcuts
        del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft OneDrive.lnk" /s /f /q
        del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" /s /f /q
        del "%USERPROFILE%\Links\OneDrive.lnk" /s /f /q
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Disable usage of OneDrive-----------------
        :: ----------------------------------------------------------
        echo --- Disable usage of OneDrive
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSyncNGSC" /d 1 /f
        reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSync" /d 1 /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---Prevent automatic OneDrive install for current user----
        :: ----------------------------------------------------------
        echo --- Prevent automatic OneDrive install for current user
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----Prevent automatic OneDrive install for new users-----
        :: ----------------------------------------------------------
        echo --- Prevent automatic OneDrive install for new users
        reg load "HKU\Default" "%SystemDrive%\Users\Default\NTUSER.DAT" 
        reg delete "HKU\Default\software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
        reg unload "HKU\Default"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Remove OneDrive from explorer menu------------
        :: ----------------------------------------------------------
        echo --- Remove OneDrive from explorer menu
        reg delete "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
        reg delete "HKCR\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
        reg add "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
        reg add "HKCR\Wow6432Node\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Delete all OneDrive related Services-----------
        :: ----------------------------------------------------------
        echo --- Delete all OneDrive related Services
        for /f "tokens=1 delims=," %%x in ('schtasks /query /fo csv ^| find "OneDrive"') do schtasks /Delete /TN %%x /F
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Delete OneDrive path from registry------------
        :: ----------------------------------------------------------
        echo --- Delete OneDrive path from registry
        reg delete "HKCU\Environment" /v "OneDrive" /f
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --OneSync capability (breaks Mail, People, and Calendar)--
        :: ----------------------------------------------------------
        echo --- OneSync capability (breaks Mail, People, and Calendar)
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'OneCoreUAP.OneSync*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------Change NTP (time) server to pool.ntp.org---------
        :: ----------------------------------------------------------
        echo --- Change NTP (time) server to pool.ntp.org
        :: Configure time source
        w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
        :: Restart time service if running
        SC queryex "w32time"|Find "STATE"|Find /v "RUNNING">Nul||(
            net stop w32time
            net start w32time
        )
        :: Sync now
        w32tm /config /update
        w32tm /resync
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Microsoft 3D Builder app-----------------
        :: ----------------------------------------------------------
        echo --- Microsoft 3D Builder app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.3DBuilder' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------3D Viewer app-----------------------
        :: ----------------------------------------------------------
        echo --- 3D Viewer app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Microsoft3DViewer' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Groove Music app---------------------
        :: ----------------------------------------------------------
        echo --- Groove Music app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.ZuneMusic' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Movies and TV app---------------------
        :: ----------------------------------------------------------
        echo --- Movies and TV app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.ZuneVideo' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Your Phone Companion app-----------------
        :: ----------------------------------------------------------
        echo --- Your Phone Companion app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsPhone' | Remove-AppxPackage"
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Phone' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Communications - Phone app----------------
        :: ----------------------------------------------------------
        echo --- Communications - Phone app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.CommsPhone' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------Your Phone app----------------------
        :: ----------------------------------------------------------
        echo --- Your Phone app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.YourPhone' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Paint 3D app-----------------------
        :: ----------------------------------------------------------
        echo --- Paint 3D app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MSPaint' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Microsoft People app-------------------
        :: ----------------------------------------------------------
        echo --- Microsoft People app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.People' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Print 3D app-----------------------
        :: ----------------------------------------------------------
        echo --- Print 3D app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Print3D' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------------Shazam app------------------------
        :: ----------------------------------------------------------
        echo --- Shazam app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ShazamEntertainmentLtd.Shazam' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Candy Crush Saga app-------------------
        :: ----------------------------------------------------------
        echo --- Candy Crush Saga app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'king.com.CandyCrushSaga' | Remove-AppxPackage"
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'king.com.CandyCrushSodaSaga' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------------Flipboard app-----------------------
        :: ----------------------------------------------------------
        echo --- Flipboard app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Flipboard.Flipboard' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Twitter app------------------------
        :: ----------------------------------------------------------
        echo --- Twitter app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage '9E2F88E3.Twitter' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------iHeartRadio app----------------------
        :: ----------------------------------------------------------
        echo --- iHeartRadio app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ClearChannelRadioDigital.iHeartRadio' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Duolingo app-----------------------
        :: ----------------------------------------------------------
        echo --- Duolingo app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'D5EA27B7.Duolingo-LearnLanguagesforFree' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Photoshop Express app-------------------
        :: ----------------------------------------------------------
        echo --- Photoshop Express app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'AdobeSystemIncorporated.AdobePhotoshop' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Pandora app------------------------
        :: ----------------------------------------------------------
        echo --- Pandora app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'PandoraMediaInc.29680B314EFC2' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Eclipse Manager app--------------------
        :: ----------------------------------------------------------
        echo --- Eclipse Manager app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage '46928bounde.EclipseManager' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Code Writer app----------------------
        :: ----------------------------------------------------------
        echo --- Code Writer app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ActiproSoftwareLLC.562882FEEB491' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Spotify app------------------------
        :: ----------------------------------------------------------
        echo --- Spotify app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'SpotifyAB.SpotifyMusic' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------------Skype app-------------------------
        :: ----------------------------------------------------------
        echo --- Skype app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.SkypeApp' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------GroupMe app------------------------
        :: ----------------------------------------------------------
        echo --- GroupMe app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.GroupMe10' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Windows Voice Recorder app----------------
        :: ----------------------------------------------------------
        echo --- Windows Voice Recorder app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsSoundRecorder' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Microsoft Photos app-------------------
        :: ----------------------------------------------------------
        echo --- Microsoft Photos app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Photos' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Mail and Calendar app-------------------
        :: ----------------------------------------------------------
        echo --- Mail and Calendar app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'microsoft.windowscommunicationsapps' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Microsoft Sticky Notes app----------------
        :: ----------------------------------------------------------
        echo --- Microsoft Sticky Notes app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftStickyNotes' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Microsoft Solitaire Collection app------------
        :: ----------------------------------------------------------
        echo --- Microsoft Solitaire Collection app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftSolitaireCollection' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Mobile Plans app---------------------
        :: ----------------------------------------------------------
        echo --- Mobile Plans app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.OneConnect' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Windows Alarms and Clock app---------------
        :: ----------------------------------------------------------
        echo --- Windows Alarms and Clock app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsAlarms' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Windows Camera app--------------------
        :: ----------------------------------------------------------
        echo --- Windows Camera app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsCamera' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Mixed Reality Portal app-----------------
        :: ----------------------------------------------------------
        echo --- Mixed Reality Portal app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MixedReality.Portal' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Microsoft Messaging app------------------
        :: ----------------------------------------------------------
        echo --- Microsoft Messaging app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Messaging' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Microsoft Tips app--------------------
        :: ----------------------------------------------------------
        echo --- Microsoft Tips app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Getstarted' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Get Help app-----------------------
        :: ----------------------------------------------------------
        echo --- Get Help app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.GetHelp' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------Remote Desktop app--------------------
        :: ----------------------------------------------------------
        echo --- Remote Desktop app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.RemoteDesktop' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Microsoft To Do app--------------------
        :: ----------------------------------------------------------
        echo --- Microsoft To Do app
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Todos' | Remove-AppxPackage"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------Windows Print 3D app-------------------
        :: ----------------------------------------------------------
        echo --- Windows Print 3D app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.Print3D'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------------Print UI app-----------------------
        :: ----------------------------------------------------------
        echo --- Print UI app
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.PrintDialog'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, \"$env:LOCALAPPDATA\Packages\$($package.PackageFamilyName)\"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path \"$dir\") ) { continue; } cmd /c ('takeown /f \"' + $dir + '\" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls \"' + $dir + '\" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName =  $file.FullName + '.OLD'; Write-Host \"Rename '$($file.FullName)' to '$newName'\"; Move-Item -LiteralPath \"$($file.FullName)\" -Destination \"$newName\" -Force; } }"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Print and Document Services feature------------
        :: ----------------------------------------------------------
        echo --- Print and Document Services feature
        dism /Online /Disable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Work Folders Client feature----------------
        :: ----------------------------------------------------------
        echo --- Work Folders Client feature
        dism /Online /Disable-Feature /FeatureName:"WorkFolders-Client" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Internet Printing Client-----------------
        :: ----------------------------------------------------------
        echo --- Internet Printing Client
        dism /Online /Disable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------LPD Print Service---------------------
        :: ----------------------------------------------------------
        echo --- LPD Print Service
        dism /Online /Disable-Feature /FeatureName:"LPDPrintService" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------LPR Port Monitor feature-----------------
        :: ----------------------------------------------------------
        echo --- LPR Port Monitor feature
        dism /Online /Disable-Feature /FeatureName:"Printing-Foundation-LPRPortMonitor" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------Microsoft Print to PDF feature--------------
        :: ----------------------------------------------------------
        echo --- Microsoft Print to PDF feature
        dism /Online /Disable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------XPS Services feature-------------------
        :: ----------------------------------------------------------
        echo --- XPS Services feature
        dism /Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------XPS Viewer feature--------------------
        :: ----------------------------------------------------------
        echo --- XPS Viewer feature
        dism /Online /Disable-Feature /FeatureName:"Xps-Foundation-Xps-Viewer" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Direct Play feature (revert)---------------
        :: ----------------------------------------------------------
        echo --- Direct Play feature (revert)
        dism /Online /Enable-Feature /FeatureName:"DirectPlay" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Legacy Components feature (revert)------------
        :: ----------------------------------------------------------
        echo --- Legacy Components feature (revert)
        dism /Online /Enable-Feature /FeatureName:"LegacyComponents" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Media Features feature (revert)--------------
        :: ----------------------------------------------------------
        echo --- Media Features feature (revert)
        dism /Online /Enable-Feature /FeatureName:"MediaPlayback" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------------Scan Management feature------------------
        :: ----------------------------------------------------------
        echo --- Scan Management feature
        dism /Online /Disable-Feature /FeatureName:"ScanManagementConsole" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Windows Fax and Scan feature---------------
        :: ----------------------------------------------------------
        echo --- Windows Fax and Scan feature
        dism /Online /Disable-Feature /FeatureName:"FaxServicesClientPackage" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Internet Explorer feature-----------------
        :: ----------------------------------------------------------
        echo --- Internet Explorer feature
        dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
        dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
        dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------------Telnet Client feature-------------------
        :: ----------------------------------------------------------
        echo --- Telnet Client feature
        dism /Online /Disable-Feature /FeatureName:"TelnetClient" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------Net.TCP Port Sharing feature---------------
        :: ----------------------------------------------------------
        echo --- Net.TCP Port Sharing feature
        dism /Online /Disable-Feature /FeatureName:"WCF-TCP-PortSharing45" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: --------------------SMB Direct feature--------------------
        :: ----------------------------------------------------------
        echo --- SMB Direct feature
        dism /Online /Disable-Feature /FeatureName:"SmbDirect" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------------TFTP Client feature--------------------
        :: ----------------------------------------------------------
        echo --- TFTP Client feature
        dism /Online /Disable-Feature /FeatureName:"TFTP" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ---------------------Hyper-V feature----------------------
        :: ----------------------------------------------------------
        echo --- Hyper-V feature
        dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-All" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Hyper-V GUI Management Tools feature-----------
        :: ----------------------------------------------------------
        echo --- Hyper-V GUI Management Tools feature
        dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-Clients" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Hyper-V Management Tools feature-------------
        :: ----------------------------------------------------------
        echo --- Hyper-V Management Tools feature
        dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Tools-All" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------Hyper-V Module for Windows PowerShell feature-------
        :: ----------------------------------------------------------
        echo --- Hyper-V Module for Windows PowerShell feature
        dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-PowerShell" /NoRestart
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------Steps Recorder capability-----------------
        :: ----------------------------------------------------------
        echo --- Steps Recorder capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'App.StepsRecorder*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Windows Fax and Scan capability--------------
        :: ----------------------------------------------------------
        echo --- Windows Fax and Scan capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.Fax.Scan*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -----------Print Management Console capability------------
        :: ----------------------------------------------------------
        echo --- Print Management Console capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.Management.Console*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ----------------OpenSSH client capability-----------------
        :: ----------------------------------------------------------
        echo --- OpenSSH client capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'OpenSSH.Client*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Enterprise Cloud Print capability-------------
        :: ----------------------------------------------------------
        echo --- Enterprise Cloud Print capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.EnterpriseCloudPrint*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: -------------Mopria Cloud Service capability--------------
        :: ----------------------------------------------------------
        echo --- Mopria Cloud Service capability
        PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.MopriaCloudService*' | Remove-WindowsCapability -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Developer Mode capability (revert)------------
        :: ----------------------------------------------------------
        echo --- Developer Mode capability (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$capability = Get-WindowsCapability -Online -Name 'Tools.DeveloperMode.Core*'; Add-WindowsCapability -Name \"$capability.Name\" -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Graphics Tools capability (revert)------------
        :: ----------------------------------------------------------
        echo --- Graphics Tools capability (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$capability = Get-WindowsCapability -Online -Name 'Tools.Graphics.DirectX*'; Add-WindowsCapability -Name \"$capability.Name\" -Online"
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------HEIF Image Extensions app (revert)------------
        :: ----------------------------------------------------------
        echo --- HEIF Image Extensions app (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = Get-AppxPackage -AllUsers 'Microsoft.HEIFImageExtension'; if (!$package) { Write-Error \"Cannot reinstall 'Microsoft.HEIFImageExtension'\" -ErrorAction Stop } $manifest = $package.InstallLocation + '\AppxManifest.xml'; Add-AppxPackage -DisableDevelopmentMode -Register \"$manifest\""
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------VP9 Video Extensions app (revert)-------------
        :: ----------------------------------------------------------
        echo --- VP9 Video Extensions app (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = Get-AppxPackage -AllUsers 'Microsoft.VP9VideoExtensions'; if (!$package) { Write-Error \"Cannot reinstall 'Microsoft.VP9VideoExtensions'\" -ErrorAction Stop } $manifest = $package.InstallLocation + '\AppxManifest.xml'; Add-AppxPackage -DisableDevelopmentMode -Register \"$manifest\""
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Web Media Extensions app (revert)-------------
        :: ----------------------------------------------------------
        echo --- Web Media Extensions app (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = Get-AppxPackage -AllUsers 'Microsoft.WebMediaExtensions'; if (!$package) { Write-Error \"Cannot reinstall 'Microsoft.WebMediaExtensions'\" -ErrorAction Stop } $manifest = $package.InstallLocation + '\AppxManifest.xml'; Add-AppxPackage -DisableDevelopmentMode -Register \"$manifest\""
        :: ----------------------------------------------------------
        
        
        :: ----------------------------------------------------------
        :: ------------Webp Image Extensions app (revert)------------
        :: ----------------------------------------------------------
        echo --- Webp Image Extensions app (revert)
        PowerShell -ExecutionPolicy Unrestricted -Command "$package = Get-AppxPackage -AllUsers 'Microsoft.WebpImageExtension'; if (!$package) { Write-Error \"Cannot reinstall 'Microsoft.WebpImageExtension'\" -ErrorAction Stop } $manifest = $package.InstallLocation + '\AppxManifest.xml'; Add-AppxPackage -DisableDevelopmentMode -Register \"$manifest\""
        :: ----------------------------------------------------------
        
        :: ----------------------------------------------------------
        :: ------------Install Chocolatey------------
        :: ----------------------------------------------------------
        echo --- Install Chocolatey
        Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
        :: ----------------------------------------------------------
        
        :: ----------------------------------------------------------
        :: ------------Install Chocolatey GUI------------
        :: ----------------------------------------------------------
        echo --- Install Chocolatey GUI
        choco install chocolateygui
        :: ----------------------------------------------------------
        
        pause
        exit /b 0

Additional information

Deployment does not work from forked repository

The problem is that deploy.yaml depends on a secret that cannot be read when it's triggered by PR.

When you create a pull request from forked repository to base repository, the workflow will be triggered on base repository. (documentation)
Itโ€™s by designed that encrypted secrets are not passed to the runner when a workflow is triggered from a forked repository. (documentation)

However we need the secret there otherwise creating release does not trigger AWS deployment (as documented) here.

Need to solve that ๐Ÿค”

Enhancement - Win 10 Customizing

No issues at all that I have run into. So far, I am absolutely loving this script builder!

Is there any chance there could be an added section to customize and/or add applications like alternative browsers, zip managers, pdf readers, Malwarebytes, everything (app), etc

It would also be great to allow for the customization of the the start menu and/or settings menu in the notifications bar.

One last time, I just want to express how awesome project is and how excited I am to see future developments to it! Thank you for all your hard work!

I cannot revert most used apps to default

Hello bro,
after applying your BAT i cannot set "show most used apps" to on state and when im tried configure it using settings app start menu configuration it says "some settings are managed by your organization" and button becomes innactive
Also i tried revert it using guides from internet but these guides doesn't work, button still innactive.

[BUG]: can't sign in again

Describe the bug

I can't sign in to my windows account again, I need to sign in to use the store and I don't know which scripts should I use to bring sign in back.

OS

Windows 10 Home

Screenshots

RQ77EwBPES

Scripts

Click to open @echo off :: https://privacy.sexy โ€” v0.10.0 โ€” Sun, 21 Mar 2021 22:50:01 GMT :: Ensure admin privileges fltmc >nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo Right-click on the script and select "Run as administrator". pause & exit 1 ) exit 0 )

:: ----------------------------------------------------------
:: ------------------Clear Listary indexes-------------------
:: ----------------------------------------------------------
echo --- Clear Listary indexes
del /f /s /q %appdata%\Listary\UserData > nul
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Clear Java cache---------------------
:: ----------------------------------------------------------
echo --- Clear Java cache
rd /s /q "%APPDATA%\Sun\Java\Deployment\cache"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Clear Flash traces--------------------
:: ----------------------------------------------------------
echo --- Clear Flash traces
rd /s /q "%APPDATA%\Macromedia\Flash Player"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Clear Steam dumps, logs, and traces------------
:: ----------------------------------------------------------
echo --- Clear Steam dumps, logs, and traces
del /f /q %ProgramFiles(x86)%\Steam\Dumps
del /f /q %ProgramFiles(x86)%\Steam\Traces
del /f /q %ProgramFiles(x86)%\Steam\appcache*.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Clear Visual Studio telemetry and feedback data------
:: ----------------------------------------------------------
echo --- Clear Visual Studio telemetry and feedback data
rmdir /s /q "%AppData%\vstelemetry" 2>nul
rmdir /s /q "%LocalAppData%\Microsoft\VSApplicationInsights" 2>nul
rmdir /s /q "%ProgramData%\Microsoft\VSApplicationInsights" 2>nul
rmdir /s /q "%Temp%\Microsoft\VSApplicationInsights" 2>nul
rmdir /s /q "%Temp%\VSFaultInfo" 2>nul
rmdir /s /q "%Temp%\VSFeedbackPerfWatsonData" 2>nul
rmdir /s /q "%Temp%\VSFeedbackVSRTCLogs" 2>nul
rmdir /s /q "%Temp%\VSRemoteControl" 2>nul
rmdir /s /q "%Temp%\VSTelem" 2>nul
rmdir /s /q "%Temp%\VSTelem.Out" 2>nul
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Clear Dotnet CLI telemetry----------------
:: ----------------------------------------------------------
echo --- Clear Dotnet CLI telemetry
rmdir /s /q "%USERPROFILE%.dotnet\TelemetryStorageService" 2>nul
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Clear regedit last key------------------
:: ----------------------------------------------------------
echo --- Clear regedit last key
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Clear regedit favorites------------------
:: ----------------------------------------------------------
echo --- Clear regedit favorites
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Clear list of recent programs opened-----------
:: ----------------------------------------------------------
echo --- Clear list of recent programs opened
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRU" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRULegacy" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Clear Adobe Media Browser MRU---------------
:: ----------------------------------------------------------
echo --- Clear Adobe Media Browser MRU
reg delete "HKCU\Software\Adobe\MediaBrowser\MRU" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Clear MSPaint MRU---------------------
:: ----------------------------------------------------------
echo --- Clear MSPaint MRU
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Clear Wordpad MRU---------------------
:: ----------------------------------------------------------
echo --- Clear Wordpad MRU
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Wordpad\Recent File List" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Clear Map Network Drive MRU MRU--------------
:: ----------------------------------------------------------
echo --- Clear Map Network Drive MRU MRU
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Clear Windows Search Assistant history----------
:: ----------------------------------------------------------
echo --- Clear Windows Search Assistant history
reg delete "HKCU\Software\Microsoft\Search Assistant\ACMru" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Clear list of Recent Files Opened, by Filetype------
:: ----------------------------------------------------------
echo --- Clear list of Recent Files Opened, by Filetype
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Clear windows media player recent files and URLs-----
:: ----------------------------------------------------------
echo --- Clear windows media player recent files and URLs
reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f
reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentURLList" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\MediaPlayer\Player\RecentFileList" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\MediaPlayer\Player\RecentURLList" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Clear Most Recent Application's Use of DirectX------
:: ----------------------------------------------------------
echo --- Clear Most Recent Application's Use of DirectX
reg delete "HKCU\Software\Microsoft\Direct3D\MostRecentApplication" /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Direct3D\MostRecentApplication" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Clear Windows Run MRU & typedpaths------------
:: ----------------------------------------------------------
echo --- Clear Windows Run MRU ^& typedpaths
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths" /va /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Clear recently accessed files---------------
:: ----------------------------------------------------------
echo --- Clear recently accessed files
del /f /q "%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Clear user pins----------------------
:: ----------------------------------------------------------
echo --- Clear user pins
del /f /q "%APPDATA%\Microsoft\Windows\Recent\CustomDestinations*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Clear Internet Explorer traces--------------
:: ----------------------------------------------------------
echo --- Clear Internet Explorer traces
del /f /q "%localappdata%\Microsoft\Windows\INetCache\IE*"
reg delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\TypedURLs" /va /f
reg delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\TypedURLsTime" /va /f
rd /s /q "%localappdata%\Microsoft\Internet Explorer"
rd /s /q "%APPDATA%\Microsoft\Windows\Cookies"
rd /s /q "%USERPROFILE%\Cookies"
rd /s /q "%USERPROFILE%\Local Settings\Traces"
rd /s /q "%localappdata%\Temporary Internet Files"
rd /s /q "%localappdata%\Microsoft\Windows\Temporary Internet Files"
rd /s /q "%localappdata%\Microsoft\Windows\INetCookies\PrivacIE"
rd /s /q "%localappdata%\Microsoft\Feeds Cache"
rd /s /q "%localappdata%\Microsoft\InternetExplorer\DOMStore"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Clear Google Chrome traces----------------
:: ----------------------------------------------------------
echo --- Clear Google Chrome traces
del /f /q "%localappdata%\Google\Software Reporter Tool*.log"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data"
rd /s /q "%localappdata%\Google\Chrome\User Data"
rd /s /q "%localappdata%\Google\CrashReports""
rd /s /q "%localappdata%\Google\Chrome\User Data\Crashpad\reports""
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Clear Opera traces--------------------
:: ----------------------------------------------------------
echo --- Clear Opera traces
rd /s /q "%USERPROFILE%\AppData\Local\Opera\Opera"
rd /s /q "%APPDATA%\Opera\Opera"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\Opera\Opera"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Clear Safari traces--------------------
:: ----------------------------------------------------------
echo --- Clear Safari traces
rd /s /q "%USERPROFILE%\AppData\Local\Apple Computer\Safari\Traces"
rd /s /q "%APPDATA%\Apple Computer\Safari"
del /q /s /f "%USERPROFILE%\AppData\Local\Apple Computer\Safari\Cache.db"
del /q /s /f "%USERPROFILE%\AppData\Local\Apple Computer\Safari\WebpageIcons.db"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\Apple Computer\Safari\Traces"
del /q /s /f "%USERPROFILE%\Local Settings\Application Data\Apple Computer\Safari\Cache.db"
del /q /s /f "%USERPROFILE%\Local Settings\Application Data\Safari\WebpageIcons.db"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Clear thumbnail cache-------------------
:: ----------------------------------------------------------
echo --- Clear thumbnail cache
del /f /s /q /a %LocalAppData%\Microsoft\Windows\Explorer*.db
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Clear Windows temp files-----------------
:: ----------------------------------------------------------
echo --- Clear Windows temp files
del /f /q %localappdata%\Temp*
rd /s /q "%WINDIR%\Temp"
rd /s /q "%TEMP%"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Clear main telemetry file-----------------
:: ----------------------------------------------------------
echo --- Clear main telemetry file
if exist "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" (
takeown /f "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /r /d y
icacls "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /grant administrators:F /t
echo "" > "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
echo Clear successful: "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
) else (
echo "Main telemetry file does not exist. Good!"
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Clear Event Logs in Event Viewer-------------
:: ----------------------------------------------------------
echo --- Clear Event Logs in Event Viewer
REM https://social.technet.microsoft.com/Forums/en-US/f6788f7d-7d04-41f1-a64e-3af9f700e4bd/failed-to-clear-log-microsoftwindowsliveidoperational-access-is-denied?forum=win10itprogeneral
wevtutil sl Microsoft-Windows-LiveId/Operational /ca:O:BAG:SYD:(A;;0x1;;;SY)(A;;0x5;;;BA)(A;;0x1;;;LA)
for /f "tokens=*" %%i in ('wevtutil.exe el') DO (
echo Deleting event log: "%%i"
wevtutil.exe cl %1 "%%i"
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Clear Optional Component Manager and COM+ components logs-
:: ----------------------------------------------------------
echo --- Clear Optional Component Manager and COM+ components logs
del /f /q %SystemRoot%\comsetup.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Clear Distributed Transaction Coordinator logs------
:: ----------------------------------------------------------
echo --- Clear Distributed Transaction Coordinator logs
del /f /q %SystemRoot%\DtcInstall.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Clear Pending File Rename Operations logs---------
:: ----------------------------------------------------------
echo --- Clear Pending File Rename Operations logs
del /f /q %SystemRoot%\PFRO.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Clear Windows Deployment Upgrade Process Logs-------
:: ----------------------------------------------------------
echo --- Clear Windows Deployment Upgrade Process Logs
del /f /q %SystemRoot%\setupact.log
del /f /q %SystemRoot%\setuperr.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Clear Windows Setup Logs-----------------
:: ----------------------------------------------------------
echo --- Clear Windows Setup Logs
del /f /q %SystemRoot%\setupapi.log
del /f /q %SystemRoot%\Panther*
del /f /q %SystemRoot%\inf\setupapi.app.log
del /f /q %SystemRoot%\inf\setupapi.dev.log
del /f /q %SystemRoot%\inf\setupapi.offline.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Clear Windows System Assessment Tool logs---------
:: ----------------------------------------------------------
echo --- Clear Windows System Assessment Tool logs
del /f /q %SystemRoot%\Performance\WinSAT\winsat.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Clear Password change events---------------
:: ----------------------------------------------------------
echo --- Clear Password change events
del /f /q %SystemRoot%\debug\PASSWD.LOG
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Clear user web cache database---------------
:: ----------------------------------------------------------
echo --- Clear user web cache database
del /f /q %localappdata%\Microsoft\Windows\WebCache*.*
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Clear system temp folder when no one is logged in-----
:: ----------------------------------------------------------
echo --- Clear system temp folder when no one is logged in
del /f /q %SystemRoot%\ServiceProfiles\LocalService\AppData\Local\Temp*.*
:: ----------------------------------------------------------

:: Clear DISM (Deployment Image Servicing and Management) Logs
echo --- Clear DISM (Deployment Image Servicing and Management) Logs
del /f /q %SystemRoot%\Logs\CBS\CBS.log
del /f /q %SystemRoot%\Logs\DISM\DISM.log
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Clear WUAgent (Windows Update History) logs--------
:: ----------------------------------------------------------
echo --- Clear WUAgent (Windows Update History) logs
setlocal EnableDelayedExpansion
SET /A wuau_service_running=0
SC queryex "wuauserv"|Find "STATE"|Find /v "RUNNING">Nul||(
SET /A wuau_service_running=1
net stop wuauserv
)
del /q /s /f "%SystemRoot%\SoftwareDistribution"
IF !wuau_service_running! == 1 (
net start wuauserv
)
endlocal
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Clear Server-initiated Healing Events Logs--------
:: ----------------------------------------------------------
echo --- Clear Server-initiated Healing Events Logs
del /f /q "%SystemRoot%\Logs\SIH*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Common Language Runtime Logs---------------
:: ----------------------------------------------------------
echo --- Common Language Runtime Logs
del /f /q "%LocalAppData%\Microsoft\CLR_v4.0\UsageTraces*"
del /f /q "%LocalAppData%\Microsoft\CLR_v4.0_32\UsageTraces*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Network Setup Service Events Logs-------------
:: ----------------------------------------------------------
echo --- Network Setup Service Events Logs
del /f /q "%SystemRoot%\Logs\NetSetup*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disk Cleanup tool (Cleanmgr.exe) Logs-----------
:: ----------------------------------------------------------
echo --- Disk Cleanup tool (Cleanmgr.exe) Logs
del /f /q "%SystemRoot%\System32\LogFiles\setupcln*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Clear Windows update and SFC scan logs----------
:: ----------------------------------------------------------
echo --- Clear Windows update and SFC scan logs
del /f /q %SystemRoot%\Temp\CBS*
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Clear Windows Update Medic Service logs----------
:: ----------------------------------------------------------
echo --- Clear Windows Update Medic Service logs
takeown /f %SystemRoot%\Logs\waasmedic /r /d y
icacls %SystemRoot%\Logs\waasmedic /grant administrators:F /t
rd /s /q %SystemRoot%\Logs\waasmedic
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Clear Cryptographic Services Traces------------
:: ----------------------------------------------------------
echo --- Clear Cryptographic Services Traces
del /f /q %SystemRoot%\System32\catroot2\dberr.txt
del /f /q %SystemRoot%\System32\catroot2.log
del /f /q %SystemRoot%\System32\catroot2.jrs
del /f /q %SystemRoot%\System32\catroot2.edb
del /f /q %SystemRoot%\System32\catroot2.chk
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Windows Update Events Logs----------------
:: ----------------------------------------------------------
echo --- Windows Update Events Logs
del /f /q "%SystemRoot%\Logs\SIH*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Windows Update Logs--------------------
:: ----------------------------------------------------------
echo --- Windows Update Logs
del /f /q "%SystemRoot%\Traces\WindowsUpdate*"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Clear credentials from Windows Credential Manager-----
:: ----------------------------------------------------------
echo --- Clear credentials from Windows Credential Manager
cmdkey.exe /list > "%TEMP%\List.txt"
findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt"
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H
del "%TEMP%\List.txt" /s /f /q
del "%TEMP%\tokensonly.txt" /s /f /q
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Delete controversial default0 user------------
:: ----------------------------------------------------------
echo --- Delete controversial default0 user
net user defaultuser0 /delete 2>nul
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Empty trash bin----------------------
:: ----------------------------------------------------------
echo --- Empty trash bin
Powershell -Command "$bin = (New-Object -ComObject Shell.Application).NameSpace(10);$bin.items() | ForEach { Write-Host "Deleting $($.Name) from Recycle Bin"; Remove-Item $.Path -Recurse -Force}"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Enable Reset Base in Dism Component Store---------
:: ----------------------------------------------------------
echo --- Enable Reset Base in Dism Component Store
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DisableResetbase" /t "REG_DWORD" /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Clear volume backups (shadow copies)-----------
:: ----------------------------------------------------------
echo --- Clear volume backups (shadow copies)
vssadmin delete shadows /all /quiet
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Remove Default Apps Associations-------------
:: ----------------------------------------------------------
echo --- Remove Default Apps Associations
dism /online /Remove-DefaultAppAssociations
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Clear previous Windows installations-----------
:: ----------------------------------------------------------
echo --- Clear previous Windows installations
if exist "%SystemDrive%\Windows.old" (
takeown /f "%SystemDrive%\Windows.old" /a /r /d y
icacls "%SystemDrive%\Windows.old" /grant administrators:F /t
rd /s /q "%SystemDrive%\Windows.old"
echo Deleted previous installation from "%SystemDrive%\Windows.old"
) else (
echo No previous Windows installation has been found
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Disable Customer Experience Improvement (CEIP/SQM)----
:: ----------------------------------------------------------
echo --- Disable Customer Experience Improvement (CEIP/SQM)
reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Disable Application Impact Telemetry (AIT)--------
:: ----------------------------------------------------------
echo --- Disable Application Impact Telemetry (AIT)
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable diagnostics telemetry---------------
:: ----------------------------------------------------------
echo --- Disable diagnostics telemetry
reg add "HKLM\SYSTEM\ControlSet001\Services\DiagTrack" /v "Start" /t REG_DWORD /d 4 /f
reg add "HKLM\SYSTEM\ControlSet001\Services\dmwappushsvc" /v "Start" /t REG_DWORD /d 4 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\dmwappushservice" /v "Start" /t REG_DWORD /d 4 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service" /v "Start" /t REG_DWORD /d 4 /f
sc stop "DiagTrack" & sc config "DiagTrack" start=disabled
sc stop "dmwappushservice" & sc config "dmwappushservice" start=disabled
sc stop "diagnosticshub.standardcollector.service" & sc config "diagnosticshub.standardcollector.service" start=disabled
sc stop "diagsvc" & sc config "diagsvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable Customer Experience Improvement Program------
:: ----------------------------------------------------------
echo --- Disable Customer Experience Improvement Program
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Disable telemetry in data collection policy--------
:: ----------------------------------------------------------
echo --- Disable telemetry in data collection policy
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /d 0 /t REG_DWORD /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "LimitEnhancedDiagnosticDataWindowsAnalytics" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Disable license telemetry-----------------
:: ----------------------------------------------------------
echo --- Disable license telemetry
reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v "NoGenTicket" /t "REG_DWORD" /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Disable error reporting------------------
:: ----------------------------------------------------------
echo --- Disable error reporting
:: Disable Windows Error Reporting (WER)
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t "REG_DWORD" /d "1" /f
:: DefaultConsent / 1 - Always ask (default) / 2 - Parameters only / 3 - Parameters and safe data / 4 - All data
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d "0" /f
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultOverrideBehavior" /t REG_DWORD /d "1" /f
:: Disable WER sending second-level data
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d "1" /f
:: Disable WER crash dialogs, popups
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d "1" /f
schtasks /Change /TN "Microsoft\Windows\ErrorDetails\EnableErrorDetailsUpdate" /Disable
schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable
:: Disable Windows Error Reporting Service
sc stop "WerSvc" & sc config "WerSvc" start=disabled
sc stop "wercplsupport" & sc config "wercplsupport" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Disable devicecensus.exe (telemetry) task---------
:: ----------------------------------------------------------
echo --- Disable devicecensus.exe (telemetry) task
schtasks /change /TN "Microsoft\Windows\Device Information\Device" /disable
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Disable devicecensus.exe (telemetry) process-------
:: ----------------------------------------------------------
echo --- Disable devicecensus.exe (telemetry) process
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'DeviceCensus.exe'" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
:: ----------------------------------------------------------

:: Disable sending information to Customer Experience Improvement Program
echo --- Disable sending information to Customer Experience Improvement Program
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /disable
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable Application Impact Telemetry Agent task------
:: ----------------------------------------------------------
echo --- Disable Application Impact Telemetry Agent task
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /disable
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --Disable "Disable apps to improve performance" reminder--
:: ----------------------------------------------------------
echo --- Disable "Disable apps to improve performance" reminder
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /disable
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Disable Microsoft Compatibility Appraiser task------
:: ----------------------------------------------------------
echo --- Disable Microsoft Compatibility Appraiser task
schtasks /change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /disable
:: ----------------------------------------------------------

:: Disable CompatTelRunner.exe (Microsoft Compatibility Appraiser) process
echo --- Disable CompatTelRunner.exe (Microsoft Compatibility Appraiser) process
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'CompatTelRunner.exe'" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Deny app access to location----------------
:: ----------------------------------------------------------
echo --- Deny app access to location
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v "Value" /d "Deny" /f
:: For older Windows (before 1903)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /v "Status" /d "0" /t REG_DWORD /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessLocation" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessLocation_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessLocation_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessLocation_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Deny app access to account info, name, and picture----
:: ----------------------------------------------------------
echo --- Deny app access to account info, name, and picture
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation" /v "Value" /d "Deny" /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Deny app access to motion data--------------
:: ----------------------------------------------------------
echo --- Deny app access to motion data
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\activity" /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMotion" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMotion_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMotion_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMotion_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Deny app access to phone-----------------
:: ----------------------------------------------------------
echo --- Deny app access to phone
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessPhone" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessPhone_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessPhone_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessPhone_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Deny app access to trusted devices------------
:: ----------------------------------------------------------
echo --- Deny app access to trusted devices
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTrustedDevices" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTrustedDevices_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTrustedDevices_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTrustedDevices_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Deny app sync with devices (unpaired, beacons, TVs, etc.)-
:: ----------------------------------------------------------
echo --- Deny app sync with devices (unpaired, beacons, TVs, etc.)
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsSyncWithDevices" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsSyncWithDevices_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsSyncWithDevices_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsSyncWithDevices_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: Deny apps share and sync non-explicitly paired wireless devices over uPnP
echo --- Deny apps share and sync non-explicitly paired wireless devices over uPnP
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" /t REG_SZ /v "Value" /d "Deny" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Deny app access to diagnostics info about your other apps-
:: ----------------------------------------------------------
echo --- Deny app access to diagnostics info about your other apps
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appDiagnostics" /v "Value" /d "Deny" /t REG_SZ /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsGetDiagnosticInfo" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsGetDiagnosticInfo_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsGetDiagnosticInfo_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsGetDiagnosticInfo_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Deny app access to your contacts-------------
:: ----------------------------------------------------------
echo --- Deny app access to your contacts
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\contacts" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{7D7E8402-7C54-4821-A34E-AEEFD62DED93}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessContacts" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessContacts_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessContacts_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessContacts_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Deny app access to Notifications-------------
:: ----------------------------------------------------------
echo --- Deny app access to Notifications
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{52079E78-A92B-413F-B213-E8FE35712E72}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessNotifications" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessNotifications_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessNotifications_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessNotifications_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Deny app access to Calendar----------------
:: ----------------------------------------------------------
echo --- Deny app access to Calendar
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appointments" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{D89823BA-7180-4B81-B50C-7E471E6121A3}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCalendar" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCalendar_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCalendar_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCalendar_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Deny app access to call history--------------
:: ----------------------------------------------------------
echo --- Deny app access to call history
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCallHistory" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{8BC668CF-7728-45BD-93F8-CF2B3B41D7AB}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCallHistory" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCallHistory_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCallHistory_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCallHistory_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Deny app access to email-----------------
:: ----------------------------------------------------------
echo --- Deny app access to email
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\email" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{9231CB4C-BF57-4AF3-8C55-FDA7BFCC04C5}" /t REG_SZ /v "Value" /d DENY /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessEmail" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessEmail_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessEmail_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessEmail_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Deny app access to tasks-----------------
:: ----------------------------------------------------------
echo --- Deny app access to tasks
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userDataTasks" /v "Value" /d "Deny" /t REG_SZ /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTasks" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTasks_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTasks_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTasks_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Deny app access to messaging (SMS / MMS)---------
:: ----------------------------------------------------------
echo --- Deny app access to messaging (SMS / MMS)
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\chat" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{992AFA70-6F47-4148-B3E9-3003349C1548}" /t REG_SZ /v "Value" /d "Deny" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{21157C1F-2651-4CC1-90CA-1F28B02263F6}" /t REG_SZ /v "Value" /d "Deny" /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMessaging" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMessaging_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMessaging_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMessaging_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Deny app access to radios-----------------
:: ----------------------------------------------------------
echo --- Deny app access to radios
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\radios" /v "Value" /d "Deny" /t REG_SZ /f
:: For older Windows (before 1903)
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /t REG_SZ /v "Value" /d DENY /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessRadios" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessRadios_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessRadios_ForceAllowTheseApps" /t REG_MULTI_SZ /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessRadios_ForceDenyTheseApps" /t REG_MULTI_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Deny app access to bluetooth devices-----------
:: ----------------------------------------------------------
echo --- Deny app access to bluetooth devices
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\bluetoothSync" /v "Value" /d "Deny" /t REG_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Deny app access to Document folder------------
:: ----------------------------------------------------------
echo --- Deny app access to Document folder
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary" /v "Value" /d "Deny" /t REG_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Deny app access to Pictures folder------------
:: ----------------------------------------------------------
echo --- Deny app access to Pictures folder
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\picturesLibrary" /v "Value" /d "Deny" /t REG_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Deny app access to Videos folder-------------
:: ----------------------------------------------------------
echo --- Deny app access to Videos folder
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\videosLibrary" /v "Value" /d "Deny" /t REG_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Deny app access to other filesystem------------
:: ----------------------------------------------------------
echo --- Deny app access to other filesystem
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess" /v "Value" /d "Deny" /t REG_SZ /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable apps and Cortana to activate with voice------
:: ----------------------------------------------------------
echo --- Disable apps and Cortana to activate with voice
reg add "HKCU\Software\Microsoft\Speech_OneCore\Settings\VoiceActivation\UserPreferenceForAllApps" /v "AgentActivationEnabled" /t REG_DWORD /d 0 /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsActivateWithVoice" /t REG_DWORD /d 2 /f
:: ----------------------------------------------------------

:: Disable apps and Cortana to activate with voice when sytem is locked
echo --- Disable apps and Cortana to activate with voice when sytem is locked
reg add "HKCU\Software\Microsoft\Speech_OneCore\Settings\VoiceActivation\UserPreferenceForAllApps" /v "AgentActivationOnLockScreenEnabled" /t REG_DWORD /d 0 /f
:: Using GPO (re-activation through GUI is not possible)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsActivateWithVoiceAboveLock" /t REG_DWORD /d 2 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Turn off Windows Location Provider------------
:: ----------------------------------------------------------
echo --- Turn off Windows Location Provider
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableWindowsLocationProvider" /t REG_DWORD /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Turn off location scripting----------------
:: ----------------------------------------------------------
echo --- Turn off location scripting
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocationScripting" /t REG_DWORD /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Turn off location---------------------
:: ----------------------------------------------------------
echo --- Turn off location
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /d "1" /t REG_DWORD /f
:: For older Windows (before 1903)
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "SensorPermissionState" /d "0" /t REG_DWORD /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "Value" /t REG_SZ /d "Deny" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Do not allow search to use location------------
:: ----------------------------------------------------------
echo --- Do not allow search to use location
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowSearchToUseLocation" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable web search in search bar-------------
:: ----------------------------------------------------------
echo --- Disable web search in search bar
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --Do not search the web or display web results in Search--
:: ----------------------------------------------------------
echo --- Do not search the web or display web results in Search
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Disable Bing search--------------------
:: ----------------------------------------------------------
echo --- Disable Bing search
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Do not allow Cortana-------------------
:: ----------------------------------------------------------
echo --- Do not allow Cortana
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Do not allow Cortana experience--------------
:: ----------------------------------------------------------
echo --- Do not allow Cortana experience
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" /v "value" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: Do not allow search and Cortana to search cloud sources like OneDrive and SharePoint
echo --- Do not allow search and Cortana to search cloud sources like OneDrive and SharePoint
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCloudSearch" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: Disable Cortana speech interaction while the system is locked
echo --- Disable Cortana speech interaction while the system is locked
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortanaAboveLock" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Opt out from Cortana consent---------------
:: ----------------------------------------------------------
echo --- Opt out from Cortana consent
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "CortanaConsent" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Do not allow Cortana to be enabled------------
:: ----------------------------------------------------------
echo --- Do not allow Cortana to be enabled
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CanCortanaBeEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -Disable Cortana (Internet search results in start menu)--
:: ----------------------------------------------------------
echo --- Disable Cortana (Internet search results in start menu)
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Remove the Cortana taskbar icon--------------
:: ----------------------------------------------------------
echo --- Remove the Cortana taskbar icon
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v "ShowCortanaButton" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Cortana in ambient mode--------------
:: ----------------------------------------------------------
echo --- Disable Cortana in ambient mode
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaInAmbientMode" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Prevent Cortana from displaying history----------
:: ----------------------------------------------------------
echo --- Prevent Cortana from displaying history
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "HistoryViewEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Prevent Cortana from using device history---------
:: ----------------------------------------------------------
echo --- Prevent Cortana from using device history
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "DeviceHistoryEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disable "Hey Cortana" voice activation----------
:: ----------------------------------------------------------
echo --- Disable "Hey Cortana" voice activation
reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationOn" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationDefaultOn" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -Disable Cortana listening to commands on Windows key + C-
:: ----------------------------------------------------------
echo --- Disable Cortana listening to commands on Windows key + C
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "VoiceShortcut" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable using Cortana even when device is locked-----
:: ----------------------------------------------------------
echo --- Disable using Cortana even when device is locked
reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "VoiceActivationEnableAboveLockscreen" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Disable automatic update of Speech Data----------
:: ----------------------------------------------------------
echo --- Disable automatic update of Speech Data
reg add "HKCU\Software\Microsoft\Speech_OneCore\Preferences" /v "ModelDownloadAllowed" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Disable Cortana voice support during Windows setup----
:: ----------------------------------------------------------
echo --- Disable Cortana voice support during Windows setup
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "DisableVoice" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable search indexing encrypted items / stores-----
:: ----------------------------------------------------------
echo --- Disable search indexing encrypted items / stores
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowIndexingEncryptedStoresOrItems" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --Do not use automatic language detection when indexing---
:: ----------------------------------------------------------
echo --- Do not use automatic language detection when indexing
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AlwaysUseAutoLangDetection" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Disable ad customization with Advertising ID-------
:: ----------------------------------------------------------
echo --- Disable ad customization with Advertising ID
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Disable targeted tips-------------------
:: ----------------------------------------------------------
echo --- Disable targeted tips
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableSoftLanding" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightFeatures" /t "REG_DWORD" /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t "REG_DWORD" /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Turn Off Suggested Content in Settings app--------
:: ----------------------------------------------------------
echo --- Turn Off Suggested Content in Settings app
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v "SubscribedContent-338393Enabled" /d "0" /t REG_DWORD /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v "SubscribedContent-353694Enabled" /d "0" /t REG_DWORD /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v "SubscribedContent-353696Enabled" /d "0" /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Do not allow the use of biometrics------------
:: ----------------------------------------------------------
echo --- Do not allow the use of biometrics
reg add "HKLM\SOFTWARE\Policies\Microsoft\Biometrics" /v "Enabled" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Do not allow users to log on using biometrics-------
:: ----------------------------------------------------------
echo --- Do not allow users to log on using biometrics
reg add "HKLM\SOFTWARE\Policies\Microsoft\Biometrics\Credential Provider" /v "Enabled" /t "REG_DWORD" /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Do not start Windows Biometric Service----------
:: ----------------------------------------------------------
echo --- Do not start Windows Biometric Service
reg add "HKLM\SYSTEM\CurrentControlSet\Services\WbioSrvc" /v "Start" /t REG_DWORD /d 4 /f
sc stop "WbioSrvc" & sc config "WbioSrvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Windows Insider Service--------------
:: ----------------------------------------------------------
echo --- Disable Windows Insider Service
sc stop "wisvc" & sc config "wisvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Do not let Microsoft try features on this build------
:: ----------------------------------------------------------
echo --- Do not let Microsoft try features on this build
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Disable getting preview builds of Windows---------
:: ----------------------------------------------------------
echo --- Disable getting preview builds of Windows
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Remove "Windows Insider Program" from Settings------
:: ----------------------------------------------------------
echo --- Remove "Windows Insider Program" from Settings
reg add "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /t "REG_DWORD" /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable cloud speech recognition-------------
:: ----------------------------------------------------------
echo --- Disable cloud speech recognition
reg add "HKCU\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /v "HasAccepted" /t "REG_DWORD" /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Application Setting Sync-------------
:: ----------------------------------------------------------
echo --- Disable Application Setting Sync
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSync" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSyncUserOverride" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable App Sync Setting Sync---------------
:: ----------------------------------------------------------
echo --- Disable App Sync Setting Sync
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSync" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSyncUserOverride" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Web Browser Setting Sync-------------
:: ----------------------------------------------------------
echo --- Disable Web Browser Setting Sync
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSync" /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSyncUserOverride" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Disable active probing (pings to MSFT NCSI server)----
:: ----------------------------------------------------------
echo --- Disable active probing (pings to MSFT NCSI server)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v "EnableActiveProbing" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Opt out from Windows privacy consent-----------
:: ----------------------------------------------------------
echo --- Opt out from Windows privacy consent
reg add "HKCU\SOFTWARE\Microsoft\Personalization\Settings" /v "AcceptedPrivacyPolicy" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Disable Windows feedback-----------------
:: ----------------------------------------------------------
echo --- Disable Windows feedback
reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f
reg delete "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "PeriodInNanoSeconds" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Disable text and handwriting collection----------
:: ----------------------------------------------------------
echo --- Disable text and handwriting collection
reg add "HKCU\Software\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization" /v "AllowInputPersonalization" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /v "HarvestContacts" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Turn off sensors---------------------
:: ----------------------------------------------------------
echo --- Turn off sensors
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableSensors" /t REG_DWORD /d "1" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Disable Wi-Fi sense--------------------
:: ----------------------------------------------------------
echo --- Disable Wi-Fi sense
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v "value" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v "value" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" /v "AutoConnectAllowedOEM" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Hide most used apps (tracks app launch)----------
:: ----------------------------------------------------------
echo --- Hide most used apps (tracks app launch)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /d 0 /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Disable Inventory Collector----------------
:: ----------------------------------------------------------
echo --- Disable Inventory Collector
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableInventory" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Disable Website Access of Language List----------
:: ----------------------------------------------------------
echo --- Disable Website Access of Language List
reg add "HKCU\Control Panel\International\User Profile" /v "HttpAcceptLanguageOptOut" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable Auto Downloading Maps---------------
:: ----------------------------------------------------------
echo --- Disable Auto Downloading Maps
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Maps" /v "AllowUntriggeredNetworkTrafficOnSettingsPage" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Maps" /v "AutoDownloadAndUpdateMapData" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Disable steps recorder------------------
:: ----------------------------------------------------------
echo --- Disable steps recorder
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable game screen recording---------------
:: ----------------------------------------------------------
echo --- Disable game screen recording
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Windows DRM internet access------------
:: ----------------------------------------------------------
echo --- Disable Windows DRM internet access
reg add "HKLM\SOFTWARE\Policies\Microsoft\WMDRM" /v "DisableOnline" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable feedback on write (sending typing info)------
:: ----------------------------------------------------------
echo --- Disable feedback on write (sending typing info)
reg add "HKLM\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Disable Activity Feed-------------------
:: ----------------------------------------------------------
echo --- Disable Activity Feed
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableActivityFeed" /d "0" /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable visual studio telemetry--------------
:: ----------------------------------------------------------
echo --- Disable visual studio telemetry
reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable Visual Studio feedback--------------
:: ----------------------------------------------------------
echo --- Disable Visual Studio feedback
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Stop and disable Visual Studio Standard Collector Service-
:: ----------------------------------------------------------
echo --- Stop and disable Visual Studio Standard Collector Service
sc stop "VSStandardCollectorService150" & sc config "VSStandardCollectorService150" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Disable SQM OS key--------------------
:: ----------------------------------------------------------
echo --- Disable SQM OS key
if %PROCESSOR_ARCHITECTURE%==x86 ( REM is 32 bit?
reg add "HKLM\SOFTWARE\Microsoft\VSCommon\14.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\VSCommon\15.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\VSCommon\16.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
) else (
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\14.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Disable SQM group policy-----------------
:: ----------------------------------------------------------
echo --- Disable SQM group policy
reg add "HKLM\Software\Policies\Microsoft\VisualStudio\SQM" /v "OptIn" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Do not send Watson events-----------------
:: ----------------------------------------------------------
echo --- Do not send Watson events
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting" /v "DisableGenericReports" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Disable Malicious Software Reporting tool diagnostic data-
:: ----------------------------------------------------------
echo --- Disable Malicious Software Reporting tool diagnostic data
reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontReportInfectionInformation" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: Disable local setting override for reporting to Microsoft MAPS
echo --- Disable local setting override for reporting to Microsoft MAPS
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "LocalSettingOverrideSpynetReporting" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Turn off Windows Defender SpyNet reporting--------
:: ----------------------------------------------------------
echo --- Turn off Windows Defender SpyNet reporting
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SpynetReporting" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Do not send file samples for further analysis-------
:: ----------------------------------------------------------
echo --- Do not send file samples for further analysis
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Uninstall NVIDIA telemetry tasks-------------
:: ----------------------------------------------------------
echo --- Uninstall NVIDIA telemetry tasks
if exist "%ProgramFiles%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL" (
rundll32 "%PROGRAMFILES%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetryContainer
rundll32 "%PROGRAMFILES%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetry
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Delete NVIDIA residual telemetry files----------
:: ----------------------------------------------------------
echo --- Delete NVIDIA residual telemetry files
del /s %SystemRoot%\System32\DriverStore\FileRepository\NvTelemetry*.dll
rmdir /s /q "%ProgramFiles(x86)%\NVIDIA Corporation\NvTelemetry" 2>nul
rmdir /s /q "%ProgramFiles%\NVIDIA Corporation\NvTelemetry" 2>nul
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Opt out from NVIDIA telemetry---------------
:: ----------------------------------------------------------
echo --- Opt out from NVIDIA telemetry
reg add "HKLM\SOFTWARE\NVIDIA Corporation\NvControlPanel2\Client" /v "OptInOrOutPreference" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID44231" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID64640" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\FTS" /v "EnableRID66610" /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global\Startup" /v "SendTelemetryData" /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\services\NvTelemetryContainer" /v "Start" /t REG_DWORD /d 4 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable NVIDIA telemetry services-------------
:: ----------------------------------------------------------
echo --- Disable NVIDIA telemetry services
schtasks /change /TN NvTmMon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
schtasks /change /TN NvTmRep_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
schtasks /change /TN NvTmRepOnLogon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8} /DISABLE
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Visual Studio Code telemetry-----------
:: ----------------------------------------------------------
echo --- Disable Visual Studio Code telemetry
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'telemetry.enableTelemetry' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Disable Visual Studio Code crash reporting--------
:: ----------------------------------------------------------
echo --- Disable Visual Studio Code crash reporting
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'telemetry.enableCrashReporter' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Do not run Microsoft online experiments----------
:: ----------------------------------------------------------
echo --- Do not run Microsoft online experiments
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'workbench.enableExperiments' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Choose manual updates over automatic updates-------
:: ----------------------------------------------------------
echo --- Choose manual updates over automatic updates
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'update.mode' -Value 'manual' -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: Show Release Notes from Microsoft online service after an update
echo --- Show Release Notes from Microsoft online service after an update
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'update.showReleaseNotes' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: Automatically check extensions from Microsoft online service
echo --- Automatically check extensions from Microsoft online service
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'extensions.autoCheckUpdates' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Fetch recommendations from Microsoft only on demand----
:: ----------------------------------------------------------
echo --- Fetch recommendations from Microsoft only on demand
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'extensions.showRecommendationsOnlyOnDemand' -Value $true -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --Automatically fetch git commits from remote repository--
:: ----------------------------------------------------------
echo --- Automatically fetch git commits from remote repository
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'git.autofetch' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Fetch package information from NPM and Bower-------
:: ----------------------------------------------------------
echo --- Fetch package information from NPM and Bower
PowerShell -ExecutionPolicy Unrestricted -Command "$jsonfile = "$env:APPDATA\Code\User\settings.json"; if (!(Test-Path $jsonfile -PathType Leaf)) { Write-Host "No updates. Settings file was not at $jsonfile"; exit 0; } $json = Get-Content $jsonfile | Out-String | ConvertFrom-Json; $json | Add-Member -Type NoteProperty -Name 'npm.fetchOnlinePackageInfo' -Value $false -Force; $json | ConvertTo-Json | Set-Content $jsonfile;"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Microsoft Office logging-------------
:: ----------------------------------------------------------
echo --- Disable Microsoft Office logging
reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Outlook\Options\Mail" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Mail" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Outlook\Options\Calendar" /v "EnableCalendarLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Calendar" /v "EnableCalendarLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Word\Options" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Word\Options" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\OSM" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\OSM" /v "EnableLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\OSM" /v "EnableUpload" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\OSM" /v "EnableUpload" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Disable client telemetry-----------------
:: ----------------------------------------------------------
echo --- Disable client telemetry
reg add "HKCU\SOFTWARE\Microsoft\Office\Common\ClientTelemetry" /v "DisableTelemetry" /t REG_DWORD /d 1 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\ClientTelemetry" /v "DisableTelemetry" /t REG_DWORD /d 1 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\Common\ClientTelemetry" /v "VerboseLogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\ClientTelemetry" /v "VerboseLogging" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Customer Experience Improvement Program----------
:: ----------------------------------------------------------
echo --- Customer Experience Improvement Program
reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Common" /v "QMEnable" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common" /v "QMEnable" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Disable feedback---------------------
:: ----------------------------------------------------------
echo --- Disable feedback
reg add "HKCU\SOFTWARE\Microsoft\Office\15.0\Common\Feedback" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Feedback" /v "Enabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Disable telemetry agent------------------
:: ----------------------------------------------------------
echo --- Disable telemetry agent
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /DISABLE
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack2016" /DISABLE
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /DISABLE
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn2016" /DISABLE
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable Subscription Heartbeat--------------
:: ----------------------------------------------------------
echo --- Disable Subscription Heartbeat
schtasks /change /TN "Microsoft\Office\Office 15 Subscription Heartbeat" /DISABLE
schtasks /change /TN "Microsoft\Office\Office 16 Subscription Heartbeat" /DISABLE
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable live tile data collection-------------
:: ----------------------------------------------------------
echo --- Disable live tile data collection
reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "PreventLiveTileDataCollection" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Disable MFU tracking-------------------
:: ----------------------------------------------------------
echo --- Disable MFU tracking
reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "DisableMFUTracking" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Disable recent apps--------------------
:: ----------------------------------------------------------
echo --- Disable recent apps
reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "DisableRecentApps" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Turn off backtracking-------------------
:: ----------------------------------------------------------
echo --- Turn off backtracking
reg add "HKCU\Software\Policies\Microsoft\Windows\EdgeUI" /v "TurnOffBackstack" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable Search Suggestions in Edge------------
:: ----------------------------------------------------------
echo --- Disable Search Suggestions in Edge
reg add "HKLM\SOFTWARE\Policies\Microsoft\MicrosoftEdge\SearchScopes" /v "ShowSearchSuggestionsGlobal" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Disable Edge usage and crash-related data reporting----
:: ----------------------------------------------------------
echo --- Disable Edge usage and crash-related data reporting
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable sending site information-------------
:: ----------------------------------------------------------
echo --- Disable sending site information
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "SendSiteInfoToImproveServices" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Disable Automatic Installation of Microsoft Edge Chromium-
:: ----------------------------------------------------------
echo --- Disable Automatic Installation of Microsoft Edge Chromium
reg add "HKLM\SOFTWARE\Microsoft\EdgeUpdate" /v "DoNotUpdateToEdgeWithChromium" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Disable Geolocation in Internet Explorer---------
:: ----------------------------------------------------------
echo --- Disable Geolocation in Internet Explorer
reg add "HKCU\Software\Policies\Microsoft\Internet Explorer\Geolocation" /v "PolicyDisableGeolocation" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Disable Internet Explorer InPrivate logging--------
:: ----------------------------------------------------------
echo --- Disable Internet Explorer InPrivate logging
reg add "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\Safety\PrivacIE" /v "DisableLogging" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable Internet Explorer CEIP--------------
:: ----------------------------------------------------------
echo --- Disable Internet Explorer CEIP
reg add "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\SQM" /v "DisableCustomerImprovementProgram" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable calling legacy WCM policies------------
:: ----------------------------------------------------------
echo --- Disable calling legacy WCM policies
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "CallLegacyWCMPolicies" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Disable SSLv3 fallback------------------
:: ----------------------------------------------------------
echo --- Disable SSLv3 fallback
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "EnableSSL3Fallback" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Disable ignoring cert errors---------------
:: ----------------------------------------------------------
echo --- Disable ignoring cert errors
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v "PreventIgnoreCertErrors" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disable Chrome Software Reporter Tool-----------
:: ----------------------------------------------------------
echo --- Disable Chrome Software Reporter Tool
icacls "%localappdata%\Google\Chrome\User Data\SwReporter" /inheritance:r /deny "*S-1-1-0:(OI)(CI)(F)" "*S-1-5-7:(OI)(CI)(F)"
cacls "%localappdata%\Google\Chrome\User Data\SwReporter" /e /c /d %username%
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "DisallowRun" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun" /v "1" /t REG_SZ /d "software_reporter_tool.exe" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable Chrome metrics reporting-------------
:: ----------------------------------------------------------
echo --- Disable Chrome metrics reporting
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Do not share scanned software data to Google-------
:: ----------------------------------------------------------
echo --- Do not share scanned software data to Google
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "ChromeCleanupReportingEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Prevent Chrome from scanning the system for cleanup----
:: ----------------------------------------------------------
echo --- Prevent Chrome from scanning the system for cleanup
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "ChromeCleanupEnabled" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable Firefox metrics reporting-------------
:: ----------------------------------------------------------
echo --- Disable Firefox metrics reporting
reg add HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableTelemetry /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Disable default browser agent reporting policy------
:: ----------------------------------------------------------
echo --- Disable default browser agent reporting policy
reg add HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableDefaultBrowserAgent /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable default browser agent reporting services-----
:: ----------------------------------------------------------
echo --- Disable default browser agent reporting services
schtasks.exe /change /disable /tn "\Mozilla\Firefox Default Browser Agent 308046B0AF4A39CB"
schtasks.exe /change /disable /tn "\Mozilla\Firefox Default Browser Agent D2CEEC440E2074BD"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Do not send Windows Media Player statistics--------
:: ----------------------------------------------------------
echo --- Do not send Windows Media Player statistics
reg add "HKCU\SOFTWARE\Microsoft\MediaPlayer\Preferences" /v "UsageTracking" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Disable metadata retrieval----------------
:: ----------------------------------------------------------
echo --- Disable metadata retrieval
reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventCDDVDMetadataRetrieval" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventMusicFileMetadataRetrieval" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventRadioPresetsRetrieval" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\WMDRM" /v "DisableOnline" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Disable dows Media Player Network Sharing Service-----
:: ----------------------------------------------------------
echo --- Disable dows Media Player Network Sharing Service
sc stop "WMPNetworkSvc" & sc config "WMPNetworkSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable NET Core CLI telemetry--------------
:: ----------------------------------------------------------
echo --- Disable NET Core CLI telemetry
setx DOTNET_CLI_TELEMETRY_OPTOUT 1
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Disable PowerShell 7+ telemetry--------------
:: ----------------------------------------------------------
echo --- Disable PowerShell 7+ telemetry
setx POWERSHELL_TELEMETRY_OPTOUT 1
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable Google update service---------------
:: ----------------------------------------------------------
echo --- Disable Google update service
sc stop "gupdate" & sc config "gupdate" start=disabled
sc stop "gupdatem" & sc config "gupdatem" start=disabled
schtasks /change /disable /tn "GoogleUpdateTaskMachineCore"
schtasks /change /disable /tn "GoogleUpdateTaskMachineUA"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Adobe Acrobat update service-----------
:: ----------------------------------------------------------
echo --- Disable Adobe Acrobat update service
sc stop "AdobeARMservice" & sc config "AdobeARMservice" start=disabled
sc stop "adobeupdateservice" & sc config "adobeupdateservice" start=disabled
sc stop "adobeflashplayerupdatesvc" & sc config "adobeflashplayerupdatesvc" start=disabled
schtasks /change /tn "Adobe Acrobat Update Task" /disable
schtasks /change /tn "Adobe Flash Player Updater" /disable
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable Razer Game Scanner Service------------
:: ----------------------------------------------------------
echo --- Disable Razer Game Scanner Service
sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Disable Logitech Gaming Registry Service---------
:: ----------------------------------------------------------
echo --- Disable Logitech Gaming Registry Service
sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Disable CCleaner Monitoring----------------
:: ----------------------------------------------------------
echo --- Disable CCleaner Monitoring
reg add "HKCU\Software\Piriform\CCleaner" /v "Monitoring" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Piriform\CCleaner" /v "HelpImproveCCleaner" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Piriform\CCleaner" /v "SystemMonitoring" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Piriform\CCleaner" /v "UpdateAuto" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Piriform\CCleaner" /v "UpdateCheck" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Piriform\CCleaner" /v "CheckTrialOffer" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)HealthCheck" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)QuickClean" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)QuickCleanIpm" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)GetIpmForTrial" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)SoftwareUpdater" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Piriform\CCleaner" /v "(Cfg)SoftwareUpdaterIpm" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Dropbox auto update service------------
:: ----------------------------------------------------------
echo --- Disable Dropbox auto update service
sc stop "dbupdate" & sc config "dbupdate" start=disabled
sc stop "dbupdatem" & sc config "dbupdatem" start=disabled
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineCore"
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineUA"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Spectre variant 2 and meltdown (own OS)----------
:: ----------------------------------------------------------
echo --- Spectre variant 2 and meltdown (own OS)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d 3 /f
wmic cpu get name | findstr "Intel" >nul && (
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 0 /f
)
wmic cpu get name | findstr "AMD" >nul && (
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 64 /f
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Spectre variant 2 and meltdown (HyperV)----------
:: ----------------------------------------------------------
echo --- Spectre variant 2 and meltdown (HyperV)
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable unsafe SMBv1 protocol---------------
:: ----------------------------------------------------------
echo --- Disable unsafe SMBv1 protocol
dism /online /Disable-Feature /FeatureName:"SMB1Protocol" /NoRestart
dism /Online /Disable-Feature /FeatureName:"SMB1Protocol-Client" /NoRestart
dism /Online /Disable-Feature /FeatureName:"SMB1Protocol-Server" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Disable PowerShell 2.0 against downgrade attacks-----
:: ----------------------------------------------------------
echo --- Disable PowerShell 2.0 against downgrade attacks
dism /online /Disable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2Root" /NoRestart
dism /online /Disable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Disable administrative shares---------------
:: ----------------------------------------------------------
echo --- Disable administrative shares
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "AutoShareWks" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Force enable data execution prevention (DEP)-------
:: ----------------------------------------------------------
echo --- Force enable data execution prevention (DEP)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoDataExecutionPrevention" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "DisableHHDEP" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Disable AutoPlay and AutoRun---------------
:: ----------------------------------------------------------
echo --- Disable AutoPlay and AutoRun
:: 255 (0xff) means all drives
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoAutorun" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Disable remote Assistance-----------------
:: ----------------------------------------------------------
echo --- Disable remote Assistance
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowToGetHelp" /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowFullControl" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Disable lock screen camera----------------
:: ----------------------------------------------------------
echo --- Disable lock screen camera
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v "NoLockScreenCamera" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -Prevent the storage of the LAN Manager hash of passwords-
:: ----------------------------------------------------------
echo --- Prevent the storage of the LAN Manager hash of passwords
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "NoLMHash" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: Disable Windows Installer Always install with elevated privileges
echo --- Disable Windows Installer Always install with elevated privileges
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v "AlwaysInstallElevated" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Prevent WinRM from using Basic Authentication-------
:: ----------------------------------------------------------
echo --- Prevent WinRM from using Basic Authentication
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" /v "AllowBasic" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Restrict anonymous enumeration of shares---------
:: ----------------------------------------------------------
echo --- Restrict anonymous enumeration of shares
reg add "HKLM\SYSTEM\CurrentControlSet\Control\LSA" /v "RestrictAnonymous" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Refuse less secure authentication-------------
:: ----------------------------------------------------------
echo --- Refuse less secure authentication
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "LmCompatibilityLevel" /t REG_DWORD /d 5 /f
:: ----------------------------------------------------------

:: Enable Structured Exception Handling Overwrite Protection (SEHOP)
echo --- Enable Structured Exception Handling Overwrite Protection (SEHOP)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Block Anonymous enumeration of SAM accounts--------
:: ----------------------------------------------------------
echo --- Block Anonymous enumeration of SAM accounts
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "RestrictAnonymousSAM" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Restrict anonymous access to Named Pipes and Shares----
:: ----------------------------------------------------------
echo --- Restrict anonymous access to Named Pipes and Shares
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters" /v "RestrictNullSessAccess" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disable the Windows Connect Now wizard----------
:: ----------------------------------------------------------
echo --- Disable the Windows Connect Now wizard
reg add "HKLM\Software\Policies\Microsoft\Windows\WCN\UI" /v "DisableWcnUi" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableFlashConfigRegistrar" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableInBand802DOT11Registrar" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableUPnPRegistrar" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "DisableWPDRegistrar" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars" /v "EnableRegistrars" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Disable online tips--------------------
:: ----------------------------------------------------------
echo --- Disable online tips
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "AllowOnlineTips" /t REG_DWORD /d 0 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Turn off Internet File Association service--------
:: ----------------------------------------------------------
echo --- Turn off Internet File Association service
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInternetOpenWith" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Turn off the "Order Prints" picture task---------
:: ----------------------------------------------------------
echo --- Turn off the "Order Prints" picture task
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoOnlinePrintsWizard" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Disable the file and folder Publish to Web option-----
:: ----------------------------------------------------------
echo --- Disable the file and folder Publish to Web option
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoPublishingWizard" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Prevent downloading a list of providers for wizards----
:: ----------------------------------------------------------
echo --- Prevent downloading a list of providers for wizards
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoWebServices" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Do not keep history of recently opened documents-----
:: ----------------------------------------------------------
echo --- Do not keep history of recently opened documents
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Clear history of recently opened documents on exit----
:: ----------------------------------------------------------
echo --- Clear history of recently opened documents on exit
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ClearRecentDocsOnExit" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------------3D Objects------------------------
:: ----------------------------------------------------------
echo --- 3D Objects
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------------Movies--------------------------
:: ----------------------------------------------------------
echo --- Movies
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------------Music---------------------------
:: ----------------------------------------------------------
echo --- Music
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------------Pictures-------------------------
:: ----------------------------------------------------------
echo --- Pictures
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" /v "ThisPCPolicy" /t REG_SZ /d "Hide" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disable lock screen app notifications-----------
:: ----------------------------------------------------------
echo --- Disable lock screen app notifications
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "DisableLockScreenAppNotifications" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Disable Live Tiles push notifications-----------
:: ----------------------------------------------------------
echo --- Disable Live Tiles push notifications
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoTileApplicationNotification" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Turn off "Look For An App In The Store" option------
:: ----------------------------------------------------------
echo --- Turn off "Look For An App In The Store" option
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoUseStoreOpenWith" /t REG_DWORD /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Do not show recently used files in Quick Access------
:: ----------------------------------------------------------
echo --- Do not show recently used files in Quick Access
if %PROCESSOR_ARCHITECTURE%==x86 ( REM is 32 bit?
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /d 0 /t REG_DWORD /f
) else (
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders{3134ef9c-6b18-4996-ad04-ed5912e00eb5}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders{3134ef9c-6b18-4996-ad04-ed5912e00eb5}" /f
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Sync Provider Notifications------------
:: ----------------------------------------------------------
echo --- Disable Sync Provider Notifications
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSyncProviderNotifications" /d 0 /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Turn hibernate off to disable sleep for quick start----
:: ----------------------------------------------------------
echo --- Turn hibernate off to disable sleep for quick start
powercfg -h off
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Enable camera on/off OSD notifications----------
:: ----------------------------------------------------------
echo --- Enable camera on/off OSD notifications
reg add "HKLM\SOFTWARE\Microsoft\OEM\Device\Capture" /v "NoPhysicalCameraLED" /d 1 /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------User Data Storage (UnistoreSvc) Service----------
:: ----------------------------------------------------------
echo --- User Data Storage (UnistoreSvc) Service
sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Sync Host (OneSyncSvc) Service Service----------
:: ----------------------------------------------------------
echo --- Sync Host (OneSyncSvc) Service Service
sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Xbox Live Auth Manager------------------
:: ----------------------------------------------------------
echo --- Xbox Live Auth Manager
sc stop "XblAuthManager" & sc config "XblAuthManager" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Xbox Live Game Save--------------------
:: ----------------------------------------------------------
echo --- Xbox Live Game Save
sc stop "XblGameSave" & sc config "XblGameSave" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Xbox Live Networking Service---------------
:: ----------------------------------------------------------
echo --- Xbox Live Networking Service
sc stop "XboxNetApiSvc" & sc config "XboxNetApiSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Delivery Optimization (P2P Windows Updates)--------
:: ----------------------------------------------------------
echo --- Delivery Optimization (P2P Windows Updates)
sc stop "DoSvc" & sc config "DoSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Program Compatibility Assistant Service----------
:: ----------------------------------------------------------
echo --- Program Compatibility Assistant Service
sc stop "PcaSvc" & sc config "PcaSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Microsoft Windows Live ID Service-------------
:: ----------------------------------------------------------
echo --- Microsoft Windows Live ID Service
sc stop "wlidsvc" & sc config "wlidsvc" start=demand
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Downloaded Maps Manager------------------
:: ----------------------------------------------------------
echo --- Downloaded Maps Manager
sc stop "MapsBroker" & sc config "MapsBroker" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Microsoft Retail Demo experience-------------
:: ----------------------------------------------------------
echo --- Microsoft Retail Demo experience
sc stop "RetailDemo" & sc config "RetailDemo" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Contact data indexing-------------------
:: ----------------------------------------------------------
echo --- Contact data indexing
sc stop "PimIndexMaintenanceSvc" & sc config "PimIndexMaintenanceSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------App user data access-------------------
:: ----------------------------------------------------------
echo --- App user data access
sc stop "UserDataSvc" & sc config "UserDataSvc" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------Text messaging----------------------
:: ----------------------------------------------------------
echo --- Text messaging
sc stop "MessagingService" & sc config "MessagingService" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Windows Push Notification Service-------------
:: ----------------------------------------------------------
echo --- Windows Push Notification Service
sc stop "WpnService" & sc config "WpnService" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Volume Shadow Copy Service----------------
:: ----------------------------------------------------------
echo --- Volume Shadow Copy Service
sc stop "VSS" & sc config "VSS" start=disabled
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Disable NetBios for all interfaces------------
:: ----------------------------------------------------------
echo --- Disable NetBios for all interfaces
PowerShell -ExecutionPolicy Unrestricted -Command "$key = 'HKLM:SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces'; Get-ChildItem $key | foreach { Set-ItemProperty -Path "$key$($_.pschildname)" -Name NetbiosOptions -Value 2 -Verbose }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------App Connector app---------------------
:: ----------------------------------------------------------
echo --- App Connector app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Appconnector' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Uninstall Cortana app-------------------
:: ----------------------------------------------------------
echo --- Uninstall Cortana app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.549981C3F5F10' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------App Installer app---------------------
:: ----------------------------------------------------------
echo --- App Installer app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.DesktopAppInstaller' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Get Help app-----------------------
:: ----------------------------------------------------------
echo --- Get Help app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.GetHelp' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Microsoft Tips app--------------------
:: ----------------------------------------------------------
echo --- Microsoft Tips app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Getstarted' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Microsoft Messaging app------------------
:: ----------------------------------------------------------
echo --- Microsoft Messaging app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Messaging' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Mixed Reality Portal app-----------------
:: ----------------------------------------------------------
echo --- Mixed Reality Portal app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MixedReality.Portal' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Feedback Hub app---------------------
:: ----------------------------------------------------------
echo --- Feedback Hub app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsFeedbackHub' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Windows Alarms and Clock app---------------
:: ----------------------------------------------------------
echo --- Windows Alarms and Clock app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsAlarms' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Windows Camera app--------------------
:: ----------------------------------------------------------
echo --- Windows Camera app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsCamera' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Paint 3D app-----------------------
:: ----------------------------------------------------------
echo --- Paint 3D app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MSPaint' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Windows Maps app---------------------
:: ----------------------------------------------------------
echo --- Windows Maps app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsMaps' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Minecraft for Windows 10 app---------------
:: ----------------------------------------------------------
echo --- Minecraft for Windows 10 app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MinecraftUWP' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Microsoft People app-------------------
:: ----------------------------------------------------------
echo --- Microsoft People app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.People' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Microsoft Pay app---------------------
:: ----------------------------------------------------------
echo --- Microsoft Pay app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Wallet' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Store Purchase app--------------------
:: ----------------------------------------------------------
echo --- Store Purchase app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.StorePurchaseApp' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Snip & Sketch app---------------------
:: ----------------------------------------------------------
echo --- Snip ^& Sketch app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.ScreenSketch' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Print 3D app-----------------------
:: ----------------------------------------------------------
echo --- Print 3D app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Print3D' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Mobile Plans app---------------------
:: ----------------------------------------------------------
echo --- Mobile Plans app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.OneConnect' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Microsoft Solitaire Collection app------------
:: ----------------------------------------------------------
echo --- Microsoft Solitaire Collection app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftSolitaireCollection' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Microsoft Sticky Notes app----------------
:: ----------------------------------------------------------
echo --- Microsoft Sticky Notes app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftStickyNotes' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Mail and Calendar app-------------------
:: ----------------------------------------------------------
echo --- Mail and Calendar app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'microsoft.windowscommunicationsapps' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Windows Calculator app------------------
:: ----------------------------------------------------------
echo --- Windows Calculator app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsCalculator' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Microsoft Photos app-------------------
:: ----------------------------------------------------------
echo --- Microsoft Photos app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Photos' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------------Skype app-------------------------
:: ----------------------------------------------------------
echo --- Skype app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.SkypeApp' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------GroupMe app------------------------
:: ----------------------------------------------------------
echo --- GroupMe app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.GroupMe10' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Windows Voice Recorder app----------------
:: ----------------------------------------------------------
echo --- Windows Voice Recorder app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsSoundRecorder' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Microsoft 3D Builder app-----------------
:: ----------------------------------------------------------
echo --- Microsoft 3D Builder app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.3DBuilder' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------3D Viewer app-----------------------
:: ----------------------------------------------------------
echo --- 3D Viewer app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Microsoft3DViewer' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------MSN Weather app----------------------
:: ----------------------------------------------------------
echo --- MSN Weather app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingWeather' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------MSN Sports app----------------------
:: ----------------------------------------------------------
echo --- MSN Sports app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingSports' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------MSN News app-----------------------
:: ----------------------------------------------------------
echo --- MSN News app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingNews' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------MSN Money app-----------------------
:: ----------------------------------------------------------
echo --- MSN Money app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.BingFinance' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------HEIF Image Extensions app-----------------
:: ----------------------------------------------------------
echo --- HEIF Image Extensions app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.HEIFImageExtension' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------VP9 Video Extensions app-----------------
:: ----------------------------------------------------------
echo --- VP9 Video Extensions app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.VP9VideoExtensions' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Web Media Extensions app-----------------
:: ----------------------------------------------------------
echo --- Web Media Extensions app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WebMediaExtensions' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Webp Image Extensions app-----------------
:: ----------------------------------------------------------
echo --- Webp Image Extensions app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WebpImageExtension' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------My Office app-----------------------
:: ----------------------------------------------------------
echo --- My Office app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.MicrosoftOfficeHub' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------OneNote app------------------------
:: ----------------------------------------------------------
echo --- OneNote app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Office.OneNote' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------------Sway app-------------------------
:: ----------------------------------------------------------
echo --- Sway app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Office.Sway' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Xbox Console Companion app----------------
:: ----------------------------------------------------------
echo --- Xbox Console Companion app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.XboxApp' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Xbox Live in-game experience app-------------
:: ----------------------------------------------------------
echo --- Xbox Live in-game experience app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Xbox.TCUI' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Xbox Game Bar app---------------------
:: ----------------------------------------------------------
echo --- Xbox Game Bar app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.XboxGamingOverlay' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Xbox Game Bar Plugin appcache---------------
:: ----------------------------------------------------------
echo --- Xbox Game Bar Plugin appcache
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.XboxGameOverlay' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Xbox Identity Provider app----------------
:: ----------------------------------------------------------
echo --- Xbox Identity Provider app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.XboxIdentityProvider' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Xbox Speech To Text Overlay app--------------
:: ----------------------------------------------------------
echo --- Xbox Speech To Text Overlay app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.XboxSpeechToTextOverlay' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Groove Music app---------------------
:: ----------------------------------------------------------
echo --- Groove Music app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.ZuneMusic' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Movies and TV app---------------------
:: ----------------------------------------------------------
echo --- Movies and TV app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.ZuneVideo' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Your Phone Companion app-----------------
:: ----------------------------------------------------------
echo --- Your Phone Companion app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.WindowsPhone' | Remove-AppxPackage"
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Phone' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Communications - Phone app----------------
:: ----------------------------------------------------------
echo --- Communications - Phone app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.CommsPhone' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------Your Phone app----------------------
:: ----------------------------------------------------------
echo --- Your Phone app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.YourPhone' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Microsoft Advertising app-----------------
:: ----------------------------------------------------------
echo --- Microsoft Advertising app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Advertising.Xaml' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Remote Desktop app--------------------
:: ----------------------------------------------------------
echo --- Remote Desktop app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.RemoteDesktop' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Network Speed Test app------------------
:: ----------------------------------------------------------
echo --- Network Speed Test app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.NetworkSpeedTest' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Microsoft To Do app--------------------
:: ----------------------------------------------------------
echo --- Microsoft To Do app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Todos' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------------Shazam app------------------------
:: ----------------------------------------------------------
echo --- Shazam app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ShazamEntertainmentLtd.Shazam' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Candy Crush Saga app-------------------
:: ----------------------------------------------------------
echo --- Candy Crush Saga app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'king.com.CandyCrushSaga' | Remove-AppxPackage"
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'king.com.CandyCrushSodaSaga' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------------Flipboard app-----------------------
:: ----------------------------------------------------------
echo --- Flipboard app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Flipboard.Flipboard' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Twitter app------------------------
:: ----------------------------------------------------------
echo --- Twitter app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage '9E2F88E3.Twitter' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------iHeartRadio app----------------------
:: ----------------------------------------------------------
echo --- iHeartRadio app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ClearChannelRadioDigital.iHeartRadio' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Duolingo app-----------------------
:: ----------------------------------------------------------
echo --- Duolingo app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'D5EA27B7.Duolingo-LearnLanguagesforFree' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Photoshop Express app-------------------
:: ----------------------------------------------------------
echo --- Photoshop Express app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'AdobeSystemIncorporated.AdobePhotoshop' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Pandora app------------------------
:: ----------------------------------------------------------
echo --- Pandora app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'PandoraMediaInc.29680B314EFC2' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Eclipse Manager app--------------------
:: ----------------------------------------------------------
echo --- Eclipse Manager app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage '46928bounde.EclipseManager' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Code Writer app----------------------
:: ----------------------------------------------------------
echo --- Code Writer app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'ActiproSoftwareLLC.562882FEEB491' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Spotify app------------------------
:: ----------------------------------------------------------
echo --- Spotify app
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'SpotifyAB.SpotifyMusic' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------File Picker app----------------------
:: ----------------------------------------------------------
echo --- File Picker app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers '1527c705-839a-4832-9118-54d4Bd6a0c89'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------File Explorer app---------------------
:: ----------------------------------------------------------
echo --- File Explorer app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'c5e2524a-ea46-4f67-841f-6a9465d9d515'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------App Resolver UX app--------------------
:: ----------------------------------------------------------
echo --- App Resolver UX app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'E2A4F912-2574-4A75-9BB0-0D023378592B'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Add Suggested Folders To Library app-----------
:: ----------------------------------------------------------
echo --- Add Suggested Folders To Library app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'InputApp'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: Microsoft AAD Broker Plugin app (breaks Office app authentication)
echo --- Microsoft AAD Broker Plugin app (breaks Office app authentication)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.AAD.BrokerPlugin'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Microsoft Async Text Service app-------------
:: ----------------------------------------------------------
echo --- Microsoft Async Text Service app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.AsyncTextService'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Contact Support app--------------------
:: ----------------------------------------------------------
echo --- Contact Support app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.ContactSupport'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Windows Print 3D app-------------------
:: ----------------------------------------------------------
echo --- Windows Print 3D app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.Print3D'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------------Print UI app-----------------------
:: ----------------------------------------------------------
echo --- Print UI app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.PrintDialog'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Bio enrollment app (breaks biometric authentication)---
:: ----------------------------------------------------------
echo --- Bio enrollment app (breaks biometric authentication)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.BioEnrollment'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Cred Dialog Host app-------------------
:: ----------------------------------------------------------
echo --- Cred Dialog Host app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.CredDialogHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------------EC app--------------------------
:: ----------------------------------------------------------
echo --- EC app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.ECApp'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Lock app (shows lock screen)---------------
:: ----------------------------------------------------------
echo --- Lock app (shows lock screen)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.LockApp'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Microsoft Edge (Legacy) app----------------
:: ----------------------------------------------------------
echo --- Microsoft Edge (Legacy) app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.MicrosoftEdge'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Microsoft Edge (Legacy) Dev Tools Client app-------
:: ----------------------------------------------------------
echo --- Microsoft Edge (Legacy) Dev Tools Client app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.MicrosoftEdgeDevToolsClient'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Win32 Web View Host app / Desktop App Web Viewer-----
:: ----------------------------------------------------------
echo --- Win32 Web View Host app / Desktop App Web Viewer
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Win32WebViewHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Microsoft PPI Projection app---------------
:: ----------------------------------------------------------
echo --- Microsoft PPI Projection app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.PPIProjection'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------------ChxApp app------------------------
:: ----------------------------------------------------------
echo --- ChxApp app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.Apprep.ChxApp'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Assigned Access Lock App app---------------
:: ----------------------------------------------------------
echo --- Assigned Access Lock App app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.AssignedAccessLockApp'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Capture Picker app--------------------
:: ----------------------------------------------------------
echo --- Capture Picker app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.CapturePicker'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Cloud Experience Host app-----------------
:: ----------------------------------------------------------
echo --- Cloud Experience Host app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.CloudExperienceHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: Content Delivery Manager app (automatically installs apps)
echo --- Content Delivery Manager app (automatically installs apps)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.ContentDeliveryManager'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Search app (breaks Windows search)------------
:: ----------------------------------------------------------
echo --- Search app (breaks Windows search)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.Cortana'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Search' | Remove-AppxPackage"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Holographic First Run app-----------------
:: ----------------------------------------------------------
echo --- Holographic First Run app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.Holographic.FirstRun'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------OOBE Network Captive Port app---------------
:: ----------------------------------------------------------
echo --- OOBE Network Captive Port app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.OOBENetworkCaptivePortal'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------OOBE Network Connection Flow app-------------
:: ----------------------------------------------------------
echo --- OOBE Network Connection Flow app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.OOBENetworkConnectionFlow'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Windows 10 Family Safety / Parental Controls app-----
:: ----------------------------------------------------------
echo --- Windows 10 Family Safety / Parental Controls app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.ParentalControls'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: My People / People Bar App on taskbar (People Experience Host)
echo --- My People / People Bar App on taskbar (People Experience Host)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.PeopleExperienceHost'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Pinning Confirmation Dialog app--------------
:: ----------------------------------------------------------
echo --- Pinning Confirmation Dialog app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.PinningConfirmationDialog'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Windows Security GUI (Sec Health UI) app---------
:: ----------------------------------------------------------
echo --- Windows Security GUI (Sec Health UI) app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.SecHealthUI'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Secondary Tile Experience app---------------
:: ----------------------------------------------------------
echo --- Secondary Tile Experience app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.SecondaryTileExperience'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: Secure Assessment Browser app (breaks Microsoft Intune/Graph)
echo --- Secure Assessment Browser app (breaks Microsoft Intune/Graph)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.Windows.SecureAssessmentBrowser'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Windows Feedback app-------------------
:: ----------------------------------------------------------
echo --- Windows Feedback app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.WindowsFeedback'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Xbox Game Callable UI app (breaks Xbox Live games)----
:: ----------------------------------------------------------
echo --- Xbox Game Callable UI app (breaks Xbox Live games)
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Microsoft.XboxGameCallableUI'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------CBS Preview app----------------------
:: ----------------------------------------------------------
echo --- CBS Preview app
PowerShell -ExecutionPolicy Unrestricted -Command "$package = (Get-AppxPackage -AllUsers 'Windows.CBSPreview'); if (!$package) { Write-Host 'Not installed'; exit 0; } $directories = @($package.InstallLocation, "$env:LOCALAPPDATA\Packages$($package.PackageFamilyName)"); foreach($dir in $directories) { if ( !$dir -Or !(Test-Path "$dir") ) { continue; } cmd /c ('takeown /f "' + $dir + '" /r /d y 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } cmd /c ('icacls "' + $dir + '" /grant administrators:F /t 1> nul'); if($LASTEXITCODE) { throw 'Failed to take ownership'; } $files = Get-ChildItem -File -Path $dir -Recurse -Force; foreach($file in $files) { if($file.Name.EndsWith('.OLD')) { continue; } $newName = $file.FullName + '.OLD'; Write-Host "Rename '$($file.FullName)' to '$newName'"; Move-Item -LiteralPath "$($file.FullName)" -Destination "$newName" -Force; } }"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Kill OneDrive process-------------------
:: ----------------------------------------------------------
echo --- Kill OneDrive process
taskkill /f /im OneDrive.exe
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------Uninstall OneDrive--------------------
:: ----------------------------------------------------------
echo --- Uninstall OneDrive
if %PROCESSOR_ARCHITECTURE%==x86 (
%SystemRoot%\System32\OneDriveSetup.exe /uninstall 2>nul
) else (
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall 2>nul
)
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Remove OneDrive leftovers-----------------
:: ----------------------------------------------------------
echo --- Remove OneDrive leftovers
rd "%UserProfile%\OneDrive" /q /s
rd "%LocalAppData%\Microsoft\OneDrive" /q /s
rd "%ProgramData%\Microsoft OneDrive" /q /s
rd "%SystemDrive%\OneDriveTemp" /q /s
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Delete OneDrive shortcuts-----------------
:: ----------------------------------------------------------
echo --- Delete OneDrive shortcuts
del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft OneDrive.lnk" /s /f /q
del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" /s /f /q
del "%USERPROFILE%\Links\OneDrive.lnk" /s /f /q
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Disable usage of OneDrive-----------------
:: ----------------------------------------------------------
echo --- Disable usage of OneDrive
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSyncNGSC" /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSync" /d 1 /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Prevent automatic OneDrive install for current user----
:: ----------------------------------------------------------
echo --- Prevent automatic OneDrive install for current user
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Prevent automatic OneDrive install for new users-----
:: ----------------------------------------------------------
echo --- Prevent automatic OneDrive install for new users
reg load "HKU\Default" "%SystemDrive%\Users\Default\NTUSER.DAT"
reg delete "HKU\Default\software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
reg unload "HKU\Default"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Remove OneDrive from explorer menu------------
:: ----------------------------------------------------------
echo --- Remove OneDrive from explorer menu
reg delete "HKCR\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
reg delete "HKCR\Wow6432Node\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
reg add "HKCR\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
reg add "HKCR\Wow6432Node{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Delete all OneDrive related Services-----------
:: ----------------------------------------------------------
echo --- Delete all OneDrive related Services
for /f "tokens=1 delims=," %%x in ('schtasks /query /fo csv ^| find "OneDrive"') do schtasks /Delete /TN %%x /F
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Delete OneDrive path from registry------------
:: ----------------------------------------------------------
echo --- Delete OneDrive path from registry
reg delete "HKCU\Environment" /v "OneDrive" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------Direct Play feature--------------------
:: ----------------------------------------------------------
echo --- Direct Play feature
dism /Online /Disable-Feature /FeatureName:"DirectPlay" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Internet Explorer feature-----------------
:: ----------------------------------------------------------
echo --- Internet Explorer feature
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Legacy Components feature-----------------
:: ----------------------------------------------------------
echo --- Legacy Components feature
dism /Online /Disable-Feature /FeatureName:"LegacyComponents" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Media Features feature------------------
:: ----------------------------------------------------------
echo --- Media Features feature
dism /Online /Disable-Feature /FeatureName:"MediaPlayback" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Scan Management feature------------------
:: ----------------------------------------------------------
echo --- Scan Management feature
dism /Online /Disable-Feature /FeatureName:"ScanManagementConsole" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Windows Fax and Scan feature---------------
:: ----------------------------------------------------------
echo --- Windows Fax and Scan feature
dism /Online /Disable-Feature /FeatureName:"FaxServicesClientPackage" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Windows Media Player feature---------------
:: ----------------------------------------------------------
echo --- Windows Media Player feature
dism /Online /Disable-Feature /FeatureName:"WindowsMediaPlayer" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Windows Search feature------------------
:: ----------------------------------------------------------
echo --- Windows Search feature
dism /Online /Disable-Feature /FeatureName:"SearchEngine-Client-Package" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------Telnet Client feature-------------------
:: ----------------------------------------------------------
echo --- Telnet Client feature
dism /Online /Disable-Feature /FeatureName:"TelnetClient" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Net.TCP Port Sharing feature---------------
:: ----------------------------------------------------------
echo --- Net.TCP Port Sharing feature
dism /Online /Disable-Feature /FeatureName:"WCF-TCP-PortSharing45" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------SMB Direct feature--------------------
:: ----------------------------------------------------------
echo --- SMB Direct feature
dism /Online /Disable-Feature /FeatureName:"SmbDirect" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------TFTP Client feature--------------------
:: ----------------------------------------------------------
echo --- TFTP Client feature
dism /Online /Disable-Feature /FeatureName:"TFTP" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------Hyper-V feature----------------------
:: ----------------------------------------------------------
echo --- Hyper-V feature
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-All" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Hyper-V GUI Management Tools feature-----------
:: ----------------------------------------------------------
echo --- Hyper-V GUI Management Tools feature
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-Clients" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Hyper-V Management Tools feature-------------
:: ----------------------------------------------------------
echo --- Hyper-V Management Tools feature
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Tools-All" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Hyper-V Module for Windows PowerShell feature-------
:: ----------------------------------------------------------
echo --- Hyper-V Module for Windows PowerShell feature
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-PowerShell" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Work Folders Client feature----------------
:: ----------------------------------------------------------
echo --- Work Folders Client feature
dism /Online /Disable-Feature /FeatureName:"WorkFolders-Client" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------------XPS Services feature-------------------
:: ----------------------------------------------------------
echo --- XPS Services feature
dism /Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------XPS Viewer feature--------------------
:: ----------------------------------------------------------
echo --- XPS Viewer feature
dism /Online /Disable-Feature /FeatureName:"Xps-Foundation-Xps-Viewer" /NoRestart
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Internet Explorer 11 capability--------------
:: ----------------------------------------------------------
echo --- Internet Explorer 11 capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Browser.InternetExplorer*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Math Recognizer capability----------------
:: ----------------------------------------------------------
echo --- Math Recognizer capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'MathRecognizer*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --OneSync capability (breaks Mail, People, and Calendar)--
:: ----------------------------------------------------------
echo --- OneSync capability (breaks Mail, People, and Calendar)
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'OneCoreUAP.OneSync*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------OpenSSH client capability-----------------
:: ----------------------------------------------------------
echo --- OpenSSH client capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'OpenSSH.Client*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------PowerShell ISE capability-----------------
:: ----------------------------------------------------------
echo --- PowerShell ISE capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Microsoft.Windows.PowerShell.ISE*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Print Management Console capability------------
:: ----------------------------------------------------------
echo --- Print Management Console capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.Management.Console*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Quick Assist capability------------------
:: ----------------------------------------------------------
echo --- Quick Assist capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'App.Support.QuickAssist*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Steps Recorder capability-----------------
:: ----------------------------------------------------------
echo --- Steps Recorder capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'App.StepsRecorder*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Windows Fax and Scan capability--------------
:: ----------------------------------------------------------
echo --- Windows Fax and Scan capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.Fax.Scan*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------.NET Framework capability-----------------
:: ----------------------------------------------------------
echo --- .NET Framework capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'NetFX3*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------Mixed Reality capability-----------------
:: ----------------------------------------------------------
echo --- Mixed Reality capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Analog.Holographic.Desktop*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Wireless Display capability----------------
:: ----------------------------------------------------------
echo --- Wireless Display capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'App.WirelessDisplay.Connect*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Accessibility - Braille Support capability--------
:: ----------------------------------------------------------
echo --- Accessibility - Braille Support capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Accessibility.Braille*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Developer Mode capability-----------------
:: ----------------------------------------------------------
echo --- Developer Mode capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Tools.DeveloperMode.Core*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------Graphics Tools capability-----------------
:: ----------------------------------------------------------
echo --- Graphics Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Tools.Graphics.DirectX*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------------IrDA capability----------------------
:: ----------------------------------------------------------
echo --- IrDA capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Network.Irda*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------Microsoft WebDriver capability--------------
:: ----------------------------------------------------------
echo --- Microsoft WebDriver capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Microsoft.WebDriver*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------MSIX Packaging Tool Driver capability-----------
:: ----------------------------------------------------------
echo --- MSIX Packaging Tool Driver capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Msix.PackagingTool.Driver*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------------OpenSSH Server capability-----------------
:: ----------------------------------------------------------
echo --- OpenSSH Server capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'OpenSSH.Server*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------------XPS Viewer capability-------------------
:: ----------------------------------------------------------
echo --- XPS Viewer capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'XPS.Viewer*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: RAS Connection Manager Administration Kit (CMAK) capability
echo --- RAS Connection Manager Administration Kit (CMAK) capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'RasCMAK.Client*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------------RIP Listener capability------------------
:: ----------------------------------------------------------
echo --- RIP Listener capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'RIP.Listener*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---Simple Network Management Protocol (SNMP) capability---
:: ----------------------------------------------------------
echo --- Simple Network Management Protocol (SNMP) capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'SNMP.Client*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------SNMP WMI Provider capability---------------
:: ----------------------------------------------------------
echo --- SNMP WMI Provider capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'WMI-SNMP-Provider.Client*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Enterprise Cloud Print capability-------------
:: ----------------------------------------------------------
echo --- Enterprise Cloud Print capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.EnterpriseCloudPrint*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Mopria Cloud Service capability--------------
:: ----------------------------------------------------------
echo --- Mopria Cloud Service capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Print.MopriaCloudService*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: Active Directory Domain Services and Lightweight Directory Services Tools capability
echo --- Active Directory Domain Services and Lightweight Directory Services Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.ActiveDirectory.DS-LDS.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: BitLocker Drive Encryption Administration Utilities capability
echo --- BitLocker Drive Encryption Administration Utilities capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.BitLocker.Recovery.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------Active Directory Certificate Services Tools--------
:: ----------------------------------------------------------
echo --- Active Directory Certificate Services Tools
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.CertificateServices.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------DHCP Server Tools capability---------------
:: ----------------------------------------------------------
echo --- DHCP Server Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.DHCP.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------DNS Server Tools capability----------------
:: ----------------------------------------------------------
echo --- DNS Server Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.Dns.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Failover Clustering Tools capability-----------
:: ----------------------------------------------------------
echo --- Failover Clustering Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.FailoverCluster.Management.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------File Services Tools capability--------------
:: ----------------------------------------------------------
echo --- File Services Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.FileServices.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----Group Policy Management Tools capability (revert)-----
:: ----------------------------------------------------------
echo --- Group Policy Management Tools capability (revert)
PowerShell -ExecutionPolicy Unrestricted -Command "$capability = Get-WindowsCapability -Online -Name 'Rsat.GroupPolicy.Management.Tools*'; Add-WindowsCapability -Name "$capability.Name" -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------IP Address Management (IPAM) Client capability------
:: ----------------------------------------------------------
echo --- IP Address Management (IPAM) Client capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.IPAM.Client.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Data Center Bridging LLDP Tools capability--------
:: ----------------------------------------------------------
echo --- Data Center Bridging LLDP Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.LLDP.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------Network Controller Management Tools capability------
:: ----------------------------------------------------------
echo --- Network Controller Management Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.NetworkController.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------Network Load Balancing Tools capability----------
:: ----------------------------------------------------------
echo --- Network Load Balancing Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.NetworkLoadBalancing.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Remote Access Management Tools capability---------
:: ----------------------------------------------------------
echo --- Remote Access Management Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.RemoteAccess.Management.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ---------------Shielded VM Tools capability---------------
:: ----------------------------------------------------------
echo --- Shielded VM Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.Shielded.VM.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -Storage Replica Module for Windows PowerShell capability-
:: ----------------------------------------------------------
echo --- Storage Replica Module for Windows PowerShell capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.StorageReplica.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------Volume Activation Tools capability------------
:: ----------------------------------------------------------
echo --- Volume Activation Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.VolumeActivation.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----Windows Server Update Services Tools capability------
:: ----------------------------------------------------------
echo --- Windows Server Update Services Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.WSUS.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --Storage Migration Service Management Tools capability---
:: ----------------------------------------------------------
echo --- Storage Migration Service Management Tools capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.StorageMigrationService.Management.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: Systems Insights Module for Windows PowerShell capability-
:: ----------------------------------------------------------
echo --- Systems Insights Module for Windows PowerShell capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Rsat.SystemInsights.Management.Tools*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------Windows Storage Management capability-----------
:: ----------------------------------------------------------
echo --- Windows Storage Management capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Microsoft.Windows.StorageManagement*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----------OneCore Storage Management capability-----------
:: ----------------------------------------------------------
echo --- OneCore Storage Management capability
PowerShell -ExecutionPolicy Unrestricted -Command "Get-WindowsCapability -Online -Name 'Microsoft.OneCore.StorageManagement*' | Remove-WindowsCapability -Online"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -------------Uninstall Edge (chromium-based)--------------
:: ----------------------------------------------------------
echo --- Uninstall Edge (chromium-based)
PowerShell -ExecutionPolicy Unrestricted -Command " $installer = (Get-ChildItem "$env:ProgramFiles*\Microsoft\Edge\Application*\Installer\setup.exe"); if (!$installer) { Write-Host Could not find the installer; } else { & $installer.FullName -uninstall -system-level -verbose-logging -force-uninstall }; "
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: -----------Disable Reserved Storage for updates-----------
:: ----------------------------------------------------------
echo --- Disable Reserved Storage for updates
dism /online /Set-ReservedStorageState /State:Disabled /NoRestart
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "MiscPolicyInfo" /t REG_DWORD /d "2" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "PassedPolicy" /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------Microsoft Windows Live ID Service (revert)--------

pause
exit /b 0

I lost control

After I used the script, accordantly lost the administration control from my device, and if I need to get my premises back I can't do it. So please if someone can help me just help me.

Low severity vulnerability by npm

Security checks are failing because npm audit warns about Prototype Pollution in lodash. It has been mentioned in lodash/lodash#4836 and resolved in lodash/lodash#4759, just waiting for a new npm publish for the package, it can be tracked from lodash/lodash#4837.

Add macOS support

  • Do necessary refactorings to allow more than one OS
  • Add initial scripts / tweaks

Script runtime errors (win10x64 2004)

--- XPS Viewer capability
ะ’ ัั‚ั€ะพะบะต ะพั‚ััƒั‚ัั‚ะฒัƒะตั‚ ะทะฐะฒะตั€ัˆะฐัŽั‰ะธะน ัะธะผะฒะพะป: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Obsolete policies

The 2 policies below are obsolete as of Edge 89. I'd also suggest the removal of policies that refer to Edge legacy, since it's no longer supported

Captura de ecrรฃ 2021-05-10 134704

Really?

>Privacy
>Windows
>MacOS
Are you kidding?

Unexpected behavior - Can't install Malwarebytes

Can't install Malwarebytes. What disables this?

OS

Win 10 Pro Version 10.0.19042 Build 19042

Scripts

I used standard and then tweaked it with a few things. Script attached.
privacy-script.zip

To Reproduce

I have attempted to install Malwarebytes straight from their website and via ninite.com Each time it will download and begin to install after the setup menu, then it just cancels part of the way through.

Screenshots

Could Disabling Win Defender's malicious software reporting be what is keeping me from using a 3rd party malware tool?

image

Additional context

This was on a freshly installed and fully setup win 10 machine.

[BUG]: Unable to change PIN and Password

Describe the bug

Go to Settings > Sign-in Options
The only options are Security Key
I've previously set up PIN and Password for different account, after using this script, I noticed the option to change PIN and Pass were gone

OS

Windows 10 Pro 2004 19041.867

Screenshots

image

Scripts

debloat.txt

Additional information

I'm using 0.10.1 version of privacy.sexy
If the warning for the script that caused this then please apply a warning for it

[BUG]: Error on executing Disable NetBios for all interfaces

Describe the bug

I get an error when running the Disable NetBios for all interfaces.

Error message:
The string is missing the terminator: ". + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

OS

Edition: Windows 10 Pro
Version: 20H2
Build: 19042.1052

Screenshots

afbeelding

Scripts

Script is generated by privacy.sexy

:: ---------------------------------------------------------- :: ------------Disable NetBios for all interfaces------------ :: ---------------------------------------------------------- echo --- Disable NetBios for all interfaces PowerShell -ExecutionPolicy Unrestricted -Command "$key = 'HKLM:SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces'; Get-ChildItem $key | foreach { Set-ItemProperty -Path \"$key\$($_.pschildname)\" -Name NetbiosOptions -Value 2 -Verbose }" :: ----------------------------------------------------------

Major Part of M$ Telemetry Removal is to Remove All Hidden Scheduled Tasks at Every Boot as they Appear Again n Again on Every Boot.

This is a Reg Tweak . It Does not Work if we convert it to batch to be taken under privacy.sexy script hence i am providing it here as extra. save it as RemoveHiddenScheduledTasks.reg & use it with any program to run it at every boot with prompt.

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree]
"SD"=hex:01,00,04,94,c4,00,00,00,d0,00,00,00,00,00,00,00,14,00,00,00,02,00,b0,
00,08,00,00,00,00,02,18,00,ff,01,1f,00,01,02,00,00,00,00,00,05,20,00,00,00,
20,02,00,00,00,01,18,00,9f,01,1f,00,01,02,00,00,00,00,00,05,20,00,00,00,20,
02,00,00,00,02,14,00,ff,01,1f,00,01,01,00,00,00,00,00,05,12,00,00,00,00,01,
14,00,9f,01,1f,00,01,01,00,00,00,00,00,05,12,00,00,00,00,02,14,00,16,01,12,
00,01,01,00,00,00,00,00,05,0b,00,00,00,00,02,14,00,16,01,12,00,01,01,00,00,
00,00,00,05,14,00,00,00,00,02,14,00,16,01,12,00,01,01,00,00,00,00,00,05,13,
00,00,00,00,0b,14,00,ff,01,1f,00,01,01,00,00,00,00,00,03,00,00,00,00,01,01,
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00

MacOS: Add script to disable Gatekeeper and XProtect

Problem Description

The site doesn't mention Gatekeeper privacy issues. Query the database by issuing:

echo 'SELECT datetime(LSQuarantineTimeStamp + 978307200, "unixepoch") as LSQuarantineTimeStamp, ' \ 'LSQuarantineAgentName, LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent;' | \ sqlite3 /Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2

Proposed solution

Add script to disable Gatekeeper and XProtect

Alternatives considered

Add script to remove Gatekeeper/Quarantine attributes from files and clean the Quarantine database:

To clear database:
:>~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2

To prevent further database usage:

sudo chflags schg ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2

Disable Gatekeeper service:

sudo spctl --master-disable

Remove Quarantine attributes from file:

xattr -d com.apple.metadata:kMDItemWhereFroms filename
xattr -d com.apple.quarantine filename

Revert Changes

Looks really promising.

Trying this out for the first time and its not clear to me how to revert changes made.

Lets say I make a custom set of changes. 3 months later, I need to revert a few. How does one painlessly recreate the same selection set so to not miss any previous changes and revert as needed?

Could there be an upload or perhaps a code that could be entered that would bring up a previous selection to continue making or undoing changes to?

Privacy Cleanup Issue [Info]

Hi @undergroundwires

Recently I discover this amazing program and I'm loving, and I find some issue with the privacy cleanup and I fix the problem by searching in the famous google.com

So the problem are in the Clear Windows Recent Files

The original commands are:
echo --- Clear windows recent files
rd /s /q "%USERPROFILE%\Recent"
rd /s /q "%APPDATA%\Microsoft\Windows\Recent"
del /f /q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations*
del /f /q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations*

Everything is working perfectly and clear everything, but has one file in the AutomaticDestinations called f01b4d95cf55d32a.automaticDestinations-ms where is used by Quick Access.

My suggestion is add the command to create the folder and windows recover the file (at least windows are able to restore something by himself XD), so the correct command is:

echo --- Clear windows recent files
rd /s /q "%USERPROFILE%\Recent"
rd /s /q "%APPDATA%\Microsoft\Windows\Recent"
del /f /q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations*
del /f /q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations*
mkdir %AppData%\Microsoft\Windows\Recent\AutomaticDestinations

Now, Quick Access are back and everything working and cleared as we want ๐Ÿ‘

Source Link: https://www.winhelponline.com/blog/fix-quick-access-reset-pinned-shortcuts-stuck-not-working-windows-10/

[BUG]: Search Reversing

Hello, i used to disable Search windows feature but when i reversed i did not get it back, what do i do?

Uninstall feature/capability when disabling it.

Apparently, disabling a Windows feature does not uninstall/remove it from the system; e.g. Windows Media Player
https://www.tenforums.com/tutorials/95101-install-uninstall-windows-media-player-windows-10-a.html

If you like, you can turn on or off the Windows Media Player feature to no longer have it available for all users on the PC. Turning off Windows Media Player will not uninstall it, or save any hard drive space.

This can be accomplished with the /Remove-Capability parameter for DISM.

Get-WindowsCapability -Online -Name "*assist*"


Name         : App.Support.QuickAssist~~~~0.0.1.0
State        : Installed
DisplayName  : Microsoft Quick Assist
Description  : Allows Microsoft support agents to connect to your device and also lets you share your screen with
               someone you trust so they can help you.
DownloadSize : 400810
InstallSize  : 3034496

Dism /Online /Remove-Capability /CapabilityName:App.Support.QuickAssist~~~~0.0.1.0

Deployment Image Servicing and Management tool
Version: 10.0.19041.329

Image Version: 10.0.19042.508

[==========================100.0%==========================]
The operation completed successfully.

Windows Spotlight stop working

Hello and thank you so much for this project!
I generated and run script on my Win10 and Windows Spotlight stop working (random wallpaper on lock screen). Is there any chance to make it work again?
Thank you.

[BUG]: Disabling Windows Defender Services requires NT Authority

Describe the bug

Windows Defender service disabling scripts don't work under normal admin permissions; Changing some registry keys require NT Authority.

OS

Edition Windows 10 Home Single Language
Version 20H2
Compilaรงรฃo do SO 19042.928
Experiรชncia Windows Feature Experience Pack 120.2212.551.0

Scripts

The whole "Disable Windows Defender Services" group

Additional information

I used a tool called PowerRun (https://www.sordum.org/9416/powerrun-v1-4-run-with-highest-privileges/) that emulates a process being called from TrustedInstaller, giving those extra permissions -- then the script ran without any errors. Also, consider adding more registry changes for better disabling (W4RH4WK/Debloat-Windows-10#273 (comment)).

Win10 May 2020 Update

First of all i want to thank you Brother for Your Script which is awesome & does all the tweaks for telemetery as well as debloating online Win10.
Since May 2020 Update M$ has changed some store apps name like cortana & many more.
Please update your script to fully support May 2020 Update of Win 10.

Firewall Hardening - LOLBINs as new option

          category: Security improvments
          children:
            -
                name: Firewall hardening - block LOLBINs
				docs: https://github.com/LOLBAS-Project/LOLBAS
				docs: https://github.com/AndyFul/Hard_Configurator

                code: |-
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: appvlp.exe" program="C:\%programfiles%\Microsoft Office\root\client\AppVLP.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: appvlp.exe" program="C:\%programfiles(x86)%\Microsoft Office\root\client\AppVLP.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: At.exe" program="%systemroot%\System32\At.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: At.exe" program="%systemroot%\SysWOW64\At.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Attrib.exe" program="%systemroot%\System32\Attrib.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Attrib.exe" program="%systemroot%\SysWOW64\Attrib.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Atbroker.exe" program="%systemroot%\System32\Atbroker.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Atbroker.exe" program="%systemroot%\SysWOW64\Atbroker.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: bash.exe" program="%systemroot%\System32\bash.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: bash.exe" program="%systemroot%\SysWOW64\bash.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: bitsadmin.exe" program="%systemroot%\System32\bitsadmin.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: bitsadmin.exe" program="%systemroot%\SysWOW64\bitsadmin.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: calc.exe" program="%systemroot%\System32\calc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: calc.exe" program="%systemroot%\SysWOW64\calc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: certreq.exe" program="%systemroot%\System32\certreq.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: certreq.exe" program="%systemroot%\SysWOW64\certreq.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: certutil.exe" program="%systemroot%\System32\certutil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: certutil.exe" program="%systemroot%\SysWOW64\certutil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cmdkey.exe" program="%systemroot%\System32\cmdkey.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cmdkey.exe" program="%systemroot%\SysWOW64\cmdkey.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cmstp.exe" program="%systemroot%\System32\cmstp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cmstp.exe" program="%systemroot%\SysWOW64\cmstp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: CompatTelRunner.exe" program="%systemroot%\System32\CompatTelRunner.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: CompatTelRunner.exe" program="%systemroot%\SysWOW64\CompatTelRunner.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ConfigSecurityPolicy.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.9-0\ConfigSecurityPolicy.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: control.exe" program="%systemroot%\System32\control.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: control.exe" program="%systemroot%\SysWOW64\control.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Csc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Csc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Csc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Csc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cscript.exe" program="%systemroot%\System32\cscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: cscript.exe" program="%systemroot%\SysWOW64\cscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ctfmon.exe" program="%systemroot%\System32\ctfmon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ctfmon.exe" program="%systemroot%\SysWOW64\ctfmon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: curl.exe" program="%systemroot%\System32\curl.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: curl.exe" program="%systemroot%\SysWOW64\curl.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: desktopimgdownldr.exe" program="%systemroot%\System32\desktopimgdownldr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: DeviceDisplayObjectProvider.exe" program="%systemroot%\System32\DeviceDisplayObjectProvider.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: DeviceDisplayObjectProvider.exe" program="%systemroot%\SysWOW64\DeviceDisplayObjectProvider.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Dfsvc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Dfsvc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Dfsvc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Dfsvc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: diskshadow.exe" program="%systemroot%\SysWOW64\diskshadow.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: diskshadow.exe" program="%systemroot%\System32\diskshadow.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Dnscmd.exe" program="%systemroot%\SysWOW64\Dnscmd.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Dnscmd.exe" program="%systemroot%\System32\Dnscmd.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: dwm.exe" program="%systemroot%\SysWOW64\dwm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: dwm.exe" program="%systemroot%\System32\dwm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\System32\eventvwr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: esentutl.exe" program="%systemroot%\SysWOW64\esentutl.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: esentutl.exe" program="%systemroot%\System32\esentutl.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Expand.exe" program="%systemroot%\System32\Expand.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Expand.exe" program="%systemroot%\SysWOW64\Expand.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: explorer.exe" program="%systemroot%\System32\explorer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: explorer.exe" program="%systemroot%\SysWOW64\explorer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Extexport.exe" program="%programfiles%\Internet Explorer\Extexport.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Extexport.exe" program="%programfiles(x86)%\Internet Explorer\Extexport.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: extrac32.exe" program="%systemroot%\System32\extrac32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: extrac32.exe" program="%systemroot%\SysWOW64\extrac32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: findstr.exe" program="%systemroot%\System32\findstr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: findstr.exe" program="%systemroot%\SysWOW64\findstr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: forfiles.exe" program="%systemroot%\System32\forfiles.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: forfiles.exe" program="%systemroot%\SysWOW64\forfiles.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ftp.exe" program="%systemroot%\System32\ftp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ftp.exe" program="%systemroot%\SysWOW64\ftp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: gpscript.exe" program="%systemroot%\System32\gpscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: gpscript.exe" program="%systemroot%\SysWOW64\gpscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: hh.exe" program="%systemroot%\System32\hh.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: hh.exe" program="%systemroot%\SysWOW64\hh.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ie4uinit.exe" program="%systemroot%\System32\ie4uinit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ie4uinit.exe" program="%systemroot%\SysWOW64\ie4uinit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ieexec.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\ieexec.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ieexec.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\ieexec.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ilasm.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\ilasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ilasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Infdefaultinstall.exe" program="%systemroot%\System32\Infdefaultinstall.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Infdefaultinstall.exe" program="%systemroot%\SysWOW64\Infdefaultinstall.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\Jsc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\Jsc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Jsc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Jsc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: lsass.exe" program="%systemroot%\System32\lsass.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: lsass.exe" program="%systemroot%\SysWOW64\lsass.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: makecab.exe" program="%systemroot%\System32\makecab.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: makecab.exe" program="%systemroot%\SysWOW64\makecab.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mavinject.exe" program="%systemroot%\System32\mavinject.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mavinject.exe" program="%systemroot%\SysWOW64\mavinject.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Microsoft.Workflow.Compiler.exe" program="%systemroot%\Microsoft.Net\Framework64\v4.0.30319\Microsoft.Workflow.Compiler.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mmc.exe" program="%systemroot%\SysWOW64\mmc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mmc.exe" program="%systemroot%\System32\mmc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.4-0\MpCmdRun.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.7-0\MpCmdRun.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.9-0\MpCmdRun.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v3.5\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v3.5\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: msconfig.exe" program="%systemroot%\System32\msconfig.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msdt.exe" program="%systemroot%\System32\Msdt.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Msdt.exe" program="%systemroot%\SysWOW64\Msdt.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mshta.exe" program="%systemroot%\System32\mshta.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: mshta.exe" program="%systemroot%\SysWOW64\mshta.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: msiexec.exe" program="%systemroot%\System32\msiexec.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: msiexec.exe" program="%systemroot%\SysWOW64\msiexec.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Netsh.exe" program="%systemroot%\System32\Netsh.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Netsh.exe" program="%systemroot%\SysWOW64\Netsh.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: notepad.exe" program="%systemroot%\system32\notepad.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: notepad.exe " program="%systemroot%\SysWOW64\notepad.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: odbcconf.exe" program="%systemroot%\System32\odbcconf.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: odbcconf.exe" program="%systemroot%\SysWOW64\odbcconf.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pcalua.exe" program="%systemroot%\System32\pcalua.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pcalua.exe" program="%systemroot%\SysWOW64\pcalua.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pcwrun.exe" program="%systemroot%\System32\pcwrun.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pcwrun.exe" program="%systemroot%\SysWOW64\pcwrun.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pktmon.exe" program="%systemroot%\System32\pktmon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: pktmon.exe" program="%systemroot%\SysWOW64\pktmon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: powershell.exe" program="%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: powershell.exe" program="%systemroot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: powershell_ise.exe" program="%systemroot%\System32\WindowsPowerShell\v1.0\powershell_ise.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: powershell_ise.exe" program="%systemroot%\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Presentationhost.exe" program="%systemroot%\System32\Presentationhost.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Presentationhost.exe" program="%systemroot%\SysWOW64\Presentationhost.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: print.exe" program="%systemroot%\System32\print.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: print.exe" program="%systemroot%\SysWOW64\print.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: psr.exe" program="%systemroot%\System32\psr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: psr.exe" program="%systemroot%\SysWOW64\psr.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rasautou.exe" program="%systemroot%\System32\rasautou.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rasautou.exe" program="%systemroot%\SysWOW64\rasautou.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: reg.exe" program="%systemroot%\System32\reg.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: reg.exe" program="%systemroot%\SysWOW64\reg.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\regasm.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regedit.exe" program="%systemroot%\System32\regedit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regedit.exe" program="%systemroot%\SysWOW64\regedit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regini.exe" program="%systemroot%\System32\regini.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regini.exe" program="%systemroot%\SysWOW64\regini.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Register-cimprovider.exe" program="%systemroot%\System32\Register-cimprovider.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: Register-cimprovider.exe" program="%systemroot%\SysWOW64\Register-cimprovider.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regsvcs.exe" program="%systemroot%\System32\regsvcs.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regsvcs.exe" program="%systemroot%\SysWOW64\regsvcs.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regsvr32.exe" program="%systemroot%\System32\regsvr32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: regsvr32.exe" program="%systemroot%\SysWOW64\regsvr32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: replace.exe" program="%systemroot%\System32\replace.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: replace.exe" program="%systemroot%\SysWOW64\replace.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rpcping.exe" program="%systemroot%\System32\rpcping.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rpcping.exe" program="%systemroot%\SysWOW64\rpcping.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rundll32.exe" program="%systemroot%\System32\rundll32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: rundll32.exe" program="%systemroot%\SysWOW64\rundll32.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: runonce.exe" program="%systemroot%\System32\runonce.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: runonce.exe" program="%systemroot%\SysWOW64\runonce.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: services.exe" program="%systemroot%\System32\services.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: services.exe" program="%systemroot%\SysWOW64\services.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: sc.exe" program="%systemroot%\System32\sc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: sc.exe" program="%systemroot%\SysWOW64\sc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: schtasks.exe" program="%systemroot%\System32\schtasks.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: schtasks.exe" program="%systemroot%\SysWOW64\schtasks.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: scriptrunner.exe" program="%systemroot%\System32\scriptrunner.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: scriptrunner.exe" program="%systemroot%\SysWOW64\scriptrunner.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: SyncAppvPublishingServer.exe" program="%systemroot%\System32\SyncAppvPublishingServer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: SyncAppvPublishingServer.exe" program="%systemroot%\SysWOW64\SyncAppvPublishingServer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: telnet.exe" program="%systemroot%\System32\telnet.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: telnet.exe" program="%systemroot%\SysWOW64\telnet.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: tftp.exe" program="%systemroot%\System32\tftp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: tftp.exe" program="%systemroot%\SysWOW64\tftp.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ttdinject.exe" program="%systemroot%\System32\ttdinject.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: ttdinject.exe" program="%systemroot%\SysWOW64\ttdinject.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: tttracer.exe" program="%systemroot%\System32\tttracer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: tttracer.exe" program="%systemroot%\SysWOW64\tttracer.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: vbc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: vbc.exe" program="%systemroot%\Microsoft.NET\Framework64\v3.5\vbc.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: verclsid.exe" program="%systemroot%\System32\verclsid.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: verclsid.exe" program="%systemroot%\SysWOW64\verclsid.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wab.exe" program="%programfiles%\Windows Mail\wab.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wab.exe" program="%programfiles(x86)%\Windows Mail\wab.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\System32\WerFault.exe" protocol=any dir=in enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\System32\WerFault.exe" protocol=any dir=in enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\SysWOW64\WerFault.exe" protocol=any dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\SysWOW64\WerFault.exe" protocol=any dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wininit.exe" program="%systemroot%\System32\wininit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wininit.exe" program="%systemroot%\SysWOW64\wininit.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: winlogon.exe" program="%systemroot%\System32\winlogon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: winlogon.exe" program="%systemroot%\SysWOW64\winlogon.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wmic.exe" program="%systemroot%\System32\wbem\wmic.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wmic.exe" program="%systemroot%\SysWOW64\wbem\wmic.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wordpad.exe" program="%programfiles%\windows nt\accessories\wordpad.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wordpad.exe" program="%programfiles(x86)%\windows nt\accessories\wordpad.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wscript.exe" program="%systemroot%\System32\wscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wscript.exe" program="%systemroot%\SysWOW64\wscript.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wsreset.exe" program="%systemroot%\System32\wsreset.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: wsreset.exe" program="%systemroot%\SysWOW64\wsreset.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: xwizard.exe" program="%systemroot%\System32\xwizard.exe" protocol=tcp dir=out enable=yes action=block profile=any
					netsh advfirewall firewall add rule name="Privacy.Sexy rule for: xwizard.exe" program="%systemroot%\SysWOW64\xwizard.exe" protocol=tcp dir=out enable=yes action=block profile=any
                revertCode: |-
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: appvlp.exe" program="C:\%programfiles%\Microsoft Office\root\client\AppVLP.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: appvlp.exe" program="C:\%programfiles(x86)%\Microsoft Office\root\client\AppVLP.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: At.exe" program="%systemroot%\System32\At.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: At.exe" program="%systemroot%\SysWOW64\At.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Attrib.exe" program="%systemroot%\System32\Attrib.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Attrib.exe" program="%systemroot%\SysWOW64\Attrib.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Atbroker.exe" program="%systemroot%\System32\Atbroker.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Atbroker.exe" program="%systemroot%\SysWOW64\Atbroker.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: bash.exe" program="%systemroot%\System32\bash.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: bash.exe" program="%systemroot%\SysWOW64\bash.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: bitsadmin.exe" program="%systemroot%\System32\bitsadmin.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: bitsadmin.exe" program="%systemroot%\SysWOW64\bitsadmin.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: calc.exe" program="%systemroot%\System32\calc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: calc.exe" program="%systemroot%\SysWOW64\calc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: certreq.exe" program="%systemroot%\System32\certreq.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: certreq.exe" program="%systemroot%\SysWOW64\certreq.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: certutil.exe" program="%systemroot%\System32\certutil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: certutil.exe" program="%systemroot%\SysWOW64\certutil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cmdkey.exe" program="%systemroot%\System32\cmdkey.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cmdkey.exe" program="%systemroot%\SysWOW64\cmdkey.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cmstp.exe" program="%systemroot%\System32\cmstp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cmstp.exe" program="%systemroot%\SysWOW64\cmstp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: CompatTelRunner.exe" program="%systemroot%\System32\CompatTelRunner.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: CompatTelRunner.exe" program="%systemroot%\SysWOW64\CompatTelRunner.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ConfigSecurityPolicy.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.9-0\ConfigSecurityPolicy.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: control.exe" program="%systemroot%\System32\control.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: control.exe" program="%systemroot%\SysWOW64\control.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Csc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Csc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Csc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Csc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cscript.exe" program="%systemroot%\System32\cscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: cscript.exe" program="%systemroot%\SysWOW64\cscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ctfmon.exe" program="%systemroot%\System32\ctfmon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ctfmon.exe" program="%systemroot%\SysWOW64\ctfmon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: curl.exe" program="%systemroot%\System32\curl.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: curl.exe" program="%systemroot%\SysWOW64\curl.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: desktopimgdownldr.exe" program="%systemroot%\System32\desktopimgdownldr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: DeviceDisplayObjectProvider.exe" program="%systemroot%\System32\DeviceDisplayObjectProvider.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: DeviceDisplayObjectProvider.exe" program="%systemroot%\SysWOW64\DeviceDisplayObjectProvider.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Dfsvc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Dfsvc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Dfsvc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Dfsvc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: diskshadow.exe" program="%systemroot%\SysWOW64\diskshadow.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: diskshadow.exe" program="%systemroot%\System32\diskshadow.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Dnscmd.exe" program="%systemroot%\SysWOW64\Dnscmd.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Dnscmd.exe" program="%systemroot%\System32\Dnscmd.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: dwm.exe" program="%systemroot%\SysWOW64\dwm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: dwm.exe" program="%systemroot%\System32\dwm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\System32\eventvwr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: esentutl.exe" program="%systemroot%\SysWOW64\esentutl.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: esentutl.exe" program="%systemroot%\System32\esentutl.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: eventvwr.exe" program="%systemroot%\SysWOW64\eventvwr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Expand.exe" program="%systemroot%\System32\Expand.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Expand.exe" program="%systemroot%\SysWOW64\Expand.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: explorer.exe" program="%systemroot%\System32\explorer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: explorer.exe" program="%systemroot%\SysWOW64\explorer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Extexport.exe" program="%programfiles%\Internet Explorer\Extexport.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Extexport.exe" program="%programfiles(x86)%\Internet Explorer\Extexport.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: extrac32.exe" program="%systemroot%\System32\extrac32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: extrac32.exe" program="%systemroot%\SysWOW64\extrac32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: findstr.exe" program="%systemroot%\System32\findstr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: findstr.exe" program="%systemroot%\SysWOW64\findstr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: forfiles.exe" program="%systemroot%\System32\forfiles.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: forfiles.exe" program="%systemroot%\SysWOW64\forfiles.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ftp.exe" program="%systemroot%\System32\ftp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ftp.exe" program="%systemroot%\SysWOW64\ftp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: gpscript.exe" program="%systemroot%\System32\gpscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: gpscript.exe" program="%systemroot%\SysWOW64\gpscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: hh.exe" program="%systemroot%\System32\hh.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: hh.exe" program="%systemroot%\SysWOW64\hh.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ie4uinit.exe" program="%systemroot%\System32\ie4uinit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ie4uinit.exe" program="%systemroot%\SysWOW64\ie4uinit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ieexec.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\ieexec.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ieexec.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\ieexec.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ilasm.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\ilasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ilasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Infdefaultinstall.exe" program="%systemroot%\System32\Infdefaultinstall.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Infdefaultinstall.exe" program="%systemroot%\SysWOW64\Infdefaultinstall.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: InstallUtil.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\Jsc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\Jsc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Jsc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Jsc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Jsc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: lsass.exe" program="%systemroot%\System32\lsass.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: lsass.exe" program="%systemroot%\SysWOW64\lsass.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: makecab.exe" program="%systemroot%\System32\makecab.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: makecab.exe" program="%systemroot%\SysWOW64\makecab.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mavinject.exe" program="%systemroot%\System32\mavinject.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mavinject.exe" program="%systemroot%\SysWOW64\mavinject.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Microsoft.Workflow.Compiler.exe" program="%systemroot%\Microsoft.Net\Framework64\v4.0.30319\Microsoft.Workflow.Compiler.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mmc.exe" program="%systemroot%\SysWOW64\mmc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mmc.exe" program="%systemroot%\System32\mmc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.4-0\MpCmdRun.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.7-0\MpCmdRun.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: MpCmdRun.exe" program="%ProgramData%\Microsoft\Windows Defender\Platform\4.18.2008.9-0\MpCmdRun.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v3.5\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v3.5\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msbuild.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: msconfig.exe" program="%systemroot%\System32\msconfig.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msdt.exe" program="%systemroot%\System32\Msdt.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Msdt.exe" program="%systemroot%\SysWOW64\Msdt.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mshta.exe" program="%systemroot%\System32\mshta.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: mshta.exe" program="%systemroot%\SysWOW64\mshta.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: msiexec.exe" program="%systemroot%\System32\msiexec.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: msiexec.exe" program="%systemroot%\SysWOW64\msiexec.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Netsh.exe" program="%systemroot%\System32\Netsh.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Netsh.exe" program="%systemroot%\SysWOW64\Netsh.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: notepad.exe" program="%systemroot%\system32\notepad.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: notepad.exe " program="%systemroot%\SysWOW64\notepad.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: odbcconf.exe" program="%systemroot%\System32\odbcconf.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: odbcconf.exe" program="%systemroot%\SysWOW64\odbcconf.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pcalua.exe" program="%systemroot%\System32\pcalua.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pcalua.exe" program="%systemroot%\SysWOW64\pcalua.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pcwrun.exe" program="%systemroot%\System32\pcwrun.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pcwrun.exe" program="%systemroot%\SysWOW64\pcwrun.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pktmon.exe" program="%systemroot%\System32\pktmon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: pktmon.exe" program="%systemroot%\SysWOW64\pktmon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: powershell.exe" program="%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: powershell.exe" program="%systemroot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: powershell_ise.exe" program="%systemroot%\System32\WindowsPowerShell\v1.0\powershell_ise.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: powershell_ise.exe" program="%systemroot%\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Presentationhost.exe" program="%systemroot%\System32\Presentationhost.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Presentationhost.exe" program="%systemroot%\SysWOW64\Presentationhost.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: print.exe" program="%systemroot%\System32\print.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: print.exe" program="%systemroot%\SysWOW64\print.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: psr.exe" program="%systemroot%\System32\psr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: psr.exe" program="%systemroot%\SysWOW64\psr.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rasautou.exe" program="%systemroot%\System32\rasautou.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rasautou.exe" program="%systemroot%\SysWOW64\rasautou.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: reg.exe" program="%systemroot%\System32\reg.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: reg.exe" program="%systemroot%\SysWOW64\reg.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regasm.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\regasm.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regedit.exe" program="%systemroot%\System32\regedit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regedit.exe" program="%systemroot%\SysWOW64\regedit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regini.exe" program="%systemroot%\System32\regini.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regini.exe" program="%systemroot%\SysWOW64\regini.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Register-cimprovider.exe" program="%systemroot%\System32\Register-cimprovider.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: Register-cimprovider.exe" program="%systemroot%\SysWOW64\Register-cimprovider.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regsvcs.exe" program="%systemroot%\System32\regsvcs.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regsvcs.exe" program="%systemroot%\SysWOW64\regsvcs.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regsvr32.exe" program="%systemroot%\System32\regsvr32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: regsvr32.exe" program="%systemroot%\SysWOW64\regsvr32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: replace.exe" program="%systemroot%\System32\replace.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: replace.exe" program="%systemroot%\SysWOW64\replace.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rpcping.exe" program="%systemroot%\System32\rpcping.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rpcping.exe" program="%systemroot%\SysWOW64\rpcping.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rundll32.exe" program="%systemroot%\System32\rundll32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: rundll32.exe" program="%systemroot%\SysWOW64\rundll32.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: runonce.exe" program="%systemroot%\System32\runonce.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: runonce.exe" program="%systemroot%\SysWOW64\runonce.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: services.exe" program="%systemroot%\System32\services.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: services.exe" program="%systemroot%\SysWOW64\services.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: sc.exe" program="%systemroot%\System32\sc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: sc.exe" program="%systemroot%\SysWOW64\sc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: schtasks.exe" program="%systemroot%\System32\schtasks.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: schtasks.exe" program="%systemroot%\SysWOW64\schtasks.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: scriptrunner.exe" program="%systemroot%\System32\scriptrunner.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: scriptrunner.exe" program="%systemroot%\SysWOW64\scriptrunner.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: SyncAppvPublishingServer.exe" program="%systemroot%\System32\SyncAppvPublishingServer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: SyncAppvPublishingServer.exe" program="%systemroot%\SysWOW64\SyncAppvPublishingServer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: telnet.exe" program="%systemroot%\System32\telnet.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: telnet.exe" program="%systemroot%\SysWOW64\telnet.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: tftp.exe" program="%systemroot%\System32\tftp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: tftp.exe" program="%systemroot%\SysWOW64\tftp.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ttdinject.exe" program="%systemroot%\System32\ttdinject.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: ttdinject.exe" program="%systemroot%\SysWOW64\ttdinject.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: tttracer.exe" program="%systemroot%\System32\tttracer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: tttracer.exe" program="%systemroot%\SysWOW64\tttracer.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: vbc.exe" program="%systemroot%\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: vbc.exe" program="%systemroot%\Microsoft.NET\Framework64\v3.5\vbc.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: verclsid.exe" program="%systemroot%\System32\verclsid.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: verclsid.exe" program="%systemroot%\SysWOW64\verclsid.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wab.exe" program="%programfiles%\Windows Mail\wab.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wab.exe" program="%programfiles(x86)%\Windows Mail\wab.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\System32\WerFault.exe" protocol=any dir=in profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\SysWOW64\WerFault.exe" protocol=any dir=in profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\System32\WerFault.exe" protocol=any dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: WerFault.exe" program="%systemroot%\SysWOW64\WerFault.exe" protocol=any dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wininit.exe" program="%systemroot%\System32\wininit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wininit.exe" program="%systemroot%\SysWOW64\wininit.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: winlogon.exe" program="%systemroot%\System32\winlogon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: winlogon.exe" program="%systemroot%\SysWOW64\winlogon.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wmic.exe" program="%systemroot%\System32\wbem\wmic.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wmic.exe" program="%systemroot%\SysWOW64\wbem\wmic.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wordpad.exe" program="%programfiles%\windows nt\accessories\wordpad.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wordpad.exe" program="%programfiles(x86)%\windows nt\accessories\wordpad.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wscript.exe" program="%systemroot%\System32\wscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wscript.exe" program="%systemroot%\SysWOW64\wscript.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wsreset.exe" program="%systemroot%\System32\wsreset.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: wsreset.exe" program="%systemroot%\SysWOW64\wsreset.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: xwizard.exe" program="%systemroot%\System32\xwizard.exe" protocol=tcp dir=out profile=any
					netsh advfirewall firewall delete rule name="Privacy.Sexy rule for: xwizard.exe" program="%systemroot%\SysWOW64\xwizard.exe" protocol=tcp dir=out profile=any

Revert All Selection

Problem Description

Easily revert every single selection that can be reverted with the click of a button. In cases the script did an oopsie I would like to easily and quickly revert all change made by the script. I can just click all then press a "Revert All Selection" button to have the opposite effect for reversible script

Proposed solution

Add a button that says "Revert All Selection", between script preset selection and OS selection maybe

Alternatives considered

Additional information

I used the 0.10.1 version

Script Updates

:: ----------------------------------------------------------
:: -----------------Ensure admin privileges------------------
:: ----------------------------------------------------------
REM --> Run Batch File as Admin Without Right Click

nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------------------- Defender Settings ------------------
:: ----------------------------------------------------------
echo --- Defender Extra Settings
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d "0" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableIOAVProtection" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRoutinelyTakingAction" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting" /v "DisableGenericRePorts" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Reporting" /v "DisableEnhancedNotifications" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v "DisableBlockAtFirstSeen" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v "SpynetReporting" /t REG_DWORD /d "0" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v "SubmitSamplesConsent" /t REG_DWORD /d "2" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "LocalSettingOverrideSpynetReporting" /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\Autologger\DefenderApiLogger" /v "Start" /t REG_DWORD /d "0" /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\Autologger\DefenderAuditLogger" /v "Start" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontReportInfectionInformation" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d 1 /f
reg add "HKLM\System\CurrentControlSet\Services\WdNisSvc" /v "Start" /t REG_DWORD /d "4" /f
echo. Add Hosts to Defender Exclusion
WMIC /NAMESPACE:\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath="%Windir%\System32\drivers\etc\hosts"
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ----- Remove DefaultUser0 Account For Privacy ------------
:: ----------------------------------------------------------
echo --- Remove DefaultUser0 Account For Privacy
net user defaultuser0 /delete
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: --------- Reset Defender Antimalware Platform ------------
:: ----------------------------------------------------------
echo --- Reset Defender Antimalware Platform
"%programfiles%\Windows Defender\MpCmdRun.exe" -resetplatform
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------- TakeOwnership of WaasMedic -----------------
:: ----------------------------------------------------------
echo --- TakeOwnership of WaasMedic logs and Delete them
takeown /f %SystemRoot%\Logs\waasmedic /r /d y
icacls %SystemRoot%\Logs\waasmedic /grant administrators:F /t
rd /s /q %SystemRoot%\Logs\waasmedic
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------- TakeOwnership of SystemApps ----------------
:: ----------------------------------------------------------
echo --- TakeOwnership of SystemApps and Delete extra found apps directories
takeown /f %SystemRoot%\SystemApps /r /d y
icacls %SystemRoot%\SystemApps /grant administrators:F /t
:: ----------------------------------------------------------

:: ----------------------------------------------------------
:: ------------ Set User TEMP to Windows TEMP ---------------
:: ----------------------------------------------------------
echo --- Setting User TEMP to Windows TEMP and Remove Onedrive User Variable
reg delete "HKCU\Environment" /v "OneDrive" /f
reg add "HKCU\Environment" /v "TEMP" /t REG_SZ /d "C:\Windows\Temp" /f
reg add "HKCU\Environment" /v "TMP" /t REG_SZ /d "C:\Windows\Temp" /f
:: ----------------------------------------------------------

Improved Ondrive Removal Part with complete Leftovers Removal
:: ----------------------------------------------------------
:: -------------------- Remove OneDrive ---------------------
:: ----------------------------------------------------------
echo --- Remove OneDrive
taskkill /f /im OneDrive.exe
%SystemRoot%\System32\OneDriveSetup.exe /uninstall
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
rd /S /Q "C:\OneDriveTemp"
rd /S /Q "%UserProfile%\OneDrive"
rd /S /Q "%LocalAppData%\Microsoft\OneDrive"
rd /S /Q "%ProgramData%\Microsoft OneDrive"
del /S /Q /F %AppData%\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"
reg delete "HKCR\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
reg delete "HKCR\Wow6432Node\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
reg add "HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d "1" /f
reg add "HKCR\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d "0" /f
reg add "HKCR\Wow6432Node\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d "0" /f
:: ----------------------------------------------------------

Improved Clear logs to watch all logs getting cleared : Must be in Last of Script [mandatory]
:: ----------------------------------------------------------
:: ------------ Clear All Windows Event Logs ----------------
:: ----------------------------------------------------------
echo --- Clearing All Windows Event Logs
for /f "tokens=*" %%i in ('wevtutil.exe el') do echo "%%i" & wevtutil.exe cl "%%i" & wevtutil.exe cl System
echo --- Cleared All Windows Event Logs
taskkill /f /im Explorer.exe & start Explorer.exe
:: ----------------------------------------------------------

Thanks & Regards ,
Disk2019

Support better way of using PowerShell scripts

Summary

Writing PowerShell is in windows.yaml not a clean and easy experience. It makes the contributor experience hard. It should be as easy as writing a "normal" powershell without thinking about call to PowerShell, escaping and inlining stuff.

Progress

  • Allow functions to be able to call each other
  • Introduce piping support when doing variable substitution with initial pipe: powershellEscapeInline
  • Introduce RunPowerShell function and refactor all PowerShell scripts to use it.

Background

Problem

Using PowerShell code in windows.yaml is difficult, an example is UninstallStoreApp function that looks like this:

PowerShell -ExecutionPolicy Unrestricted -Command "
  $package = Get-AppxPackage -AllUsers '{{ $packageName }}';
  if (!$package) {
    Write-Error \"Cannot reinstall '{{ $packageName }}'\" -ErrorAction Stop
  }
  $manifest = $package.InstallLocation + '\AppxManifest.xml';
  Add-AppxPackage -DisableDevelopmentMode -Register \"$manifest\" "

The problems are (as we are using batchfile to call powershell):

  • The whole PowerShell string must be a single line, and therefore each line must end with ;
  • Double quotes in the string must be escaped using e.g. \"

This results in hard development and testing experience when working with PowerShell scripts.

Solution

A solution should allow writing PowerShell that can be easily executed without any changes to the script. No escapes, no semicolons.

We would allow yaml-defined functions to call each other then we could separate out the part where PowerShell -ExecutionPolicy Unrestricted -Command "..code" happens.

For escaping backslash, and removing multilines and adding semicolons we could add some kind of "piping" support in our yaml-defined functions that would look like this. There are two alternatives of doing that:

  1. Introducing "replace" pipe command: e.g. PowerShell -ExecutionPolicy Unrestricted -Command "{{ $code | replace '\n' ';' | replace '"' '\"' }}".
  2. Introducing powershellEscapeInline pipe: e.g. PowerShell -ExecutionPolicy Unrestricted -Command "{{ $code | powershellEscapeInline }}"

The first solution gives insights about what it exactly is going but, but it might better to go with back-end defined powershellEscapeInline as inlining PowerShell could have more minifications and details to it.

So in the end the solution would look something like:

functions:
    -
        name: UninstallStoreApp
        parameters: [ packageName ]
        call:
            function: RunPowerShell
            parameters:
                code: |-
                    '{{ $packageName }}' | Remove-AppxPackage
                revertCode: |-
                    $package = Get-AppxPackage -AllUsers '{{ $packageName }}'
                    if (!$package) {
                        Write-Error "Cannot reinstall '{{ $packageName }}'"" -ErrorAction Stop
                    }
                    $manifest = $package.InstallLocation + '\AppxManifest.xml'
                    Add-AppxPackage -DisableDevelopmentMode -Register "$manifest"
    -
        name: RunPowerShell
        parameters: [ code, revertCode ]
        code: PowerShell -ExecutionPolicy Unrestricted -Command "{{ $code | powershellEscapeInline }}"
        revertCode: PowerShell -ExecutionPolicy Unrestricted -Command "{{ $revertCode | powershellEscapeInline }}"

Add support for shared functions

Right now adding repetitive code bloats the application file and makes is hard to maintain. E.g. removing apps, features and capabilities.

TODO:

  • In yaml, allow using and defining shared functions with parameters
  • In yaml, allow using parameter lists add add syntax for iterating them (for each) in code
  • Refactor feature, capability and app removal

Enhancement - Export or show list of settings before running

Since there are a lot of items to choose from, what would it take to make the selection for the "standard, strict, all" methods and show the items checked in a list? The cards are nice but still a lot to look through. Could this also be listed in the batch file we download to show the list of changes then pause for confirmation?

Failing security checks because of CVE-2021-27290

โ—๏ธ Note: This is not affecting any of the privacy.sexy users, it is a DoS vulnerability (see CVE) in developer dependency vue-cli v4.

We cannot monkey patch this so we should wait for the new releases for the dependencies.

Vue CLI depends on vulnerable zkat/ssri versions through:

  1. Direct dependency to ssri
    • ssri published a new release for the new version in 8.0.1
    • ssri backported the fix and released 6.0.2 (npm/ssri#18) that is used by webpack 4
    • there's an open PR for backporting to 7.0.2 (npm/ssri#20)
  2. webpack 4 dependency through webpack-contrib/terser-webpack-plugin
  3. zkat/cacache dependency
    • cacache that depends on vulnerable ssri has bumped its dependency version (npm/cacache#47) in newer versions(v15). However webpack 4 depends on older (v12) and ssri bump is not backported on it yet (npm/cacache#49).

There's an open issue on vuejs/vue-cli#6424 that has not been addressed yet.

Vulnerability has made it npm audit database.

Security checks pipeline is failing since yesterday because of npm audit mentioning this, see related GitHub actions run

see npm audit report
# npm audit report

ssri  5.2.2 - 6.0.1 || 7.0.0 - 8.0.0
Severity: moderate
Regular Expression Denial of Service - https://npmjs.com/advisories/565
fix available via `npm audit fix --force`
Will install @vue/[email protected], which is a breaking change
node_modules/@vue/cli-service/node_modules/ssri
node_modules/ssri
  @vue/cli-service  4.0.0-alpha.0 - 4.5.12
  Depends on vulnerable versions of ssri
  Depends on vulnerable versions of terser-webpack-plugin
  node_modules/@vue/cli-service
  cacache  10.0.4 - 11.0.0 || 13.0.0 - 14.0.0
  Depends on vulnerable versions of ssri
  node_modules/@vue/cli-service/node_modules/cacache
    terser-webpack-plugin  2.1.1 - 2.3.8
    Depends on vulnerable versions of cacache
    node_modules/@vue/cli-service/node_modules/terser-webpack-plugin

4 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.