diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/workflows/apbx.yaml b/.github/workflows/apbx.yaml index c1a32a4d55..7d2b46b8ad 100644 --- a/.github/workflows/apbx.yaml +++ b/.github/workflows/apbx.yaml @@ -3,11 +3,10 @@ name: Create and Validate Atlas Playbook on: push: paths: - - 'src/**' + - "src/**" env: - PACKAGE_PATH: '..\Atlas\src\playbook\Executables\AtlasModules\Packages' - SXSC_REPO: 'https://github.com/Atlas-OS/sxsc' + SXSC_REPO: "https://github.com/Atlas-OS/sxsc" jobs: package-build: @@ -15,7 +14,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} token: ${{ secrets.RUNNER_SECRET }} @@ -29,17 +28,28 @@ jobs: - 'src/sxsc/*.yaml' - name: Copy modified .yamls - if: steps.changed-files.outputs.sxsc_any_changed == 'true' - id: copy_yamls run: | - $configs = "..\configs" + $sxsc = '.\src\sxsc' + $configs = '..\configs' mkdir $configs | Out-Null - $changedFiles = "${{ steps.changed-files.outputs.sxsc_all_changed_files }}" -split ' ' + if ('${{ steps.changed-files.outputs.sxsc_any_changed }}' -eq 'true') { + $changedFiles = '${{ steps.changed-files.outputs.sxsc_all_changed_files }}' -split ' ' + } elseif (Test-Path "$sxsc\regenAllConfigs") { + Write-Output "Regenerating all configs..." + Remove-Item -Path "$sxsc\regenAllConfigs" -Force + Remove-Item -Path ".\src\playbook\Executables\AtlasModules\Packages\*.cab" -Force -Recurse + $changedFiles = Get-ChildItem $sxsc -Filter *.yaml + } else { + Write-Output "Not building any packages, no sxsc config changes detected." + "runSxsc=false" >> $env:GITHUB_ENV + exit + } + "runSxsc=true" >> $env:GITHUB_ENV foreach ($file in $changedFiles) { - Write-Output "Copying: $file" - Copy-Item $file $configs -Force + Write-Output "Copying: $file" + Copy-Item $file $configs -Force } - name: Clone the sxsc repository @@ -47,36 +57,43 @@ jobs: git clone --depth=1 ${{ env.SXSC_REPO }} Copy-Item -Path "configs" -Destination ".\sxsc\configs" -Recurse -Force working-directory: .. - if: ${{ steps.copy_yamls.outcome != 'skipped' }} + if: env.runSxsc == 'true' - name: Build CAB run: | - Write-Host "Installing dependencies..." + Write-Output "Installing dependencies..." pip install -r requirements.txt | Out-Null - $packagePath = "${{ env.PACKAGE_PATH }}" - mkdir $packagePath -EA SilentlyContinue | Out-Null - Get-ChildItem -Recurse "configs" -Filter *.yaml | ForEach-Object { - Write-Host "`nProcessing $($_.Name)`n------------------------------------------------------" + $atlasSrcPath = '..\Atlas\src\' + $packagePath = "$atlasSrcPath\playbook\Executables\AtlasModules\Packages" + mkdir $packagePath -EA 0 | Out-Null + Get-ChildItem "configs" -Filter *.yaml | ForEach-Object { + Write-Output "`n`nProcessing $($_.Name)`n------------------------------------------------------" Copy-Item -Path $_.FullName -Destination "cfg.yaml" -Force | Out-Null - Write-Host "Generating package files..." + $folderDir = ".\$atlasSrcPath\sxsc\$($_.Name -replace '-Arm','')" + if (Test-Path $folderDir -PathType Container) { + Write-Output "Copying $($_.Name)'s files..." + Copy-Item -Path "$folderDir\*" -Destination '.\' -Recurse -Force | Out-Null + } + + Write-Output "Generating package files..." python sxsc.py if ($LASTEXITCODE -ne 0) { exit 1 } - Write-Host "Building package..." + Write-Output "Building package..." .\build.bat - Write-Host "Copying package to AtlasModules..." + Write-Output "Copying package to AtlasModules..." Get-ChildItem -File -Recurse -Filter *.cab | ForEach-Object { Copy-Item -Path $_.FullName -Destination $packagePath -Force } - Write-Host "Cleaning up..." + Write-Output "Cleaning up..." .\clean.bat } working-directory: ..\sxsc - if: ${{ steps.copy_yamls.outcome != 'skipped' }} + if: env.runSxsc == 'true' - name: Commit and push changes run: | @@ -86,7 +103,7 @@ jobs: git commit -m "feat: auto-update CAB packages ($($env:GITHUB_SHA.Substring(0, 8)))" git push working-directory: src\playbook\Executables\AtlasModules\Packages - if: ${{ steps.copy_yamls.outcome != 'skipped' }} + if: env.runSxsc == 'true' build: needs: package-build @@ -94,12 +111,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Validate YAML files - run: 'yamllint -d "{extends: relaxed, rules: {line-length: disable, new-line-at-end-of-file: disable, trailing-spaces: disable}}" src/playbook/.' + run: 'yamllint -d "{extends: relaxed, rules: {empty-lines: disable, line-length: disable, new-line-at-end-of-file: disable, trailing-spaces: disable}}" src/playbook/.' - name: Configure playbook id: config-playbook @@ -110,9 +127,9 @@ jobs: sed -i '//d' playbook.conf echo "Change description of playbook..." sed -i 's|.*<\/Description>|Experimental testing version of the Atlas Playbook, built with GitHub Actions from commit ${{ github.sha }}. Be aware of these builds being potentially unstable and buggy!|g' playbook.conf - cd Configuration/atlas + cd Configuration echo "Enabling AME Wizard Live Log..." - sed '8s/ #//' + sed -i '7s/ #//' custom.yml - name: Create playbook (ZIP/APBX password is malte) if: ${{ steps.config-playbook.outcome != 'skipped' }} @@ -124,7 +141,7 @@ jobs: mv "Atlas Playbook ${GITHUB_SHA::8}.apbx" "../release-zip" - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ steps.config-playbook.outcome != 'skipped' }} with: name: Atlas Playbook diff --git a/.github/workflows/filter.yaml b/.github/workflows/filter.yaml index 4870a841b0..7798eb9c5d 100644 --- a/.github/workflows/filter.yaml +++ b/.github/workflows/filter.yaml @@ -29,7 +29,7 @@ jobs: auto-pr translations readme - dependabot + dependencies " no_run=false diff --git a/README.md b/README.md index dbaa802cdb..73962c9959 100644 --- a/README.md +++ b/README.md @@ -25,40 +25,40 @@ - [Branding](https://docs.atlasos.net/branding/) ## ๐Ÿค” What is Atlas? -Atlas is an open source project that enhances Windows by eliminating factors that negatively impact gaming performance. We optimize for minimal stutters and input lag, enhanced privacy, usability, and performance, all with a focus on maintaining functionality. +Atlas is an open-source project that enhances Windows by eliminating factors negatively impacting gaming performance. Optimizations include enhanced privacy, usability, performance, and changes for minimal stutters and input lag while focusing on maintaining functionality. ## ๐Ÿ‘€ Why Atlas? ### ๐Ÿ”’ Enhanced Privacy Atlas removes the majority of telemetry embedded within Windows and implements numerous group policies to minimize data collection. However, it cannot ensure privacy outside the scope of Windows, such as browsers and other third-party applications. -### โœ… Optimized Performance -Atlas strikes a balance between performance and compatibility. It implements numerous meaningful changes to improve Windows performance and responsiveness without breaking essential features. Atlas will not do tweaks for a placebo effect or very marginal gains, making Atlas more stable and compatible. +### ๐Ÿ“ˆ Optimized Performance +Atlas strikes a balance between performance and compatibility. It implements numerous meaningful changes to improve Windows performance and responsiveness without breaking essential features. Atlas will not do tweaks for a placebo effect or marginal gains, making Atlas more stable and compatible. ### ๐Ÿ›ก๏ธ Security Features -Unlike most other Windows modifications, we don't remove key security features that most users need to maintain a secure system. However, Atlas allows power users to have more customisation over disabling certain security features within their needs, including informing users with information about the [pros and cons](https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/) of each option. +Most Windows modifications remove key security features most users need to maintain a secure system. On the other hand, Atlas allows users to customize their security at their own risk while informing users about each option's [pros and cons](https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/). -Some security features which are optional are: +Some optional security features are: - Windows Defender & SmartScreen - Windows Update - - No automatic updates (will be customisable next release) - - No major feature updates (potentially customisable in the future) + - Automatic updates are togglable - CPU mitigations - User Account Control - Core isolation features -### ๐Ÿ˜„ Increased Usability +### โœ… Increased Usability Atlas applies many modifications and default settings to make Windows easier to use. This includes removing commonly unneeded applications (which are reinstallable), configuring many aspects of the interface, disabling advertisements, and much more. ### ๐Ÿ” Open Source and Transparent -Atlas is open source with the [GPLv3 license](https://github.com/Atlas-OS/Atlas/blob/main/LICENSE). -Unlike custom Windows ISOs, Atlas is easier to audit due to Atlas' use of the software [AME Wizard](https://ameliorated.io). AME Wizard is controlled by Playbooks, a heavily customizable script-esque system that can perform a wide range of tasks, including deep modifications to Windows. AME Wizard's backend is [open source](https://git.ameliorated.info/Styris/trusted-uninstaller-cli), meaning that you can see exactly what is ran. +Unlike custom Windows ISOs, Atlas is more straightforward to audit due to the use of [AME Wizard](https://ameliorated.io). AME Wizard is controlled by Playbooks, a customizable script-esque system that can perform various tasks. -Playbooks are renamed **.zip** archives (with the password [`malte`](https://docs.ameliorated.io/developers/getting-started/creation.html)) which primarily consists of plain text scripts, meaning that Atlas is much easier to audit to see exactly what is changed. This is unlike custom Windows ISOs, which have many more entry points for malicious activity. The minimal amount of binaries included in the Playbook are open source in our [utilities](https://github.com/Atlas-OS/utilities) repository, with the [hashes being listed here](https://github.com/Atlas-OS/Atlas/blob/main/src/playbook/Executables/AtlasModules/README.md). +Playbooks are renamed **.zip** archives, with the password [`malte`](https://docs.ameliorated.io/developers/getting-started/creation.html). As they primarily consist of plain text, Playbooks enable transparency, unlike custom Windows ISOs, which have many entry points for malicious activity. The few binaries in the Playbook are open source in our [`utilities` repository](https://github.com/Atlas-OS/utilities), with the [hashes listed here](https://github.com/Atlas-OS/Atlas/blob/main/src/playbook/Executables/AtlasModules/README.md). + +Although the GUI is not open source for AME Wizard, AME Wizard's entire backend (called [TrustedUninstaller](https://github.com/Ameliorated-LLC/trusted-uninstaller-cli)) is open source under MIT, which contains each action used to run Atlas. The Atlas Playbook is open source under the [GPLv3 license](https://github.com/Atlas-OS/Atlas/blob/main/LICENSE). ### ๐Ÿ”’ Legal Compliance -As Atlas doesn't redistrbute a modified Windows ISO, Atlas fully complies with [Microsoft's Terms of Service](https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/UseTerms_Retail_Windows_10_English.htm). In addition, activation in Windows is not modified. +As Atlas doesn't redistribute a modified Windows ISO, it complies with [Windows's Usage Terms](https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/UseTerms_Retail_Windows_10_English.htm). In addition, Atlas does not alter activation in Windows. ## ๐ŸŽจ Brand kit -Want to create your own Atlas wallpaper with some original creative designs? Download our brand kit [here](https://github.com/Atlas-OS/branding/archive/refs/heads/main.zip) and share your creations on our [forum](https://forum.atlasos.net/t/art-showcase). \ No newline at end of file +Want to create your own Atlas wallpaper with some original creative designs? Download our brand kit [here](https://github.com/Atlas-OS/branding/archive/refs/heads/main.zip) and share your creations on our [forum](https://forum.atlasos.net/t/art-showcase). diff --git a/src/playbook/Configuration/atlas/appx.yml b/src/playbook/Configuration/atlas/appx.yml index 0b3c4b456a..e817644583 100644 --- a/src/playbook/Configuration/atlas/appx.yml +++ b/src/playbook/Configuration/atlas/appx.yml @@ -1,132 +1,85 @@ --- -title: APPX -description: Removes APPX packages and prevents them from being reinstalled -privilege: TrustedInstaller +title: AppX +description: Removes AppX packages and prevents them from being reinstalled actions: - - !writeStatus: {status: 'Removing APPX packages'} + - !writeStatus: {status: 'Removing AppX packages'} - # The reason of removing those applications is that there is a potential of them sending user data, - # showing unwanted content (advertisements) and using hardware resources. They can also simply be - # annoyances that are never used. However, most of these applications can be reinstalled via the + # The reason of removing those applications is that they might be sending user data, + # showing unwanted content and using hardware resources. They can also simply be annoyances + # that are never used. However, most of these applications can be reinstalled via # Microsoft Store in case the user needs them. # https://docs.microsoft.com/en-us/windows/application-management/apps-in-windows-10 ##################################################################################################### - # Get current AppX packages to deprovision removed ones later + # Get current AppX packages to deprovision removed ones afterward - !powerShell: - command: '(Get-AppxPackage).PackageFamilyName | Out-File "$env:windir\AtlasModules\AtlasPackagesOld.txt"' + command: >- + (Get-AppxPackage).PackageFamilyName | + Out-File """$([Environment]::GetFolderPath('Windows'))\AtlasModules\AtlasPackagesOld.txt""" runas: currentUserElevated + wait: true - # Clipchamp - - !appx: {name: '*Clipchamp*', type: family} - - # Disney - - !appx: {name: '*Disney*', type: family} - - # Spotify - - !appx: {name: '*Spotify*', type: family} - - # Microsoft Teams - - !taskKill: {name: '*teams*', ignoreErrors: true} - - !appx: {name: '*MicrosoftTeams*', type: family} - - # Cortana - - !appx: {name: '*Microsoft.549981C3F5F10*', type: family} - - # Mixed Reality - - !appx: {name: '*Microsoft.MixedReality.Portal*', type: family} - - # Dev Home - - !appx: {name: '*Microsoft.Windows.DevHome*', type: family} - - # Network connection should not be needed in OOBE - # Could force users to have to login to a Microsoft account in OOBE - # Would not be a dependency of anything - - !appx: {name: '*Microsoft.Windows.OOBENetworkCaptivePortal*', type: family} - - !appx: {name: '*Microsoft.Windows.OOBENetworkConnectionFlow*', type: family} - - # Mail and Calendar - - !appx: {name: '*microsoft.windowscommunicationsapps*', type: family} - - # Take a Test - # https://www.mdsec.co.uk/2021/03/phishing-users-to-take-a-test - - !appx: {name: '*Microsoft.Windows.SecureAssessmentBrowser*', type: family} - - # Paint 3D - - !appx: {name: '*Microsoft.MSPaint*', type: family} - - # Game Bar - # Support is disabled by default - there shouldn't be a popup about 'ms-gaming-overlay-link' - - !appx: {name: '*Microsoft.XboxGameOverlay*', type: family} - - !appx: {name: '*Microsoft.XboxGamingOverlay*', type: family} - - # Widgets - - !taskKill: {name: '*widgets*', ignoreErrors: true} - - !appx: {name: '*MicrosoftWindows.Client.WebExperience*', type: family} + # AppX Microsoft Teams + # Seems legacy - not in 23H2? + - !taskKill: {name: 'msteams*', ignoreErrors: true} + - !appx: {name: 'MicrosoftTeams*', type: family} + - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications', value: 'ConfigureChatAutoInstall', data: '0', type: REG_DWORD} + + - !appx: {name: 'Clipchamp.Clipchamp*', type: family} + - !appx: {name: 'Disney.37853FC22B2CE*', type: family} + - !appx: {name: 'SpotifyAB.SpotifyMusic*', type: family} + - !appx: {name: 'Microsoft.549981C3F5F10*', type: family} # Cortana + - !appx: {name: 'Microsoft.XboxApp*', type: family} # Legacy Xbox Console Companion + - !appx: {name: 'microsoft.windowscommunicationsapps*', type: family} # Mail and Calendar + - !appx: {name: 'Microsoft.MSPaint*', type: family} # Paint 3D + - !appx: {name: 'Microsoft.Getstarted*', type: family} # Tips + - !appx: {name: 'Microsoft.ZuneVideo*', type: family} # Films & TV + - !appx: {name: 'MicrosoftCorporationII.MicrosoftFamily*', type: family} + - !appx: {name: 'Microsoft.MixedReality.Portal*', type: family} + - !appx: {name: 'Microsoft.Windows.DevHome*', type: family} + - !appx: {name: 'Microsoft.BingWeather*', type: family} + - !appx: {name: 'Microsoft.BingNews*', type: family} + - !appx: {name: 'Microsoft.OutlookForWindows*', type: family} + - !appx: {name: 'Microsoft.GetHelp*', type: family} + - !appx: {name: 'Microsoft.Microsoft3DViewer*', type: family} + - !appx: {name: 'Microsoft.MicrosoftOfficeHub*', type: family} + - !appx: {name: 'Microsoft.MicrosoftSolitaireCollection*', type: family} + - !appx: {name: 'Microsoft.MicrosoftStickyNotes*', type: family} + - !appx: {name: 'Microsoft.Office.OneNote*', type: family} + - !appx: {name: 'Microsoft.People*', type: family} + - !appx: {name: 'Microsoft.PowerAutomateDesktop*', type: family} + - !appx: {name: 'Microsoft.ScreenSketch*', type: family, option: 'remove-snipping-tool'} + - !appx: {name: 'Microsoft.SkypeApp*', type: family} + - !appx: {name: 'Microsoft.Todos*', type: family} + - !appx: {name: 'Microsoft.WindowsAlarms*', type: family} + - !appx: {name: 'Microsoft.WindowsCamera*', type: family} + - !appx: {name: 'Microsoft.WindowsFeedbackHub*', type: family} + - !appx: {name: 'Microsoft.WindowsMaps*', type: family} + - !appx: {name: 'Microsoft.WindowsSoundRecorder*', type: family} + # Removing using AME Wizard causes issues with Cross Device Experience Host installing + # - !appx: {name: 'Microsoft.YourPhone*', type: family} - !powerShell: - command: 'Get-AppxPackage ''MicrosoftWindows.Client.WebExperience'' | Remove-AppxPackage' + command: >- + Get-AppxPackage Microsoft.YourPhone* | Remove-AppxPackage; + Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -eq 'Microsoft.YourPhone' } | Remove-AppxProvisionedPackage -Online runas: currentUserElevated - - # Get Started - - !appx: {name: '*Microsoft.Getstarted*', type: family} - - !appx: {name: '*WebExperienceHost*', type: app, unregister: true} - - # Windows Backup - - !appx: {name: '*WindowsBackup*', type: app, unregister: true} - - # Advertisements/Telemetry - - !appx: {name: '*Global.Accounts*', type: app, unregister: true} - - !appx: {name: '*Global.BackupBanner*', type: app, unregister: true} - - !appx: {name: '*Global.IrisService*', type: app, unregister: true} - - !appx: {name: '*Global.ValueBanner*', type: app, unregister: true} - - - !powerShell: - command: '.\CLIENTCBS.ps1' - exeDir: true wait: true - # Family App, Quick Assist - - !appx: {name: '*MicrosoftCorporationII.QuickAssist*', type: family} - - !appx: {name: '*MicrosoftCorporationII.MicrosoftFamily*', type: family} - - - !appx: {name: '*Microsoft.Advertising.Xaml*', type: family} - - !appx: {name: '*Microsoft.BingNews*', type: family} - - !appx: {name: '*Microsoft.BingSearch*', type: family} - - !appx: {name: '*Microsoft.BingWeather*', type: family} - - !appx: {name: '*Microsoft.GetHelp*', type: family} - - !appx: {name: '*Microsoft.Microsoft3DViewer*', type: family} - - !appx: {name: '*Microsoft.MicrosoftOfficeHub*', type: family} - - !appx: {name: '*Microsoft.MicrosoftSolitaireCollection*', type: family} - - !appx: {name: '*Microsoft.MicrosoftStickyNotes*', type: family} - - !appx: {name: '*Microsoft.Office.OneNote*', type: family} - - !appx: {name: '*Microsoft.OutlookForWindows*', type: family} - - !appx: {name: '*Microsoft.People*', type: family} - - !appx: {name: '*Microsoft.PowerAutomateDesktop*', type: family} - - !appx: {name: '*Microsoft.Windows.PeopleExperienceHost*', type: family} - - !appx: {name: '*Microsoft.ScreenSketch*', type: family} - - !appx: {name: '*Microsoft.SkypeApp*', type: family} - - !appx: {name: '*Microsoft.Todos*', type: family} - - !appx: {name: '*Microsoft.Wallet*', type: family} - - !appx: {name: '*Microsoft.Windows.ParentalControls*', type: family} - - !appx: {name: '*Microsoft.Windows.Photos*', type: family} - - !appx: {name: '*Microsoft.WindowsAlarms*', type: family} - - !appx: {name: '*Microsoft.WindowsCamera*', type: family} - - !appx: {name: '*Microsoft.WindowsFeedbackHub*', type: family} - - !appx: {name: '*Microsoft.WindowsMaps*', type: family} - - !appx: {name: '*Microsoft.WindowsSoundRecorder*', type: family} - - !appx: {name: '*Microsoft.YourPhone*', type: family} - - !appx: {name: '*Microsoft.ZuneMusic*', type: family} - - !appx: {name: '*Microsoft.ZuneVideo*', type: family} - # Prevent provisioned applications from being reinstalled # https://learn.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update - !powerShell: - command: '$a = """$env:windir\AtlasModules\AtlasPackagesOld.txt"""; (diff (gc $a) ((Get-AppxPackage).PackageFamilyName)).InputObject | Foreach-Object { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned" -Name $_ -Force }; Remove-Item $a -Force' + command: >- + $a = """$([Environment]::GetFolderPath('Windows'))\AtlasModules\AtlasPackagesOld.txt"""; + (diff (gc $a) ((Get-AppxPackage).PackageFamilyName)).InputObject | + Foreach-Object { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned" -Name $_ -Force }; + Remove-Item $a -Force runas: currentUserElevated + wait: true # Clear caches of Client.CBS and more - - !appx: {operation: clearCache, name: '*Client.CBS*'} - - !appx: {operation: clearCache, name: '*Windows.Search*'} - - !appx: {operation: clearCache, name: '*Microsoft.Windows.SecHealthUI'} + - !writeStatus: {status: 'Clearing AppX caches'} + - !appx: {operation: clearCache, name: '*MicrosoftWindows.Client.CBS*'} + - !appx: {operation: clearCache, name: '*Microsoft.Windows.Search*'} + - !appx: {operation: clearCache, name: '*Microsoft.Windows.SecHealthUI*'} diff --git a/src/playbook/Configuration/atlas/components.yml b/src/playbook/Configuration/atlas/components.yml index dbd2e76e7e..51f2797151 100644 --- a/src/playbook/Configuration/atlas/components.yml +++ b/src/playbook/Configuration/atlas/components.yml @@ -1,7 +1,6 @@ --- title: Components description: Removes certain Windows components -privilege: TrustedInstaller actions: # Remove Security Center startup item - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', value: 'SecurityHealth', operation: delete} @@ -17,42 +16,42 @@ actions: # Microsoft Edge - !writeStatus: {status: 'Removing Microsoft Edge', option: 'uninstall-edge'} - !powerShell: - command: '& """.\AtlasModules\Scripts\ScriptWrappers\RemoveEdge.ps1""" -UninstallEdge -KeepAppX -Exit' + command: '& """.\AtlasModules\Scripts\ScriptWrappers\RemoveEdge.ps1""" -UninstallEdge -RemoveEdgeData -KeepAppX -NonInteractive' runas: currentUserElevated option: 'uninstall-edge' wait: true exeDir: true # AppX uninstallation in the script seems to fail, therefore it's not used and AME Wizard is used instead - - !appx: {name: '*Microsoft.MicrosoftEdge.Stable*', type: family, option: 'uninstall-edge'} - - !appx: {name: '*Microsoft.MicrosoftEdge*', type: family, option: 'uninstall-edge'} - - !appx: {name: '*Microsoft.MicrosoftEdgeDevToolsClient*', type: family, option: 'uninstall-edge'} + # Note that AppX Edge is removed from the latest builds of Windows, but people could be running a non-updated version + - !appx: {name: 'Microsoft.MicrosoftEdge_8wekyb3d8bbwe', type: family, option: 'uninstall-edge'} - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe', operation: add, option: 'uninstall-edge'} - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftEdge_8wekyb3d8bbwe', operation: add, option: 'uninstall-edge'} - - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe', operation: add, option: 'uninstall-edge'} # OneDrive # The actual OneDrive setup in Windows is stripped at a component-level in the miscellaneous package - !writeStatus: {status: 'Removing OneDrive'} - !run: {exeDir: true, exe: 'ONED.cmd'} + # Windows components and Telemetry - !writeStatus: {status: 'Removing components'} - !powerShell: - command: '& """.\AtlasModules\PackagesEnvironment\centralScript.ps1""" -PlaybookInstall' + command: >- + & """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\packageInstall.ps1""" + -InstallPackages @('*Z-Atlas-NoDefender-Package*', + '*Z-Atlas-NoTelemetry-Package*' + ) + -NoInteraction option: 'defender-disable' + runas: currentUserElevated wait: true exeDir: true - !powerShell: - command: '& """.\AtlasModules\PackagesEnvironment\centralScript.ps1""" -PlaybookInstall -EverythingButDefender' + command: >- + & """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\packageInstall.ps1""" + -InstallPackages @('*Z-Atlas-NoTelemetry-Package*') + -UninstallPackages @('*Z-Atlas-NoDefender-Package*') + -NoInteraction option: 'defender-enable' + runas: currentUserElevated wait: true exeDir: true - - # Update Health Tools - - !writeStatus: {status: 'Removing Update Health'} - - !powerShell: {command: 'Import-Module -Name """.\AtlasModules\Scripts\Modules\Uninstall-MsiexecAppByName\Uninstall-MsiexecAppByName.psm1"""; Uninstall-MsiexecAppByName -Name ''Microsoft Update Health Tools''', exeDir: true} - - # PC Health Check - - !writeStatus: {status: 'Removing PC Health Check'} - - !powerShell: {command: 'Import-Module -Name """.\AtlasModules\Scripts\Modules\Uninstall-MsiexecAppByName\Uninstall-MsiexecAppByName.psm1"""; Uninstall-MsiexecAppByName -Name ''Windows PC Health Check''', exeDir: true} - # The Microsoft Update Health Service stays, which is a Windows bug - - !service: {name: 'uhssvc', deleteUsingRegistry: true} diff --git a/src/playbook/Configuration/atlas/services.yml b/src/playbook/Configuration/atlas/services.yml index 3736b96bf7..9e60fc2532 100644 --- a/src/playbook/Configuration/atlas/services.yml +++ b/src/playbook/Configuration/atlas/services.yml @@ -1,7 +1,6 @@ --- -title: Configure Services and Drivers -description: Configures services and drivers to reduce background system resource utilisation -privilege: TrustedInstaller +title: Services and Drivers +description: Configures services and drivers to reduce background system resource utilization actions: # ---------------------------------- # - Potential references - @@ -11,32 +10,41 @@ actions: # https://learn.microsoft.com/en-us/windows-server/security/windows-services/security-guidelines-for-disabling-system-services-in-windows-server # https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/optimize/services - - !writeStatus: {status: 'Configuring services'} - - # Backup default Windows serivces & drivers - - !cmd: - command: 'powershell -NoP -EP Unrestricted -File BACKUP.ps1 "%windir%\AtlasModules\Other\winServices.reg"' + # Back up default Windows serivces & drivers + - !powerShell: + command: >- + .\BACKUP.ps1 -FilePath """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Other\winServices.reg""" wait: true exeDir: true ############################################################################################## - ## SERVICES ## + ## SCRIPTS ## ############################################################################################## + - !writeStatus: {status: 'Disabling Printing', option: 'disable-printing'} - !cmd: - command: '"AtlasDesktop\3. Configuration\Bluetooth\Disable Bluetooth.cmd" /silent' - option: 'disable-bluetooth' + command: '"AtlasDesktop\3. General Configuration\Printing\Disable Printing.cmd" /silent' + option: 'disable-printing' exeDir: true wait: true + - !writeStatus: {status: 'Disabling Bluetooth', option: 'disable-bluetooth'} - !cmd: - command: '"AtlasDesktop\3. Configuration\Printing\Disable Printing (default).cmd" /silent' + command: '"AtlasDesktop\3. General Configuration\Bluetooth\Disable Bluetooth.cmd" /silent' + option: 'disable-bluetooth' exeDir: true wait: true - - !cmd: - command: '"AtlasDesktop\3. Configuration\Notifications\Disable Notifications (default).cmd" /silent' + - !writeStatus: {status: 'Disabling File Sharing'} + - !powerShell: + command: '.\AtlasModules\Scripts\ScriptWrappers\DisableFileSharing.ps1 -Silent' exeDir: true wait: true + ############################################################################################## + ## SERVICES ## + ############################################################################################## + + - !writeStatus: {status: 'Configuring services'} + # ------ Microsoft recommendation - 'OK to disable' ------ - !service: {name: 'lfsvc', operation: change, startup: 4} - !service: {name: 'MapsBroker', operation: change, startup: 4} @@ -48,9 +56,6 @@ actions: # ------ Microsoft recommendation - 'Do not disable' ----- - !service: {name: 'diagnosticshub.standardcollector.service', operation: change, startup: 4} - - !service: {name: 'diagsvc', operation: change, startup: 4} - - !service: {name: 'WdiServiceHost', operation: change, startup: 4} - - !service: {name: 'WdiSystemHost', operation: change, startup: 4} - !service: {name: 'WerSvc', operation: change, startup: 4} - !service: {name: 'DispBrokerDesktopSvc', operation: change, startup: 4} diff --git a/src/playbook/Configuration/atlas/start.yml b/src/playbook/Configuration/atlas/start.yml index 68858b612b..3c6ae4ae51 100644 --- a/src/playbook/Configuration/atlas/start.yml +++ b/src/playbook/Configuration/atlas/start.yml @@ -1,53 +1,46 @@ --- title: Initial Configuration -description: Copies Atlas folders/files, installs dependencies and performs the preliminary configuration -privilege: TrustedInstaller +description: Performs the preliminary configuration actions: - # AME Wizard Live Log for development playbooks - # Do not change the line position of this, otherwise things will break when using local-build - # - !run: {exe: 'cmd.exe', args: '/c start "AME Wizard Live Log" PowerShell -NoP -C "gc -Wait Logs\TIOutput.txt -EA SilentlyContinue | Write-Output; pause"', baseDir: true, wait: false} + - !writeStatus: {status: 'Setting the environment'} + - !powerShell: + wait: true + command: >- + $modulesPath = """$([Environment]::GetFolderPath('Windows'))\AtlasModules"""; - # Prevent annoying notifications during deployment - - !registryValue: {path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance', value: 'Enabled', type: REG_DWORD, data: '0'} + function AddToVar($env, $value) { + $a = [IO.Path]::PathSeparator; + $b = [System.EnvironmentVariableTarget]::Machine; + $c = [Environment]::GetEnvironmentVariables($b); - # Prevent computer from going to sleep during deployment - - !run: {exe: 'powercfg.exe', args: '/setacvalueindex scheme_current sub_sleep standbyidle 0'} - - !run: {exe: 'powercfg.exe', args: '/setdcvalueindex scheme_current sub_sleep standbyidle 0'} + [Environment]::SetEnvironmentVariable($env, + ("""$($c.'Path');$value""" -replace ';',"""$a"""), + $b); + }; - - !writeStatus: {status: 'Copying files'} - - !cmd: - command: 'robocopy "AtlasModules" "%windir%\AtlasModules" /E /PURGE /IM /IT /NP > nul' - weight: 10 - wait: true - exeDir: true - - !cmd: - command: 'robocopy "AtlasDesktop" "%windir%\AtlasDesktop" /E /PURGE /IM /IT /NP > nul' - weight: 10 - wait: true - exeDir: true - - - !writeStatus: {status: 'Setting the environment'} - - !cmd: {command: 'setx PATH "%PATH%;%windir%\AtlasModules;%windir%\AtlasModules\Apps;%windir%\AtlasModules\Other;%windir%\AtlasModules\Tools;%windir%\AtlasModules\Scripts" -m'} - - !cmd: {command: 'setx PSModulePath "%PSModulePath%;%windir%\AtlasModules\Scripts\Modules" -m'} + AddToVar 'Path' """$modulesPath;$modulesPath\Apps;$modulesPath\Other;$modulesPath\Tools;$modulesPath\Scripts"""; - # Doesn't refresh the environment variables of TrustedUninstaller - # An alternative should be found, for now, exact paths are used - # - !writeStatus: {status: 'Refreshing variables'} - # - !run: {exeDir: true, exe: 'REFRESHENV.cmd'} + ################ NO LOCAL BUILD ################ - - !writeStatus: {status: 'Configuring Optional Features'} + - !writeStatus: {status: 'Enabling DirectPlay'} - !run: {exe: 'DISM.exe', args: '/Online /Enable-Feature /FeatureName:"DirectPlay" /NoRestart /All', weight: 30} - - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart', weight: 30, builds: [ '!>=22000' ]} - - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart', weight: 30} - - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart', weight: 30} - - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart', weight: 30} - - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart', weight: 30} + + - !writeStatus: {status: 'Disabling Internet Explorer', builds: [ '<22000' ]} + - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart', weight: 30, builds: [ '<22000' ]} - ################ NO LOCAL BUILD ################ + - !writeStatus: {status: 'Disabling Maths Recognizer', builds: [ '<22000' ]} + - !run: {exe: 'DISM.exe', args: '/Online /Remove-Capability /CapabilityName:"MathRecognizer~~~~0.0.1.0" /NoRestart', weight: 30, builds: [ '<22000' ]} - - !writeStatus: {status: 'Installing software'} + - !writeStatus: {status: 'Disabling Steps Recorder'} + - !run: {exe: 'DISM.exe', args: '/Online /Remove-Capability /CapabilityName:"App.StepsRecorder~~~~0.0.1.0" /NoRestart', weight: 30} - # Initial software (7-Zip & Visual C++ runtimes) + - !writeStatus: {status: 'Disabling Legacy Media Player'} + - !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"WindowsMediaPlayer" /NoRestart', weight: 30} + - !run: {exe: 'DISM.exe', args: '/Online /Remove-Capability /CapabilityName:"Media.WindowsMediaPlayer~~~~0.0.12.0" /NoRestart', weight: 30} + + # Initial software + # 7-Zip, Visual C++ Runtimes, DirectX + - !writeStatus: {status: 'Installing utilities'} - !powerShell: command: '.\SOFTWARE.ps1' exeDir: true @@ -56,14 +49,6 @@ actions: runas: currentUserElevated # Browsers - - !writeStatus: {status: 'Installing Google Chrome', option: 'browser-chrome'} - - !powerShell: - command: '.\SOFTWARE.ps1 -Chrome' - exeDir: true - wait: true - weight: 120 - option: 'browser-chrome' - runas: currentUserElevated - !writeStatus: {status: 'Installing Brave', option: 'browser-brave'} - !powerShell: command: '.\SOFTWARE.ps1 -Brave' @@ -80,57 +65,21 @@ actions: weight: 120 option: 'browser-firefox' runas: currentUserElevated - - # Media players - - !writeStatus: {status: 'Installing mpv', option: 'player-mpv'} + - !writeStatus: {status: 'Installing LibreWolf', option: 'browser-librewolf'} - !powerShell: - command: '.\SOFTWARE.ps1 -mpv' - exeDir: true - wait: true - weight: 90 - option: 'player-mpv' - runas: currentUserElevated - - !writeStatus: {status: 'Installing MPC-HC', option: 'player-mpchc'} - - !powerShell: - command: '.\SOFTWARE.ps1 -mpchc' - exeDir: true - wait: true - weight: 90 - option: 'player-mpchc' - runas: currentUserElevated - - !writeStatus: {status: 'Installing VLC', option: 'player-vlc'} - - !powerShell: - command: '.\SOFTWARE.ps1 -vlc' - exeDir: true - wait: true - weight: 90 - option: 'player-vlc' - runas: currentUserElevated - - # Text editors - - !writeStatus: {status: 'Installing Notepad++', option: 'editor-npp'} - - !powerShell: - command: '.\SOFTWARE.ps1 -npp' - exeDir: true - wait: true - weight: 90 - option: 'editor-npp' - runas: currentUserElevated - - !writeStatus: {status: 'Installing VSCode', option: 'editor-vscode'} - - !powerShell: - command: '.\SOFTWARE.ps1 -vscode' + command: '.\LIBREWOLF.ps1' exeDir: true wait: true weight: 120 - option: 'editor-vscode' + option: 'browser-librewolf' runas: currentUserElevated - - !writeStatus: {status: 'Installing VLC', option: 'editor-vscodium'} + - !writeStatus: {status: 'Installing Google Chrome', option: 'browser-chrome'} - !powerShell: - command: '.\SOFTWARE.ps1 -vscodium' + command: '.\SOFTWARE.ps1 -Chrome' exeDir: true wait: true weight: 120 - option: 'editor-vscodium' + option: 'browser-chrome' runas: currentUserElevated ################ END NO LOCAL BUILD ################ diff --git a/src/playbook/Configuration/custom.yml b/src/playbook/Configuration/custom.yml index 1a2da740ee..9b491bc188 100644 --- a/src/playbook/Configuration/custom.yml +++ b/src/playbook/Configuration/custom.yml @@ -1,12 +1,58 @@ --- title: Root Playbook File description: Runs all of the playbook files -privilege: TrustedInstaller -actions: [] +actions: + # AME Wizard Live Log for development playbooks + # Do not change the line position of this, otherwise things will break when using local-build + # - !run: {exe: 'cmd.exe', args: '/c start "AME Wizard Live Log" PowerShell -NoP -C "gc -Wait Logs\TIOutput.txt -EA SilentlyContinue | Write-Output; pause"', baseDir: true, wait: false} + + - !writeStatus: {status: 'Copying files'} + - !cmd: + command: 'robocopy "AtlasModules" "%windir%\AtlasModules" /E /PURGE /IM /IT /NP > nul' + weight: 10 + wait: true + exeDir: true + - !cmd: + command: 'robocopy "AtlasDesktop" "%windir%\AtlasDesktop" /E /PURGE /IM /IT /NP > nul' + weight: 10 + wait: true + exeDir: true + - !cmd: + command: 'copy /y "Themes" "%windir%\Resources\Themes" > nul' + weight: 10 + wait: true + exeDir: true + + # Prevent annoying notifications during deployment + - !taskKill: {name: 'explorer'} + - !cmd: + command: '"AtlasDesktop\3. General Configuration\Notifications\Disable Notifications.cmd" /includeuserservice' + exeDir: true + wait: true + runas: currentUserElevated + - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false} + + # Prevent computer from going to sleep during deployment + - !powerShell: + command: >- + $guid = New-Guid; + """$guid""" | Out-File -Force -LiteralPath """$([Environment]::GetFolderPath('Windows'))\atlasospowercfgguid"""; + powercfg /duplicatescheme """e9a42b02-d5df-448d-aa00-03f14749eb61""" """$guid"""; + powercfg /setactive """$guid"""; + powercfg /changename """$guid""" """Atlas Installation Scheme""" """Duplicate of Ultimate Performance used during Atlas installation."""; + powercfg /x monitor-timeout-ac 0; + powercfg /x monitor-timeout-dc 0; + powercfg /x disk-timeout-ac 0; + powercfg /x disk-timeout-dc 0; + powercfg /x standby-timeout-ac 0; + powercfg /x standby-timeout-dc 0; + powercfg /x hibernate-timeout-ac 0; + powercfg /x hibernate-timeout-dc 0; + + - !writeStatus: {status: 'Optimizing PowerShell'} tasks: # Configure PowerShell first so that other PowerShell scripts work - # NGEN - PowerShell optimization - - tweaks\statuses\status-ngen.yml + # NGEN - .NET assemblies PowerShell optimization - tweaks\scripts\script-ngen.yml - tweaks\qol\config-powershell.yml @@ -15,6 +61,10 @@ tasks: - tweaks\statuses\status-cleanup.yml - tweaks\scripts\script-cleanup.yml + # Set hidden Settings pages + # Done before everything else as scripts will overwrite it + - tweaks\qol\set-hidden-settings-pages.yml + # Main tasks - atlas\start.yml - atlas\services.yml diff --git a/src/playbook/Configuration/tweaks.yml b/src/playbook/Configuration/tweaks.yml index ea19704b92..da04d676a4 100644 --- a/src/playbook/Configuration/tweaks.yml +++ b/src/playbook/Configuration/tweaks.yml @@ -1,7 +1,6 @@ --- title: Tweaks Root Playbook File description: Runs all of the Atlas playbook tweaks -privilege: TrustedInstaller actions: [] tasks: # ------------------------- NOTES ------------------------- # @@ -15,6 +14,8 @@ tasks: # ----------------------- END NOTES ----------------------- # + + # ----------------------------------------------------- # Networking # ----------------------------------------------------- @@ -25,10 +26,7 @@ tasks: # ----------------------------------------------------- - tweaks\statuses\status-networking.yml - tweaks\networking\disable-llmnr.yml - - tweaks\networking\disable-smart-name-resolution.yml - - tweaks\networking\config-netsh.yml - - tweaks\networking\disable-network-power-saving.yml - - tweaks\networking\config-packet-sched-timer-res.yml + - tweaks\networking\atlas-network-settings.yml # -------------------------------------------------------------------------- # # networking\shares # @@ -37,6 +35,8 @@ tasks: - tweaks\networking\shares\restrict-anonymous-enumeration.yml - tweaks\networking\shares\disable-smb-bandwidth-throttling.yml + + # ----------------------------------------------------- # Performance # ----------------------------------------------------- @@ -47,12 +47,14 @@ tasks: # ----------------------------------------------------- - tweaks\statuses\status-performance.yml - tweaks\performance\config-mmcss.yml - - tweaks\performance\disable-game-bar.yml - - tweaks\performance\disable-automatic-maintenance.yml + - tweaks\performance\disable-auto-folder-discovery.yml + # - tweaks\performance\disable-game-bar.yml + - tweaks\performance\config-automatic-maintenance.yml - tweaks\performance\disable-background-apps.yml - tweaks\performance\disable-fth.yml - tweaks\performance\disable-sleep-study.yml + # -------------------------------------------------------------------------- # # performance\system # # -------------------------------------------------------------------------- # @@ -62,6 +64,8 @@ tasks: - tweaks\performance\system\disable-service-host-split.yml - tweaks\performance\system\win32-priority-seperation.yml + + # ----------------------------------------------------- # Privacy # ----------------------------------------------------- @@ -95,7 +99,6 @@ tasks: - tweaks\privacy\disallow-ms-accounts.yml - tweaks\privacy\disallow-user-activity-upload.yml - tweaks\privacy\search-settings.yml - # -------------------------------------------------------------------------- # # privacy\advertising # @@ -121,6 +124,8 @@ tasks: - tweaks\privacy\telemetry\disable-input-telemetry.yml - tweaks\privacy\telemetry\disallow-data-collection.yml + + # ----------------------------------------------------- # QOL # ----------------------------------------------------- @@ -152,7 +157,7 @@ tasks: - tweaks\qol\show-all-tasks-control-panel.yml - tweaks\qol\visual-effects.yml - tweaks\qol\disable-tips.yml - - tweaks\qol\set-hidden-settings-pages.yml + - tweaks\qol\disable-win11-settings-banner.yml # -------------------------------------------------------------------------- # # qol\appearance # @@ -166,11 +171,10 @@ tasks: # -------------------------------------------------------------------------- # - tweaks\qol\windows-update\disable-nagging.yml - tweaks\qol\windows-update\disable-insider.yml - - tweaks\qol\windows-update\disable-msrt-installation.yml + - tweaks\qol\windows-update\disable-msrt-telemetry.yml - tweaks\qol\windows-update\disable-feature-updates.yml - tweaks\qol\windows-update\disable-auto-updates.yml - tweaks\qol\windows-update\disable-auto-reboot.yml - - tweaks\qol\windows-update\defer-updates.yml - tweaks\qol\windows-update\disable-delivery-optimization.yml # -------------------------------------------------------------------------- # @@ -205,12 +209,11 @@ tasks: - tweaks\qol\explorer\dont-show-office-files.yml - tweaks\qol\explorer\use-compact-mode.yml - tweaks\qol\explorer\disable-gallery.yml + - tweaks\qol\explorer\debloat-send-to.yml # -------------------------------------------------------------------------- # # qol\explorer\add-context-menus # # -------------------------------------------------------------------------- # - # Currently and in the future, this will have no use - # - tweaks\qol\explorer\add-context-menus\install-cab.yml - tweaks\qol\explorer\add-context-menus\merge-as-trustedinstaller.yml - tweaks\qol\explorer\add-context-menus\new-bat.yml - tweaks\qol\explorer\add-context-menus\new-ps1.yml @@ -248,6 +251,7 @@ tasks: - tweaks\qol\shell\show-more-pins.yml - tweaks\qol\shell\no-recommendations-start-menu.yml - tweaks\qol\shell\disable-nearby-sharing.yml + - tweaks\qol\shell\disallow-edge-swipe.yml # -------------------------------------------------------------------------- # # qol\startup-shutdown # @@ -255,6 +259,7 @@ tasks: - tweaks\qol\startup-shutdown\decrease-shutdown-time.yml - tweaks\qol\startup-shutdown\disable-startup-delay.yml - tweaks\qol\startup-shutdown\force-end-shutdown-apps.yml + - tweaks\qol\startup-shutdown\enable-verbose-messages.yml # -------------------------------------------------------------------------- # # qol\system # @@ -266,7 +271,6 @@ tasks: # qol\taskbar # # -------------------------------------------------------------------------- # - tweaks\qol\taskbar\cmd-win-x.yml - - tweaks\qol\taskbar\disable-badges-taskbar.yml - tweaks\qol\taskbar\disable-cloud-optimized-content.yml - tweaks\qol\taskbar\disable-desktop-peek.yml - tweaks\qol\taskbar\disable-news-and-interests.yml @@ -279,6 +283,8 @@ tasks: - tweaks\qol\taskbar\set-to-left.yml - tweaks\qol\taskbar\end-task.yml + + # ----------------------------------------------------- # Security # ----------------------------------------------------- @@ -292,6 +298,8 @@ tasks: - tweaks\security\delete-defaultuser0.yml - tweaks\security\disable-remote-assistance.yml + + # ----------------------------------------------------- # Debloat # ----------------------------------------------------- @@ -307,6 +315,8 @@ tasks: - tweaks\debloat\hide-unused-security-pages.yml - tweaks\debloat\config-storage-sense.yml + + # ----------------------------------------------------- # Scripts # ----------------------------------------------------- @@ -321,9 +331,11 @@ tasks: - tweaks\scripts\script-mitigations.yml - tweaks\scripts\script-devices.yml - tweaks\scripts\script-pfp.yml - - tweaks\scripts\script-power.yml - tweaks\scripts\script-finalize.yml - tweaks\scripts\script-backup2.yml + - tweaks\scripts\script-clientcbs.yml + + # ----------------------------------------------------- # Misc @@ -335,9 +347,11 @@ tasks: # ----------------------------------------------------- - tweaks\statuses\status-misc.yml - tweaks\misc\config-time.yml - - tweaks\misc\disable-game-mode.yml - tweaks\misc\delete-windows-specific-files.yml - tweaks\misc\config-oem-information.yml - tweaks\misc\rebuild-perf-counters.yml - - tweaks\misc\restore-default-sleep-timeout.yml - tweaks\misc\create-shortcuts.yml + - tweaks\misc\add-music-videos-to-home.yml + - tweaks\misc\add-newUsers-script.yml + - tweaks\scripts\script-power.yml # Done last on purpose + - tweaks\misc\enable-notifications.yml diff --git a/src/playbook/Configuration/tweaks/debloat/config-content-delivery.yml b/src/playbook/Configuration/tweaks/debloat/config-content-delivery.yml index 639cc50e92..5e43f3abfb 100644 --- a/src/playbook/Configuration/tweaks/debloat/config-content-delivery.yml +++ b/src/playbook/Configuration/tweaks/debloat/config-content-delivery.yml @@ -1,13 +1,25 @@ --- title: Configure Content Delivery Manager -description: Configures Content Delivery Manager not to download any applications such as Candy Crush Soda and disables suggested content (tips/tricks/facts/suggestions/ads) for QoL and privacy -privilege: TrustedInstaller +description: Configures Content Delivery Manager not to download applications like Candy Crush Soda and turns off suggested content (tips/tricks/facts/suggestions/ads) for QoL and privacy. actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'ContentDeliveryAllowed' data: '0' type: REG_DWORD + - !registryValue: + path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' + value: 'FeatureManagementEnabled' + data: '0' + type: REG_DWORD + - !registryValue: + path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' + value: 'SubscribedContentEnabled' + data: '0' + type: REG_DWORD + + # Prevent suggested app installs + # https://www.tenforums.com/tutorials/68217-turn-off-automatic-installation-suggested-apps-windows-10-a.html - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'OemPreInstalledAppsEnabled' @@ -28,16 +40,31 @@ actions: value: 'SilentInstalledAppsEnabled' data: '0' type: REG_DWORD + + # Commented as these removals would likely break re-enabling content + # Content would likely stay disabled anyways + # - !registryKey: + # path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\Subscriptions' + # - !registryKey: + # path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps' + + # 'Show me notifications in the Settings app' in Windows 11 - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'SubscribedContentEnabled' + path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\SystemSettings\AccountNotifications' + value: 'EnableAccountNotifications' data: '0' type: REG_DWORD + + # Windows welcome experience + # https://winaero.com/disable-welcome-page-windows-10/ - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'SubscribedContent-310093Enabled' data: '0' type: REG_DWORD + + # Suggested content in the Settings app + # https://www.tenforums.com/tutorials/100541-turn-off-suggested-content-settings-app-windows-10-a.html - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'SubscribedContent-338393Enabled' @@ -55,24 +82,34 @@ actions: type: REG_DWORD - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'SubscribedContent-338387Enabled' + value: 'SystemPaneSuggestionsEnabled' data: '0' type: REG_DWORD + + # "Get fun facts, tips, tricks, and more on your lock screen" + # https://www.elevenforum.com/t/enable-or-disable-facts-tips-and-tricks-on-lock-screen-in-windows-11.7079/ - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'RotatingLockScreenOverlayEnabled' + value: 'SubscribedContent-338387Enabled' data: '0' type: REG_DWORD - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'SubscribedContent-338388Enabled' + value: 'RotatingLockScreenOverlayEnabled' data: '0' type: REG_DWORD + + # Suggestions in Start + # https://www.tenforums.com/tutorials/24117-turn-off-app-suggestions-start-windows-10-a.html - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'SystemPaneSuggestionsEnabled' + value: 'SubscribedContent-338388Enabled' data: '0' type: REG_DWORD + + # "Get tips, tricks, and suggestions as you use Windows" + # https://www.tenforums.com/tutorials/30869-turn-off-tip-trick-suggestion-notifications-windows-10-a.html + # https://winaero.com/disable-tips-about-windows-10/ - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'SubscribedContent-338389Enabled' @@ -83,12 +120,3 @@ actions: value: 'SoftLandingEnabled' data: '0' type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' - value: 'FeatureManagementEnabled' - data: '0' - type: REG_DWORD - - !registryKey: - path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\Subscriptions' - - !registryKey: - path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps' diff --git a/src/playbook/Configuration/tweaks/debloat/config-storage-sense.yml b/src/playbook/Configuration/tweaks/debloat/config-storage-sense.yml index ebb385443e..1dfe2a149e 100644 --- a/src/playbook/Configuration/tweaks/debloat/config-storage-sense.yml +++ b/src/playbook/Configuration/tweaks/debloat/config-storage-sense.yml @@ -1,7 +1,6 @@ --- title: Configure Storage Sense description: Configures Storage Sense to automatically cleanup temporary files every month -privilege: TrustedInstaller actions: # Reference: https://gist.github.com/he3als/3d9dcf6e796aa920c24a98130165fb17 diff --git a/src/playbook/Configuration/tweaks/debloat/disable-reserved-storage.yml b/src/playbook/Configuration/tweaks/debloat/disable-reserved-storage.yml index 086d538bc1..67f915913f 100644 --- a/src/playbook/Configuration/tweaks/debloat/disable-reserved-storage.yml +++ b/src/playbook/Configuration/tweaks/debloat/disable-reserved-storage.yml @@ -1,20 +1,5 @@ --- title: Disable Reserved Storage description: Disables reserved storage for Windows Updates to have more storage space -privilege: TrustedInstaller actions: - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager' - value: 'MiscPolicyInfo' - data: '2' - type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager' - value: 'PassedPolicy' - data: '0' - type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager' - value: 'ShippedWithReserves' - data: '0' - type: REG_DWORD + - !run: {exe: 'DISM.exe', args: '/Online /Set-ReservedStorageState /State:Disabled', weight: 30} diff --git a/src/playbook/Configuration/tweaks/debloat/disable-scheduled-tasks.yml b/src/playbook/Configuration/tweaks/debloat/disable-scheduled-tasks.yml index c0e9cf939b..a29a5ad472 100644 --- a/src/playbook/Configuration/tweaks/debloat/disable-scheduled-tasks.yml +++ b/src/playbook/Configuration/tweaks/debloat/disable-scheduled-tasks.yml @@ -1,43 +1,48 @@ --- title: Disable Scheduled Tasks description: Disables scheduled tasks to prevent automatic tasks from running at startup, consuming resources and collecting user data -privilege: TrustedInstaller actions: - # https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks + # "The Windows Scheduled Maintenance Task performs periodic maintenance of the + # computer system by fixing problems automatically or reporting them through Security and Maintenance." + - !scheduledTask: {path: '\Microsoft\Windows\Diagnosis\Scheduled', operation: disable} - - !scheduledTask: - path: '\Microsoft\Windows\Location' - operation: deleteFolder + # Updates compatibility database + - !scheduledTask: {path: '\Microsoft\Windows\Application Experience\PcaPatchDbTask', operation: disable} - - !scheduledTask: {path: '\Microsoft\Windows\ApplicationData\appuriverifierdaily'} - - !scheduledTask: {path: '\Microsoft\Windows\Application Experience\PcaPatchDbTask'} - - !scheduledTask: {path: '\Microsoft\Windows\Application Experience\StartupAppTask'} - - !scheduledTask: {path: '\Microsoft\Windows\ApplicationData\DsSvcCleanup'} - - !scheduledTask: {path: '\Microsoft\Windows\CloudExperienceHost\CreateObjectTask'} - - !scheduledTask: {path: '\Microsoft\Windows\Diagnosis\Scheduled'} - - !scheduledTask: {path: '\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector'} - - !scheduledTask: {path: '\Microsoft\Windows\DiskFootprint\Diagnostics'} - - !scheduledTask: {path: '\Microsoft\Windows\InstallService\ScanForUpdates'} - - !scheduledTask: {path: '\Microsoft\Windows\InstallService\ScanForUpdatesAsUser'} - - !scheduledTask: {path: '\Microsoft\Windows\Maintenance\WinSAT'} - - !scheduledTask: {path: '\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic'} - - !scheduledTask: {path: '\Microsoft\Windows\PI\Sqm-Tasks'} - - !scheduledTask: {path: '\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem'} - - !scheduledTask: {path: '\Microsoft\Windows\Registry\RegIdleBackup'} - - !scheduledTask: {path: '\Microsoft\Windows\Shell\FamilySafetyMonitor'} - - !scheduledTask: {path: '\Microsoft\Windows\Shell\FamilySafetyRefresh'} - - !scheduledTask: {path: '\Microsoft\Windows\Shell\IndexerAutomaticMaintenance'} - - !scheduledTask: {path: '\Microsoft\Windows\StateRepository\MaintenanceTasks'} - - !scheduledTask: {path: '\Microsoft\Windows\WindowsUpdate\Scheduled Start'} + # ------------------------------------------------------------------------------------- # Here are the scheduled tasks that are currently commented as they're under review. - # This list should be somewhat minimal in the tasks it deletes, as a lot of the tasks below won't run by default ever anyways, unless needed. + # This list should be somewhat minimal in the tasks it deletes, as a lot of the tasks + # below won't run by default ever anyways, unless needed. # Telemetry and CEIP/SQM is stripped by default anyways, so don't worry about that. + # ------------------------------------------------------------------------------------- # - !scheduledTask: # path: '\Microsoft\Windows\DeviceDirectoryClient' # operation: deleteFolder + # Needed for Windows Update to function properly + # - !scheduledTask: {path: '\Microsoft\Windows\InstallService\ScanForUpdates'} + # - !scheduledTask: {path: '\Microsoft\Windows\InstallService\ScanForUpdatesAsUser'} + # - !scheduledTask: {path: '\Microsoft\Windows\WindowsUpdate\Scheduled Start'} + + # Wouldn't be randomly executed + # - !scheduledTask: {path: '\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector'} + # - !scheduledTask: {path: '\Microsoft\Windows\DiskFootprint\Diagnostics'} + # - !scheduledTask: {path: '\Microsoft\Windows\Maintenance\WinSAT'} + # - !scheduledTask: {path: '\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic'} + # - !scheduledTask: {path: '\Microsoft\Windows\Shell\IndexerAutomaticMaintenance'} # Unless indexing is enabled + # - !scheduledTask: {path: '\Microsoft\Windows\Shell\FamilySafetyMonitor'} + # - !scheduledTask: {path: '\Microsoft\Windows\Shell\FamilySafetyRefresh'} + # - !scheduledTask: {path: '\Microsoft\Windows\PI\Sqm-Tasks'} + # - !scheduledTask: {path: '\Microsoft\Windows\Registry\RegIdleBackup'} # Registry backups are disabled by default + # - !scheduledTask: {path: '\Microsoft\Windows\StateRepository\MaintenanceTasks'} + # - !scheduledTask: {path: '\Microsoft\Windows\ApplicationData\appuriverifierdaily'} + # - !scheduledTask: + # path: '\Microsoft\Windows\Location' + # operation: deleteFolder + + # Needs research # - !scheduledTask: {path: '\Microsoft\Windows\AppID\EDP Policy Manager'} # - !scheduledTask: {path: '\Microsoft\Windows\ApplicationData\appuriverifierinstall'} # - !scheduledTask: {path: '\Microsoft\Windows\BrokerInfrastructure\BgTaskRegistrationMaintenanceTask'} @@ -52,3 +57,6 @@ actions: # - !scheduledTask: {path: '\Microsoft\Windows\UPnP\UPnPHostConfig'} # - !scheduledTask: {path: '\Microsoft\Windows\WaaSMedic\PerformRemediation'} # - !scheduledTask: {path: '\Microsoft\Windows\Windows Media Sharing\UpdateLibrary'} + # - !scheduledTask: {path: '\Microsoft\Windows\CloudExperienceHost\CreateObjectTask'} + # - !scheduledTask: {path: '\Microsoft\Windows\ApplicationData\DsSvcCleanup'} + # - !scheduledTask: {path: '\Microsoft\Windows\Application Experience\StartupAppTask'} # notification to the user if there are too many startup entries diff --git a/src/playbook/Configuration/tweaks/debloat/hide-unused-security-pages.yml b/src/playbook/Configuration/tweaks/debloat/hide-unused-security-pages.yml index 35ba01b95d..1bf570110f 100644 --- a/src/playbook/Configuration/tweaks/debloat/hide-unused-security-pages.yml +++ b/src/playbook/Configuration/tweaks/debloat/hide-unused-security-pages.yml @@ -1,7 +1,6 @@ --- title: Hide Unused Windows Security Pages description: Hides Windows Security pages that are not commonly needed/used to have a more clean UI -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Family options' diff --git a/src/playbook/Configuration/tweaks/misc/add-music-videos-to-home.yml b/src/playbook/Configuration/tweaks/misc/add-music-videos-to-home.yml new file mode 100644 index 0000000000..fe92f42900 --- /dev/null +++ b/src/playbook/Configuration/tweaks/misc/add-music-videos-to-home.yml @@ -0,0 +1,18 @@ +--- +title: Add Music & Videos To Home +description: After disabling recent files in Quick Access, Music & Videos disappear. This fixes that. +actions: + - !powerShell: + command: >- + $o = new-object -com shell.application; + $currentPins = $o.Namespace('shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}').Items() | ForEach-Object { $_.Path }; + foreach ($path in @( + [Environment]::GetFolderPath('MyVideos'), + [Environment]::GetFolderPath('MyMusic') + )) { + if ($currentPins -notcontains $path) { + $o.Namespace($path).Self.InvokeVerb('pintohome') + } + } + runas: currentUser + wait: true diff --git a/src/playbook/Configuration/tweaks/misc/add-newUsers-script.yml b/src/playbook/Configuration/tweaks/misc/add-newUsers-script.yml new file mode 100644 index 0000000000..98d0bcf3fb --- /dev/null +++ b/src/playbook/Configuration/tweaks/misc/add-newUsers-script.yml @@ -0,0 +1,11 @@ +--- +title: Add newUsers.ps1 script +description: Adds the newUsers.ps1 script to RunOnce, which applies any tweaks that are dynamically generated on new user creation +actions: + - !registryValue: + path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce' + value: 'RunScript' + data: >- + powershell -EP Bypass -NoP & """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\newUsers.ps1""" + type: REG_SZ + scope: defaultUser diff --git a/src/playbook/Configuration/tweaks/misc/config-oem-information.yml b/src/playbook/Configuration/tweaks/misc/config-oem-information.yml index 6e28b20326..9b633bb53f 100644 --- a/src/playbook/Configuration/tweaks/misc/config-oem-information.yml +++ b/src/playbook/Configuration/tweaks/misc/config-oem-information.yml @@ -1,7 +1,6 @@ --- title: Configure OEM Information description: Configures OEM information to contain the Atlas version and the Atlas Discord server -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation' diff --git a/src/playbook/Configuration/tweaks/misc/config-time.yml b/src/playbook/Configuration/tweaks/misc/config-time.yml index 4bad76a5cf..fcb2490d47 100644 --- a/src/playbook/Configuration/tweaks/misc/config-time.yml +++ b/src/playbook/Configuration/tweaks/misc/config-time.yml @@ -1,7 +1,6 @@ --- title: Configure Time Servers description: Configures time servers to be more reliable and accurate than the defaults -privilege: TrustedInstaller actions: # https://www.pool.ntp.org/en/use.html - !service: {name: 'w32time', operation: start, ignoreErrors: true} diff --git a/src/playbook/Configuration/tweaks/misc/create-shortcuts.yml b/src/playbook/Configuration/tweaks/misc/create-shortcuts.yml index 4d554de3ab..c1af61b64c 100644 --- a/src/playbook/Configuration/tweaks/misc/create-shortcuts.yml +++ b/src/playbook/Configuration/tweaks/misc/create-shortcuts.yml @@ -1,7 +1,6 @@ --- title: Create Shortcuts description: Creates shortcuts for the desktop and more -privilege: TrustedInstaller actions: - !powerShell: command: '.\SHORTCUTS.ps1' diff --git a/src/playbook/Configuration/tweaks/misc/delete-windows-specific-files.yml b/src/playbook/Configuration/tweaks/misc/delete-windows-specific-files.yml index deaa727643..8ed9a0f70e 100644 --- a/src/playbook/Configuration/tweaks/misc/delete-windows-specific-files.yml +++ b/src/playbook/Configuration/tweaks/misc/delete-windows-specific-files.yml @@ -1,18 +1,27 @@ --- title: Delete Windows-version Specific Tweaks description: Deletes Windows 10 or Windows 11-only tweaks in the Atlas folder, depending on the current version -privilege: TrustedInstaller actions: - # Windows 11-only - - !file: {path: '%windir%\AtlasDesktop\3. Configuration\Background Apps', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\3. Configuration\Power\Timer Resolution', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\File Explorer Customization\Compact View', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\File Explorer Customization\Gallery', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\File Explorer Customization\Folders in This PC\Win11', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\Windows 11 Context Menu', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\Windows Copilot', builds: [ '!>=22000' ]} - - !file: {path: '%windir%\AtlasModules\Tools\TimerResolution.exe', builds: [ '!>=22000' ]} + # Delete files exclusive to Windows 11 + - !file: {path: '%windir%\AtlasDesktop\3. General Configuration\Background Apps', builds: [ '<22000' ]} + - !file: {path: '%windir%\AtlasModules\Tools\TimerResolution.exe', builds: [ '<22000' ]} + - !file: {path: '%windir%\AtlasDesktop\3. General Configuration\Power\Timer Resolution', builds: [ '<22000' ]} + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Compact View', builds: [ '<22000' ]} + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Gallery', builds: [ '<22000' ]} + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\Context Menu\Windows 11', builds: [ '<22000' ]} - # Windows 10-only - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\File Explorer Customization\Folders in This PC\Win10', builds: [ '>=22000' ]} - - !file: {path: '%windir%\AtlasDesktop\4. Optional Tweaks\Volume Flyout', builds: [ '>=22000' ], ignoreErrors: true} + # Delete files exclusive to Windows 10 + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Folders in This PC', builds: [ '>=22000' ]} + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\File Explorer Customization\Quick Access', builds: [ '>=22000' ]} + - !file: {path: '%windir%\AtlasDesktop\4. Interface Tweaks\Old Flyouts', builds: [ '>=22000' ], ignoreErrors: true} + + # Delete ARM-specific files + # FTH files are deleted in its yml + - !powerShell: + command: >- + if (((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64')) { + Write-Output 'ARM detected, removing Open-Shell as it''s incompatible.'; + Remove-Item -Path """$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\4. Interface Tweaks\Start Menu\*Open-Shell*""" -Force -Recurse; + exit 2000 + }; + wait: true diff --git a/src/playbook/Configuration/tweaks/misc/disable-game-mode.yml b/src/playbook/Configuration/tweaks/misc/disable-game-mode.yml deleted file mode 100644 index 713a1673fd..0000000000 --- a/src/playbook/Configuration/tweaks/misc/disable-game-mode.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Disable Game Mode -description: Disables the Windows Game Mode feature -privilege: TrustedInstaller -actions: - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\GameBar' - value: 'AllowAutoGameMode' - data: '0' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\GameBar' - value: 'AutoGameModeEnabled' - data: '0' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/misc/enable-notifications.yml b/src/playbook/Configuration/tweaks/misc/enable-notifications.yml new file mode 100644 index 0000000000..fbd3f70b75 --- /dev/null +++ b/src/playbook/Configuration/tweaks/misc/enable-notifications.yml @@ -0,0 +1,14 @@ +--- +title: Enable Notifications +description: Notifications were turned off at the start of the Playbook to prevent random notifications from interfering with the process. This task re-enables notifications if the user chose to do so. +actions: + - !cmd: + command: '"AtlasDesktop\3. General Configuration\Notifications\Enable Notifications.cmd" /silent' + exeDir: true + wait: true + option: '!disable-notifications' + - !cmd: + command: '"AtlasDesktop\3. General Configuration\Notifications\Enable Notifications.cmd" /justuserservice' + exeDir: true + wait: true + option: 'disable-notifications' diff --git a/src/playbook/Configuration/tweaks/misc/rebuild-perf-counters.yml b/src/playbook/Configuration/tweaks/misc/rebuild-perf-counters.yml index b10180e042..0f7e306b58 100644 --- a/src/playbook/Configuration/tweaks/misc/rebuild-perf-counters.yml +++ b/src/playbook/Configuration/tweaks/misc/rebuild-perf-counters.yml @@ -1,7 +1,6 @@ --- title: Rebuild Performance Counters description: Manually rebuilds performance counters to ensure that there is no issues with them -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/manually-rebuild-performance-counters - !run: {exe: 'lodctr', args: '/r'} diff --git a/src/playbook/Configuration/tweaks/misc/restore-default-sleep-timeout.yml b/src/playbook/Configuration/tweaks/misc/restore-default-sleep-timeout.yml deleted file mode 100644 index f857b6f136..0000000000 --- a/src/playbook/Configuration/tweaks/misc/restore-default-sleep-timeout.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Restore Default Sleep Timeout -description: Restores the default automatic sleep timeout if the power saving option is disabled -privilege: TrustedInstaller -option: '!disable-power-saving' -actions: - - !run: {exe: 'powercfg.exe', args: '/setacvalueindex scheme_current sub_sleep standbyidle 900'} - - !run: {exe: 'powercfg.exe', args: '/setdcvalueindex scheme_current sub_sleep standbyidle 600'} diff --git a/src/playbook/Configuration/tweaks/networking/atlas-network-settings.yml b/src/playbook/Configuration/tweaks/networking/atlas-network-settings.yml new file mode 100644 index 0000000000..24088dbf5a --- /dev/null +++ b/src/playbook/Configuration/tweaks/networking/atlas-network-settings.yml @@ -0,0 +1,8 @@ +--- +title: Applies Atlas' Network Settings +description: Applies Atlas' optimised network settings +actions: + - !cmd: + command: '"AtlasDesktop\8. Troubleshooting\Network\Reset Network to Atlas Default.cmd" /silent' + exeDir: true + wait: true diff --git a/src/playbook/Configuration/tweaks/networking/config-netsh.yml b/src/playbook/Configuration/tweaks/networking/config-netsh.yml deleted file mode 100644 index 44513769cc..0000000000 --- a/src/playbook/Configuration/tweaks/networking/config-netsh.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Configure Network Settings with Network Shell -description: Configures the optimal networking settings using Network Shell (netsh.exe) -privilege: TrustedInstaller -actions: - - !run: {exe: 'netsh', args: 'int tcp set supplemental Internet congestionprovider=ctcp'} - - !run: {exe: 'netsh', args: 'interface Teredo set state type=enterpriseclient'} - - !run: {exe: 'netsh', args: 'interface Teredo set state servername=default'} diff --git a/src/playbook/Configuration/tweaks/networking/config-packet-sched-timer-res.yml b/src/playbook/Configuration/tweaks/networking/config-packet-sched-timer-res.yml deleted file mode 100644 index 3b3062d9e6..0000000000 --- a/src/playbook/Configuration/tweaks/networking/config-packet-sched-timer-res.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Configure Packet Scheduler Timer Resolution -description: Configures the network stack (packet scheduler) timer resolution to be more precise -privilege: TrustedInstaller -actions: - # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.QualityofService::QosTimerResolution - - !registryValue: - path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Psched' - value: 'TimerResolution' - data: '1' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/networking/disable-llmnr.yml b/src/playbook/Configuration/tweaks/networking/disable-llmnr.yml index a8b69ab7ba..fe0d51cada 100644 --- a/src/playbook/Configuration/tweaks/networking/disable-llmnr.yml +++ b/src/playbook/Configuration/tweaks/networking/disable-llmnr.yml @@ -1,7 +1,6 @@ --- title: Disable LLMNR Protocol description: Disable Link-Local Multicast Name Resolution (LLMNR) protocol as it is vulnerable and has been replaced by DNS -privilege: TrustedInstaller actions: # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.DNSClient::Turn_Off_Multicast - !registryValue: diff --git a/src/playbook/Configuration/tweaks/networking/disable-network-power-saving.yml b/src/playbook/Configuration/tweaks/networking/disable-network-power-saving.yml deleted file mode 100644 index 74f7408e9c..0000000000 --- a/src/playbook/Configuration/tweaks/networking/disable-network-power-saving.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Disable Network Adapter Power Saving -description: Disables the default power saving mode for all network cards by removing the default capability -privilege: TrustedInstaller -actions: - - !registryValue: - path: 'HKLM\SYSTEM\CurrentControlSet\Services\NDIS\Parameters' - value: 'DefaultPnPCapabilities' - data: '24' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/networking/disable-smart-name-resolution.yml b/src/playbook/Configuration/tweaks/networking/disable-smart-name-resolution.yml deleted file mode 100644 index 4aa47d82c2..0000000000 --- a/src/playbook/Configuration/tweaks/networking/disable-smart-name-resolution.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Disable Smart Multi-Homed Name Resolution -description: Designed to speed up DNS resolution by sending DNS requests across all available network adapters, but also causes a privacy issue due to possible DNS leakage -privilege: TrustedInstaller -actions: - - !registryValue: - path: 'HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' - value: 'DisableParallelAandAAAA' - data: '1' - type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient' - value: 'DisableSmartNameResolution' - data: '1' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/networking/shares/disable-smb-bandwidth-throttling.yml b/src/playbook/Configuration/tweaks/networking/shares/disable-smb-bandwidth-throttling.yml index e8061ce273..28a276fb08 100644 --- a/src/playbook/Configuration/tweaks/networking/shares/disable-smb-bandwidth-throttling.yml +++ b/src/playbook/Configuration/tweaks/networking/shares/disable-smb-bandwidth-throttling.yml @@ -1,7 +1,6 @@ --- title: Disable SMB Bandwidth Throttling description: Disables SMB bandwidth throttling for improved performance -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/role/file-server - !registryValue: diff --git a/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-access.yml b/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-access.yml index afa9f271dd..7893330821 100644 --- a/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-access.yml +++ b/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-access.yml @@ -1,7 +1,6 @@ --- title: Restrict Anonymous Access description: Restricts anonymous access to named pipes and shares to prevent unauthorized system access -privilege: TrustedInstaller actions: # https://www.stigviewer.com/stig/microsoft_windows_10/2022-04-08/finding/V-220932 - !registryValue: diff --git a/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-enumeration.yml b/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-enumeration.yml index 3c96598729..0776c73848 100644 --- a/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-enumeration.yml +++ b/src/playbook/Configuration/tweaks/networking/shares/restrict-anonymous-enumeration.yml @@ -1,7 +1,6 @@ --- title: Restrict Anonymous Enumeration of Shares description: Restricts anonymous enumeration of shares -privilege: TrustedInstaller actions: # https://www.stigviewer.com/stig/microsoft_windows_10/2022-04-08/finding/V-220930 - !registryValue: diff --git a/src/playbook/Configuration/tweaks/performance/config-automatic-maintenance.yml b/src/playbook/Configuration/tweaks/performance/config-automatic-maintenance.yml new file mode 100644 index 0000000000..a574508463 --- /dev/null +++ b/src/playbook/Configuration/tweaks/performance/config-automatic-maintenance.yml @@ -0,0 +1,22 @@ +--- +title: Configure Automatic Maintenance +description: Configure the 'Automatic Maintenance' feature in Windows, which does tasks such as updates when the computer is idle, for QoL and performance +actions: + # Automatic maintenance is needed for auto-defrag/TRIM and more + # - !registryValue: + # path: 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance' + # value: 'MaintenanceDisabled' + # data: '1' + # type: REG_DWORD + # - !registryValue: + # path: 'HKLM\SOFTWARE\Microsoft\Windows\ScheduledDiagnostics' + # value: 'EnabledExecution' + # data: '0' + # type: REG_DWORD + + # https://www.elevenforum.com/t/enable-or-disable-automatic-maintenance-to-wake-up-computer-in-windows-11.16690/ + - !registryValue: + path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Task Scheduler\Maintenance' + value: 'WakeUp' + data: '0' + type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/performance/config-mmcss.yml b/src/playbook/Configuration/tweaks/performance/config-mmcss.yml index b312a788b6..3ed81c3d73 100644 --- a/src/playbook/Configuration/tweaks/performance/config-mmcss.yml +++ b/src/playbook/Configuration/tweaks/performance/config-mmcss.yml @@ -1,7 +1,6 @@ --- title: Configure the Multimedia Class Scheduler Service description: Configures MMCSS for the best performance -privilege: TrustedInstaller actions: # Set system responsiveness to 10% # Allocates less CPU resources to tasks that request it such as browsers, so that other applications will not be impacted as much diff --git a/src/playbook/Configuration/tweaks/performance/disable-auto-folder-discovery.yml b/src/playbook/Configuration/tweaks/performance/disable-auto-folder-discovery.yml new file mode 100644 index 0000000000..de931318bb --- /dev/null +++ b/src/playbook/Configuration/tweaks/performance/disable-auto-folder-discovery.yml @@ -0,0 +1,9 @@ +--- +title: Disable Automatic Folder Discovery +description: Improves performance in File Explorer by not automatically determining the folder 'type' (such as pictures) for each folder's content. +actions: + - !registryValue: + path: 'HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell' + value: 'FolderType' + data: 'NotSpecified' + type: REG_SZ diff --git a/src/playbook/Configuration/tweaks/performance/disable-automatic-maintenance.yml b/src/playbook/Configuration/tweaks/performance/disable-automatic-maintenance.yml deleted file mode 100644 index b1db230cf0..0000000000 --- a/src/playbook/Configuration/tweaks/performance/disable-automatic-maintenance.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Disable Automatic Maintenance -description: Disables the 'Automatic Maintenance' feature in Windows, which does tasks such as updates in the background, for QoL and performance -privilege: TrustedInstaller -actions: - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance' - value: 'MaintenanceDisabled' - data: '1' - type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\ScheduledDiagnostics' - value: 'EnabledExecution' - data: '0' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/performance/disable-background-apps.yml b/src/playbook/Configuration/tweaks/performance/disable-background-apps.yml index b76c2aab9c..26862da40c 100644 --- a/src/playbook/Configuration/tweaks/performance/disable-background-apps.yml +++ b/src/playbook/Configuration/tweaks/performance/disable-background-apps.yml @@ -1,7 +1,6 @@ --- title: Disable Background Apps description: Disables background apps, so that there are minimal resources used in the background -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications' diff --git a/src/playbook/Configuration/tweaks/performance/disable-fth.yml b/src/playbook/Configuration/tweaks/performance/disable-fth.yml index 3e8b2dbde4..d65625bf37 100644 --- a/src/playbook/Configuration/tweaks/performance/disable-fth.yml +++ b/src/playbook/Configuration/tweaks/performance/disable-fth.yml @@ -1,22 +1,20 @@ --- title: Disable Fault Tolerant Heap (FTH) description: FTH is a feature in Windows 7+ that applies mitigations (non-CPU related) to applications that repeatedly crash to prevent further crashes, but when the FTH is active for a certain application, there's a performance hit. -privilege: TrustedInstaller actions: # https://devblogs.microsoft.com/oldnewthing/20120125-00/?p=8463 # Document listed as only affected in Windows 7, is also in 7+ # https://docs.microsoft.com/en-us/windows/win32/win7appqual/fault-tolerant-heap # https://www.3dcadworld.com/windows-7-fault-tolerant-heap-prevents-crashing/ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\FTH' - value: 'Enabled' - data: '0' - type: REG_DWORD - cpuArch: 'X64' - - # Reset FTH entries - - !run: {exe: 'rundll32.exe', args: 'fthsvc.dll,FthSysprepSpecialize', cpuArch: 'X64', wait: false} + - !powerShell: + command: >- + if (((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64')) { + Write-Output 'ARM detected, FTH doesn''t exist.'; + Remove-Item -Path """$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\7. Security\Mitigations\Fault Tolerant Heap""" -Force -Recurse; + exit 2000 + }; - # Don't run on Arm64 - FTH doesn't exist - - !file: {path: '%windir%\AtlasDesktop\7. Security\Mitigations\Fault Tolerant Heap', cpuArch: 'Arm64'} + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\FTH' -Name 'Enabled' -Value 0 -Type DWORD; + rundll32.exe fthsvc.dll,FthSysprepSpecialize + wait: true diff --git a/src/playbook/Configuration/tweaks/performance/disable-game-bar.yml b/src/playbook/Configuration/tweaks/performance/disable-game-bar.yml index efdb4d0ff5..6698e5855c 100644 --- a/src/playbook/Configuration/tweaks/performance/disable-game-bar.yml +++ b/src/playbook/Configuration/tweaks/performance/disable-game-bar.yml @@ -1,7 +1,6 @@ --- title: Disable Game Bar description: Disables XBOX Game Bar, which is known as a bloatware feature -privilege: TrustedInstaller actions: # Disable Game Bar diff --git a/src/playbook/Configuration/tweaks/performance/disable-sleep-study.yml b/src/playbook/Configuration/tweaks/performance/disable-sleep-study.yml index 0cf1c963a3..ab65a45c63 100644 --- a/src/playbook/Configuration/tweaks/performance/disable-sleep-study.yml +++ b/src/playbook/Configuration/tweaks/performance/disable-sleep-study.yml @@ -1,7 +1,6 @@ --- title: Disable Modern Standby SleepStudy description: Disables Modern Standby's SleepStudy feature, as it's unnecessary logging that isn't needed on boot -privilege: TrustedInstaller actions: - !run: exe: 'wevtutil.exe' @@ -12,3 +11,4 @@ actions: - !run: exe: 'wevtutil.exe' args: 'set-log "Microsoft-Windows-UserModePowerService/Diagnostic" /e:false' + - !scheduledTask: {path: '\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem', operation: disable} diff --git a/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml b/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml index ad7c9b8fe2..1e9bd5bf9b 100644 --- a/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml +++ b/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml @@ -1,7 +1,6 @@ --- title: Configure Boot Configuration description: Configures the boot configuration (BCD) for QoL -privilege: TrustedInstaller actions: # Lowering dual boot choice time # https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/--timeout#parameters @@ -14,7 +13,7 @@ actions: - !run: exe: 'bcdedit' args: '/set description "AtlasOS 10"' - builds: [ '!>=22000' ] + builds: [ '<22000' ] - !run: exe: 'bcdedit' args: '/set description "AtlasOS 11"' diff --git a/src/playbook/Configuration/tweaks/performance/system/disable-paging.yml b/src/playbook/Configuration/tweaks/performance/system/disable-paging.yml index 69a7f0f839..7ece7e69c7 100644 --- a/src/playbook/Configuration/tweaks/performance/system/disable-paging.yml +++ b/src/playbook/Configuration/tweaks/performance/system/disable-paging.yml @@ -1,7 +1,6 @@ --- title: Disable Paging Settings description: Disables memory paging settings for the best performance -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management' diff --git a/src/playbook/Configuration/tweaks/performance/system/disable-service-host-split.yml b/src/playbook/Configuration/tweaks/performance/system/disable-service-host-split.yml index f45d366324..7d6097a3d2 100644 --- a/src/playbook/Configuration/tweaks/performance/system/disable-service-host-split.yml +++ b/src/playbook/Configuration/tweaks/performance/system/disable-service-host-split.yml @@ -1,7 +1,6 @@ --- title: Disable Service Host Splitting description: Disables Service Host splitting much for lower RAM usage and process count, excluding XBOX services to fix issues with Game Bar -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/windows/application-management/svchost-service-refactoring - !powerShell: diff --git a/src/playbook/Configuration/tweaks/performance/system/optimize-ntfs.yml b/src/playbook/Configuration/tweaks/performance/system/optimize-ntfs.yml index c475a9f681..c28be4d5fb 100644 --- a/src/playbook/Configuration/tweaks/performance/system/optimize-ntfs.yml +++ b/src/playbook/Configuration/tweaks/performance/system/optimize-ntfs.yml @@ -1,7 +1,6 @@ --- title: Optimize NTFS description: Optimizes the NTFS filesystem for optimal QoL, performance and privacy -privilege: TrustedInstaller actions: # https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil diff --git a/src/playbook/Configuration/tweaks/performance/system/win32-priority-seperation.yml b/src/playbook/Configuration/tweaks/performance/system/win32-priority-seperation.yml index 6ee69490bb..41fdfae67f 100644 --- a/src/playbook/Configuration/tweaks/performance/system/win32-priority-seperation.yml +++ b/src/playbook/Configuration/tweaks/performance/system/win32-priority-seperation.yml @@ -1,7 +1,6 @@ --- title: Prioritize Foreground Applications description: Prioritizes foreground applications for process scheduling by setting Win32PrioritySeparation to 26 hex, meaning a short quantum, variable, high foreground boost -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl' diff --git a/src/playbook/Configuration/tweaks/privacy/advertising/disable-advertising-info.yml b/src/playbook/Configuration/tweaks/privacy/advertising/disable-advertising-info.yml index 3fc9088a30..59945df19e 100644 --- a/src/playbook/Configuration/tweaks/privacy/advertising/disable-advertising-info.yml +++ b/src/playbook/Configuration/tweaks/privacy/advertising/disable-advertising-info.yml @@ -1,10 +1,14 @@ --- title: Disable Advertising ID description: Disables Advertising ID for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo' value: 'Enabled' data: '0' type: REG_DWORD + - !registryValue: + path: 'HKLM\Software\Policies\Microsoft\Windows\AdvertisingInfo' + value: 'DisabledByGroupPolicy' + data: '1' + type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/privacy/advertising/disable-bluetooth-advertising.yml b/src/playbook/Configuration/tweaks/privacy/advertising/disable-bluetooth-advertising.yml index 4d3f294991..922df0444c 100644 --- a/src/playbook/Configuration/tweaks/privacy/advertising/disable-bluetooth-advertising.yml +++ b/src/playbook/Configuration/tweaks/privacy/advertising/disable-bluetooth-advertising.yml @@ -1,7 +1,6 @@ --- title: Disable Bluetooth Advertising description: Disables advertising via Bluetooth for QoL -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-bluetooth # https://en.wikipedia.org/wiki/Bluetooth_advertising diff --git a/src/playbook/Configuration/tweaks/privacy/advertising/disable-sync-provider-notifs.yml b/src/playbook/Configuration/tweaks/privacy/advertising/disable-sync-provider-notifs.yml index e6db8a477b..ab4ee28763 100644 --- a/src/playbook/Configuration/tweaks/privacy/advertising/disable-sync-provider-notifs.yml +++ b/src/playbook/Configuration/tweaks/privacy/advertising/disable-sync-provider-notifs.yml @@ -1,7 +1,6 @@ --- title: Disable Sync Provider Notifications description: Disables notifications within File Explorer from OneDrive or other sync providers to avoid advertisements -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/privacy/cloud/disable-setting-sync.yml b/src/playbook/Configuration/tweaks/privacy/cloud/disable-setting-sync.yml index 0a9ea429ae..d3b8a4e84a 100644 --- a/src/playbook/Configuration/tweaks/privacy/cloud/disable-setting-sync.yml +++ b/src/playbook/Configuration/tweaks/privacy/cloud/disable-setting-sync.yml @@ -1,8 +1,9 @@ --- title: Disable Settings Sync -description: Disables Settings Synchronization feature for QoL and privacy -privilege: TrustedInstaller +description: Disables Settings Sync (labeled as 'Windows Backup' in Windows 10) for QoL and privacy actions: + # Policies don't disable the toggles in the UI, doesn't seem like much can be done about it + # Whole Settings page is hidden anyways - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync' value: 'DisableSettingSync' diff --git a/src/playbook/Configuration/tweaks/privacy/cloud/disable-suggest-ways-to-finish-setup.yml b/src/playbook/Configuration/tweaks/privacy/cloud/disable-suggest-ways-to-finish-setup.yml index 8d4a9ae6e0..f97427a746 100644 --- a/src/playbook/Configuration/tweaks/privacy/cloud/disable-suggest-ways-to-finish-setup.yml +++ b/src/playbook/Configuration/tweaks/privacy/cloud/disable-suggest-ways-to-finish-setup.yml @@ -1,7 +1,6 @@ --- title: Disable Suggested Ways to Finish Setting Up Your Device description: Disables suggested ways to finish setting up your device, as it will mostly anony you to use cloud features -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement' diff --git a/src/playbook/Configuration/tweaks/privacy/cloud/disallow-message-cloud-sync.yml b/src/playbook/Configuration/tweaks/privacy/cloud/disallow-message-cloud-sync.yml index 8a76ce6434..1bf52daa3d 100644 --- a/src/playbook/Configuration/tweaks/privacy/cloud/disallow-message-cloud-sync.yml +++ b/src/playbook/Configuration/tweaks/privacy/cloud/disallow-message-cloud-sync.yml @@ -1,7 +1,6 @@ --- title: Disallow Message Service Cloud Sync description: Disallows the Message service (which should be disabled anyways) from syncing with the cloud, as that potentially harms privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Messaging' diff --git a/src/playbook/Configuration/tweaks/privacy/config-app-permissions.yml b/src/playbook/Configuration/tweaks/privacy/config-app-permissions.yml index 58c9895adf..99f9d730d9 100644 --- a/src/playbook/Configuration/tweaks/privacy/config-app-permissions.yml +++ b/src/playbook/Configuration/tweaks/privacy/config-app-permissions.yml @@ -1,90 +1,19 @@ --- title: Configure App Permissions description: Configures default app permissions in Settings for the optimal privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appDiagnostics' value: 'Value' data: 'Deny' type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appointments' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\bluetoothSync' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\chat' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\contacts' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\email' - value: 'Value' - data: 'Deny' - type: REG_SZ - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' value: 'Value' data: 'Deny' type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCall' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCallHistory' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\picturesLibrary' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\radios' - value: 'Value' - data: 'Deny' - type: REG_SZ - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation' value: 'Value' data: 'Deny' type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userDataTasks' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener' - value: 'Value' - data: 'Deny' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\videosLibrary' - value: 'Value' - data: 'Deny' - type: REG_SZ diff --git a/src/playbook/Configuration/tweaks/privacy/config-windows-media-player.yml b/src/playbook/Configuration/tweaks/privacy/config-windows-media-player.yml index bbc9457e12..cba900c372 100644 --- a/src/playbook/Configuration/tweaks/privacy/config-windows-media-player.yml +++ b/src/playbook/Configuration/tweaks/privacy/config-windows-media-player.yml @@ -1,7 +1,6 @@ --- title: Configure Windows Media Player description: Configures Windows Media Player for the optimal privacy, security and usability. As a note, Windows Media Player is deprecated and should not be used, but this is just a safeguard in case anyone decides to. -privilege: TrustedInstaller actions: # Prevent Windows Media DRM internet access - !registryValue: diff --git a/src/playbook/Configuration/tweaks/privacy/disable-activity-feed.yml b/src/playbook/Configuration/tweaks/privacy/disable-activity-feed.yml index 70b9417f71..7e20c39251 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-activity-feed.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-activity-feed.yml @@ -1,7 +1,6 @@ --- title: Disable Activity Feed description: Disables Activity Feed in Task View for privacy (as it is an online feature) and QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\System' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-app-launch-tracking.yml b/src/playbook/Configuration/tweaks/privacy/disable-app-launch-tracking.yml index c02f97c872..9d99970d76 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-app-launch-tracking.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-app-launch-tracking.yml @@ -1,7 +1,6 @@ --- title: Disable App Launch Tracking description: Prevents Windows from automatically tracking applications you use the most to enhance search and start menu results for privacy purposes -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-device-monitoring.yml b/src/playbook/Configuration/tweaks/privacy/disable-device-monitoring.yml index 058ae13107..8d2e5b4f4b 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-device-monitoring.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-device-monitoring.yml @@ -1,7 +1,6 @@ --- title: Disable Device Health Attestation Monitoring and Reporting description: Disables Device Health Attestation Monitoring and Reporting on startuip for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\DeviceHealthAttestationService' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-experimentation.yml b/src/playbook/Configuration/tweaks/privacy/disable-experimentation.yml index 8c19a76623..baa2467cb0 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-experimentation.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-experimentation.yml @@ -1,7 +1,6 @@ --- title: Disable Experimentation description: Disallows Microsoft from using your computer as a test for certain features for privacy and stability -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-location-tracking.yml b/src/playbook/Configuration/tweaks/privacy/disable-location-tracking.yml index 09088a31a9..3a57400420 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-location-tracking.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-location-tracking.yml @@ -1,7 +1,6 @@ --- title: Disable Location Tracking description: Disables location tracking feature (also called Find My Device) for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\FindMyDevice' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-lockscreen-camera.yml b/src/playbook/Configuration/tweaks/privacy/disable-lockscreen-camera.yml index 0b8b5fe610..7b335fdea8 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-lockscreen-camera.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-lockscreen-camera.yml @@ -1,7 +1,6 @@ --- title: Disable Lockscreen Camera description: Disables the lockscreen camera -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-online-speech-recognition.yml b/src/playbook/Configuration/tweaks/privacy/disable-online-speech-recognition.yml index 7076ae36f3..ff8a61eba4 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-online-speech-recognition.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-online-speech-recognition.yml @@ -1,15 +1,15 @@ --- title: Disable Online Speech Recognition description: Disables online speech recognition for privacy purposes -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy' value: 'HasAccepted' data: '0' type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization' - value: 'AllowInputPersonalization' - data: '0' - type: REG_DWORD + # Allow user to enable it in case they need to + # - !registryValue: + # path: 'HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization' + # value: 'AllowInputPersonalization' + # data: '0' + # type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/privacy/disable-pca.yml b/src/playbook/Configuration/tweaks/privacy/disable-pca.yml index d246d189ff..0926a71a95 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-pca.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-pca.yml @@ -1,7 +1,6 @@ --- title: Disable Program Compatibility Assistant (PCA) description: Disables PCA for QoL and privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-perf-track.yml b/src/playbook/Configuration/tweaks/privacy/disable-perf-track.yml index a073279ed6..9f5d94758a 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-perf-track.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-perf-track.yml @@ -1,7 +1,6 @@ --- title: Disable Performance Track description: Disables tracking of responsiveness events for privacy -privilege: TrustedInstaller actions: # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.PerformancePerftrack::WdiScenarioExecutionPolicy - !registryValue: diff --git a/src/playbook/Configuration/tweaks/privacy/disable-privacy-experience.yml b/src/playbook/Configuration/tweaks/privacy/disable-privacy-experience.yml index 4afea57f15..17b2ca82bd 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-privacy-experience.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-privacy-experience.yml @@ -1,7 +1,6 @@ --- title: Disable OOBE Privacy Experience description: Disables the OOBE (Out of Box Experience) privacy configuration that you might see on updates not to override current settings -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\OOBE' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-rsop-logging.yml b/src/playbook/Configuration/tweaks/privacy/disable-rsop-logging.yml index 52727013af..44479cd17b 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-rsop-logging.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-rsop-logging.yml @@ -1,7 +1,6 @@ --- title: Disable Resultant Set of Policy (RSoP) Logging description: Disables logging of Group Policy settings (RSoP) for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\System' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-speech-auto-updates.yml b/src/playbook/Configuration/tweaks/privacy/disable-speech-auto-updates.yml index b364a3c8a0..00b9534af8 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-speech-auto-updates.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-speech-auto-updates.yml @@ -1,7 +1,6 @@ --- title: Disable Automatic Updates Of Speech Data description: Disables auto-updates of speech data, as it is not commonly used, and it is a potential privacy concern or an overall annoyance -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Speech' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-tailored-experiences.yml b/src/playbook/Configuration/tweaks/privacy/disable-tailored-experiences.yml index 9f38b38909..37e8574923 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-tailored-experiences.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-tailored-experiences.yml @@ -1,7 +1,6 @@ --- title: Do Not Use Diagnostic Data For Tailored Experiences description: Prevents Windows from using diagnostic data for tailored experiences for privacy, also labeled as "Let Microsoft provide more tailored experiences with relevant tips and recommendations by using your diagnostic data" -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-user-tracking.yml b/src/playbook/Configuration/tweaks/privacy/disable-user-tracking.yml index 0f9b5ece6d..14f6580641 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-user-tracking.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-user-tracking.yml @@ -1,7 +1,6 @@ --- title: Disable Most Frequently Used Applications description: Disables the most frequently used applications in the start menu for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-web-lang-list-access.yml b/src/playbook/Configuration/tweaks/privacy/disable-web-lang-list-access.yml index 324eed7ed0..1fcedff253 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-web-lang-list-access.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-web-lang-list-access.yml @@ -1,7 +1,6 @@ --- title: Disable Website Access to Language List description: Disables websites accessing the Windows language list for the best privacy, as it is a common fingerprinting technique to identify a user by their languages -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\International\User Profile' diff --git a/src/playbook/Configuration/tweaks/privacy/disable-win-error-reporting.yml b/src/playbook/Configuration/tweaks/privacy/disable-win-error-reporting.yml index 1f73f25eb2..917d970035 100644 --- a/src/playbook/Configuration/tweaks/privacy/disable-win-error-reporting.yml +++ b/src/playbook/Configuration/tweaks/privacy/disable-win-error-reporting.yml @@ -1,7 +1,6 @@ --- title: Disable Windows Error Reporting description: Disables Windows Error Reporting for privacy and QoL -privilege: TrustedInstaller actions: # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.InternetCommunicationManagement::PCH_DoNotReport - !registryValue: diff --git a/src/playbook/Configuration/tweaks/privacy/disallow-ms-accounts.yml b/src/playbook/Configuration/tweaks/privacy/disallow-ms-accounts.yml index 68e77559f8..0570801bfb 100644 --- a/src/playbook/Configuration/tweaks/privacy/disallow-ms-accounts.yml +++ b/src/playbook/Configuration/tweaks/privacy/disallow-ms-accounts.yml @@ -1,7 +1,6 @@ --- title: Disallow Users to Be Non-local description: For privacy and QoL, users are prevented from adding Microsoft accounts as user accounts instead of local accounts -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' diff --git a/src/playbook/Configuration/tweaks/privacy/disallow-user-activity-upload.yml b/src/playbook/Configuration/tweaks/privacy/disallow-user-activity-upload.yml index 67e64bdfd8..51842421c9 100644 --- a/src/playbook/Configuration/tweaks/privacy/disallow-user-activity-upload.yml +++ b/src/playbook/Configuration/tweaks/privacy/disallow-user-activity-upload.yml @@ -1,7 +1,6 @@ --- title: Disallow Upload and Publish of User Activities description: Disables the upload and publish of user activities for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\System' diff --git a/src/playbook/Configuration/tweaks/privacy/search-settings.yml b/src/playbook/Configuration/tweaks/privacy/search-settings.yml index 17f4bfe59a..380a597e34 100644 --- a/src/playbook/Configuration/tweaks/privacy/search-settings.yml +++ b/src/playbook/Configuration/tweaks/privacy/search-settings.yml @@ -1,8 +1,8 @@ --- title: Configure Search on the Taskbar -description: Configures search for the optimal usability and privacy, such as disabling online features to make it simplistic and usable -privilege: TrustedInstaller +description: Configures search for the optimal usability and privacy, such as disabling online features to make it more minimal and snappy actions: + # Configure search permissions - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search' value: 'BingSearchEnabled' @@ -28,6 +28,8 @@ actions: value: 'SafeSearchMode' data: '0' type: REG_DWORD + + # Policies - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search' value: 'ConnectedSearchUseWeb' diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-activation-telemetry.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-activation-telemetry.yml index 5891d68b49..7db335d427 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-activation-telemetry.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-activation-telemetry.yml @@ -1,7 +1,6 @@ --- title: Disable Key Management System Telemetry description: Turns off KMS client online AVS validation, which prevents from sending data to Microsoft regardless of its activation state, for privacy -privilege: TrustedInstaller actions: # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.SoftwareProtectionPlatform::NoAcquireGT - !registryValue: diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-ceip.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-ceip.yml index fc8188c212..d6f65074c6 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-ceip.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-ceip.yml @@ -1,7 +1,6 @@ --- title: Disable Customer Experience Improvement Program description: Disables Customer Experience Improvement Program (CEIP) as it is related to telemetry, for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\AppV\CEIP' diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-diagnostic-tracing.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-diagnostic-tracing.yml index e850ac30f6..28e09e2666 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-diagnostic-tracing.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-diagnostic-tracing.yml @@ -1,7 +1,6 @@ --- title: Disable Diagnostic Tracing description: Disables diagnostic tracing (system activities, events or errors) for privacy reasons -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SYSTEM\CurrentControlSet\Control\Diagnostics\Performance' diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-dotnet-cli-telemetry.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-dotnet-cli-telemetry.yml index 55683aa8cd..06c8fc9a83 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-dotnet-cli-telemetry.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-dotnet-cli-telemetry.yml @@ -1,7 +1,6 @@ --- title: Disable .NET CLI Telemetry description: Disables .NET CLI telemetry for privacy -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/dotnet/core/tools/telemetry - !cmd: {command: 'setx DOTNET_CLI_TELEMETRY_OPTOUT 1'} diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-input-telemetry.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-input-telemetry.yml index 52281c0441..032a2b872e 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disable-input-telemetry.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disable-input-telemetry.yml @@ -1,7 +1,6 @@ --- title: Disable Input Telemetry description: Disables text, ink and handwriting telemetry for privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\InputPersonalization' diff --git a/src/playbook/Configuration/tweaks/privacy/telemetry/disallow-data-collection.yml b/src/playbook/Configuration/tweaks/privacy/telemetry/disallow-data-collection.yml index 234ffe1825..7f3ae363f9 100644 --- a/src/playbook/Configuration/tweaks/privacy/telemetry/disallow-data-collection.yml +++ b/src/playbook/Configuration/tweaks/privacy/telemetry/disallow-data-collection.yml @@ -1,7 +1,6 @@ --- title: Disallow Telemetry and Data Collection description: Disallows telemetry and data collection to improve privacy -privilege: TrustedInstaller actions: # Stop DiagTrack service to add the changes - !service: {name: 'DiagTrack', operation: stop, ignoreErrors: true} diff --git a/src/playbook/Configuration/tweaks/qol/appearance/atlas-theme.yml b/src/playbook/Configuration/tweaks/qol/appearance/atlas-theme.yml index 91897cb5a4..e88137c91a 100644 --- a/src/playbook/Configuration/tweaks/qol/appearance/atlas-theme.yml +++ b/src/playbook/Configuration/tweaks/qol/appearance/atlas-theme.yml @@ -1,173 +1,50 @@ --- title: Add Theme description: Adds and sets the Atlas themes by default -privilege: TrustedInstaller actions: - # Copy files + # Apply theme file + - !taskKill: {name: 'SystemSettings', ignoreErrors: true} - !cmd: - command: 'copy /y "Themes" "%windir%\Resources\Themes" > nul' - exeDir: true + command: 'explorer "%windir%\Resources\Themes\atlas-v0.4.x-dark.theme" & ping 127.0.0.1 -n 6' wait: true + runas: currentUser - # Set lockscreen + # For Windows 11, set recent theme selection + - !taskKill: {name: 'SystemSettings', ignoreErrors: true} + - !taskKill: {name: 'control', ignoreErrors: true} + - !taskKill: {name: 'explorer', ignoreErrors: true, builds: [ '>=22000' ]} - !powerShell: - command: '.\LOCKSCREEN.ps1' + command: '.\AtlasModules\Scripts\newUsers.ps1 -ThemeMRU' exeDir: true wait: true runas: currentUserElevated - - !taskKill: {name: 'SystemSettings', ignoreErrors: true} - - !taskKill: {name: 'control', ignoreErrors: true} + builds: [ '>=22000' ] + - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false, builds: [ '>=22000' ]} - # Disable fun facts, tips, tricks, and more on lockscreen + # Applies Atlas lockscreen background + # Also disables fun facts, tips, tricks, and more on lockscreen - only on Enterprise/Education - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization' value: 'LockScreenOverlaysDisabled' data: '1' type: REG_DWORD - - # Windows theme - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize' - value: 'SystemUsesLightTheme' - data: '0' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize' - value: 'AppsUseLightTheme' - data: '0' - type: REG_DWORD - - # Set background - - !registryValue: - path: 'HKCU\Control Panel\Desktop' - value: 'TranscodedImageCache' - operation: delete - - !registryValue: - path: 'HKCU\Control Panel\Desktop' - value: 'WallPaper' - data: '%windir%\AtlasModules\Wallpapers\atlas-dark.png' - type: REG_SZ - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' - value: 'BackgroundHistoryPath0' - data: '%windir%\AtlasModules\Wallpapers\atlas-dark.png' - type: REG_SZ - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' - value: 'BackgroundHistoryPath1' - data: '%windir%\AtlasModules\Wallpapers\atlas-light.png' - type: REG_SZ - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' - value: 'BackgroundType' - data: '0' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' - value: 'WallpaperStyle' - data: '10' - type: REG_SZ - - # Set current theme - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' - value: 'CurrentTheme' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\HighContrast' - value: 'Pre-High Contrast Scheme' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - # Set Atlas theme as default - - !registryValue: - path: 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallTheme' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallThemeDark' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallThemeLight' - data: '%windir%\Resources\Themes\atlas-light.theme' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallTheme' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallThemeDark' - data: '%windir%\Resources\Themes\atlas-dark.theme' - type: REG_SZ - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' - value: 'InstallThemeLight' - data: '%windir%\Resources\Themes\atlas-light.theme' - type: REG_SZ - - # Accent color - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent' - value: 'AccentColorMenu' - data: '4290728257' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent' - value: 'StartColorMenu' - data: '4291969335' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\DWM' - value: 'ColorizationAfterglow' - data: '3292615103' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\DWM' - value: 'AccentColor' - data: '4290728257' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\DWM' - value: 'ColorizationColor' - data: '3292615103' - type: REG_DWORD - - !registryValue: - path: 'HKCU\Control Panel\Desktop' - value: 'AutoColorization' - data: '0' - type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\History' - value: 'AutoColor' - data: '0' - type: REG_DWORD - - # Lockscreen - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' value: 'RotatingLockScreenEnabled' data: '0' type: REG_DWORD - - # Apply some more theme changes that can't be done in actions - !run: - exeDir: true exe: 'THEME.cmd' - weight: 20 - - !run: {exe: 'rundll32.exe', args: 'user32.dll,UpdatePerUserSystemParameters'} - - # Apply theme file to finish up changes - - !cmd: - command: 'start "" "%windir%\Resources\Themes\atlas-dark.theme"' + exeDir: true + - !powerShell: + command: '& ".\AtlasModules\Scripts\LOCKSCREEN.ps1"' + exeDir: true wait: true runas: currentUserElevated - - !run: {exe: 'timeout', args: '/t 4 /nobreak'} - - !taskKill: {name: 'SystemSettings', ignoreErrors: true} - - !taskKill: {name: 'control', ignoreErrors: true} + + # Set Atlas theme as default for new users + - !registryValue: + path: 'HKCU\Software\Policies\Microsoft\Windows\Personalization' + value: 'ThemeFile' + data: '%windir%\Resources\Themes\atlas-v0.4.x-dark.theme' + type: REG_SZ diff --git a/src/playbook/Configuration/tweaks/qol/appearance/blue-tooltips.yml b/src/playbook/Configuration/tweaks/qol/appearance/blue-tooltips.yml index 5e0ee4a9e1..9b7e4f78b2 100644 --- a/src/playbook/Configuration/tweaks/qol/appearance/blue-tooltips.yml +++ b/src/playbook/Configuration/tweaks/qol/appearance/blue-tooltips.yml @@ -1,7 +1,6 @@ --- title: Change the Tooltip Color to Blue description: Changes the tooltip color to blue -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Colors' diff --git a/src/playbook/Configuration/tweaks/qol/appearance/disallow-theme-changes.yml b/src/playbook/Configuration/tweaks/qol/appearance/disallow-theme-changes.yml index a72d1cace1..f37cd1f2e4 100644 --- a/src/playbook/Configuration/tweaks/qol/appearance/disallow-theme-changes.yml +++ b/src/playbook/Configuration/tweaks/qol/appearance/disallow-theme-changes.yml @@ -1,7 +1,6 @@ --- title: Disallow Themes to Change Certain Personalized Features description: Disallows themes to change certain personalized features, as most of the time people only really apply themes for wallpapers or Windows style skins (custom themes) -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' diff --git a/src/playbook/Configuration/tweaks/qol/best-wallpaper-quality.yml b/src/playbook/Configuration/tweaks/qol/best-wallpaper-quality.yml index 2a4644bca0..eba71478ea 100644 --- a/src/playbook/Configuration/tweaks/qol/best-wallpaper-quality.yml +++ b/src/playbook/Configuration/tweaks/qol/best-wallpaper-quality.yml @@ -1,7 +1,6 @@ --- title: Disable Wallpaper Compression description: Disables wallpaper compression so that your wallpaper is always in its full quality -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/config-powershell.yml b/src/playbook/Configuration/tweaks/qol/config-powershell.yml index 0b994ba37e..e87103c4ae 100644 --- a/src/playbook/Configuration/tweaks/qol/config-powershell.yml +++ b/src/playbook/Configuration/tweaks/qol/config-powershell.yml @@ -1,7 +1,6 @@ --- title: Configure PowerShell description: Configures PowerShell for the optimal privacy and usability -privilege: TrustedInstaller actions: # Disable PowerShell Core telemetry - !cmd: {command: 'setx POWERSHELL_TELEMETRY_OPTOUT 1'} diff --git a/src/playbook/Configuration/tweaks/qol/config-start-menu.yml b/src/playbook/Configuration/tweaks/qol/config-start-menu.yml index 7226f7fcf8..0b149abc00 100644 --- a/src/playbook/Configuration/tweaks/qol/config-start-menu.yml +++ b/src/playbook/Configuration/tweaks/qol/config-start-menu.yml @@ -1,41 +1,46 @@ --- title: Configure Start Menu description: Configures the Start Menu's settings for QoL -privilege: TrustedInstaller actions: # Configure default Windows 11 pins - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start' value: 'ConfigureStartPins' type: REG_SZ - data: '{"pinnedList":[{"packagedAppId":"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"},{"desktopAppLink":"%PROGRAMDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Atlas.lnk"},{"packagedAppId":"Microsoft.WindowsTerminal_8wekyb3d8bbwe!App"},{"desktopAppLink":"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\File Explorer.lnk"},{"packagedAppId":"Microsoft.WindowsStore_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App"},{"packagedAppId":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.WindowsNotepad_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.Paint_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.SecHealthUI_8wekyb3d8bbwe!SecHealthUI"}]}' + data: '{"pinnedList":[{"packagedAppId":"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"},{"packagedAppId":"Microsoft.WindowsTerminal_8wekyb3d8bbwe!App"},{"desktopAppLink":"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\File Explorer.lnk"},{"packagedAppId":"Microsoft.WindowsStore_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App"},{"packagedAppId":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.WindowsNotepad_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.Paint_8wekyb3d8bbwe!App"},{"packagedAppId":"Microsoft.SecHealthUI_8wekyb3d8bbwe!SecHealthUI"}]}' - # Configure start menu settings + # Set Windows 10 & 11 start menu pins + - !taskKill: {name: 'StartMenuExperienceHost', ignoreErrors: true} + - !run: + exeDir: true + exe: 'STARTMENU.cmd' + weight: 20 + - !appx: {operation: clearCache, name: 'Microsoft.Windows.StartMenuExperienceHost*'} + + # Remove frequent programs list from the Start Menu - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' value: 'NoStartMenuMFUprogramsList' data: '1' type: REG_DWORD + # Hide "Most used" list from Start menu - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer' - value: 'HideRecentlyAddedApps' - data: '1' + value: 'ShowOrHideMostUsedApps' + data: '2' type: REG_DWORD + + # Remove "Recently added" list from Start Menu - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer' - value: 'HideRecommendedPersonalizedSites' + value: 'HideRecentlyAddedApps' data: '1' type: REG_DWORD + + # Remove Personalized Website Recommendations from the Recommended section in the Start Menu + # https://www.elevenforum.com/t/add-or-remove-recommended-websites-on-start-menu-in-windows-11.10667/ - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer' - value: 'ShowOrHideMostUsedApps' - data: '2' + value: 'HideRecommendedPersonalizedSites' + data: '1' type: REG_DWORD - - # Set Windows 10 & 11 start menu pins - - !taskKill: {name: 'StartMenuExperienceHost', ignoreErrors: true} - - !run: - exeDir: true - exe: 'STARTMENU.cmd' - weight: 20 - - !appx: {operation: clearCache, name: '*StartMenuExperienceHost*'} diff --git a/src/playbook/Configuration/tweaks/qol/config-windows-ink-workspace.yml b/src/playbook/Configuration/tweaks/qol/config-windows-ink-workspace.yml index 58cf98d0c3..1e06b9ff7c 100644 --- a/src/playbook/Configuration/tweaks/qol/config-windows-ink-workspace.yml +++ b/src/playbook/Configuration/tweaks/qol/config-windows-ink-workspace.yml @@ -1,7 +1,6 @@ --- title: Configure Windows Ink Workspace description: Configures the Windows Ink Workspace to not be in the way, and have the best usability and privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace' diff --git a/src/playbook/Configuration/tweaks/qol/disable-background-auto-login.yml b/src/playbook/Configuration/tweaks/qol/disable-background-auto-login.yml index 427b00cadd..effec19c62 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-background-auto-login.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-background-auto-login.yml @@ -1,7 +1,6 @@ --- title: Disable Auto-Logon to Finish Setting Up Device After an Update or Restart description: Disables automatic logging-in in the background of the lockscreen, also called 'Use sign-in info to auto-finish setting up device after update or restart' -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' diff --git a/src/playbook/Configuration/tweaks/qol/disable-mouse-accel.yml b/src/playbook/Configuration/tweaks/qol/disable-mouse-accel.yml index 42bb90de30..50d6f9be82 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-mouse-accel.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-mouse-accel.yml @@ -1,7 +1,6 @@ --- title: Disable Mouse Acceleration description: Disables mouse acceleration (also called 'Enhance Pointer Precision') for 1:1 mouse movement, which is what most gamers would want -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Mouse' diff --git a/src/playbook/Configuration/tweaks/qol/disable-settings-tips.yml b/src/playbook/Configuration/tweaks/qol/disable-settings-tips.yml index bad5830c71..354d968154 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-settings-tips.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-settings-tips.yml @@ -1,7 +1,6 @@ --- title: Disable Settings Tips description: Disables Settings tips for QoL, as most of the time, they only get in the way -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\PolicyManager\default\Settings\AllowOnlineTips' diff --git a/src/playbook/Configuration/tweaks/qol/disable-spell-checking.yml b/src/playbook/Configuration/tweaks/qol/disable-spell-checking.yml index 02cf33564e..6e2ec680bb 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-spell-checking.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-spell-checking.yml @@ -1,7 +1,6 @@ --- title: Disable Spell Checking description: Disables spell checking for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\TabletTip\1.7' diff --git a/src/playbook/Configuration/tweaks/qol/disable-store-auto-updates.yml b/src/playbook/Configuration/tweaks/qol/disable-store-auto-updates.yml index 7683aceb1b..f72495bf2f 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-store-auto-updates.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-store-auto-updates.yml @@ -1,7 +1,6 @@ --- title: Disable Automatic Updates for Apps in Store description: Disables automatic updates for apps in Store so that the user has more control -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate' diff --git a/src/playbook/Configuration/tweaks/qol/disable-tips.yml b/src/playbook/Configuration/tweaks/qol/disable-tips.yml index 4ba6eccc70..76aa6196b1 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-tips.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-tips.yml @@ -1,7 +1,6 @@ --- title: Disable Tips description: Disables tips for QoL and privacy -privilege: TrustedInstaller actions: # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.CloudContent::DisableSoftLanding - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/disable-touch-keyboard-features.yml b/src/playbook/Configuration/tweaks/qol/disable-touch-keyboard-features.yml index 61dcc3f622..5d53bcaac0 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-touch-keyboard-features.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-touch-keyboard-features.yml @@ -1,7 +1,6 @@ --- title: Disable Unnecessary Touch Keyboard Settings description: Disable unnecessary touch keyboard settings for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\TabletTip\1.7' @@ -13,8 +12,8 @@ actions: value: 'EnableKeyAudioFeedback' data: '0' type: REG_DWORD - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\TabletTip\1.7' - value: 'EnableShiftLock' - data: '0' - type: REG_DWORD + # - !registryValue: + # path: 'HKCU\SOFTWARE\Microsoft\TabletTip\1.7' + # value: 'EnableShiftLock' + # data: '0' + # type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/qol/disable-touch-visual-feedback.yml b/src/playbook/Configuration/tweaks/qol/disable-touch-visual-feedback.yml index e55d7cc1a3..8eb757dd2e 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-touch-visual-feedback.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-touch-visual-feedback.yml @@ -1,7 +1,6 @@ --- title: Disable Touch Visual Feedback description: Disables touch visual feedback for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Cursors' diff --git a/src/playbook/Configuration/tweaks/qol/disable-usb-issues-notifications.yml b/src/playbook/Configuration/tweaks/qol/disable-usb-issues-notifications.yml index 1543fa1c44..41e502e90b 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-usb-issues-notifications.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-usb-issues-notifications.yml @@ -1,7 +1,6 @@ --- title: Disable 'Notify About USB Issues' description: Disables 'Notify me if there are issues connecting to USB devices' as this is prone to false positives, for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Shell\USB' diff --git a/src/playbook/Configuration/tweaks/qol/disable-win11-settings-banner.yml b/src/playbook/Configuration/tweaks/qol/disable-win11-settings-banner.yml new file mode 100644 index 0000000000..bbb232fc9f --- /dev/null +++ b/src/playbook/Configuration/tweaks/qol/disable-win11-settings-banner.yml @@ -0,0 +1,10 @@ +--- +title: Disable Windows 11 Settings Banner +description: Disables the Windows 11 Settings banner (ValueBanner), which normally displays 'advertisements' such as Microsoft 365 on non-Enterprise editions +actions: + - !registryValue: + path: 'HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\ValueBanner.IdealStateFeatureControlProvider' + value: 'ActivationType' + data: '0' + type: REG_DWORD + builds: [ '>=22000' ] diff --git a/src/playbook/Configuration/tweaks/qol/disable-windows-feedback.yml b/src/playbook/Configuration/tweaks/qol/disable-windows-feedback.yml index 238d7e3bf9..6e1df0269d 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-windows-feedback.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-windows-feedback.yml @@ -1,7 +1,6 @@ --- title: Disable Windows Feedback description: Disables Windows Feedback for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Siuf\Rules' diff --git a/src/playbook/Configuration/tweaks/qol/disable-windows-spotlight.yml b/src/playbook/Configuration/tweaks/qol/disable-windows-spotlight.yml index 1a7cc89752..f0e84eca63 100644 --- a/src/playbook/Configuration/tweaks/qol/disable-windows-spotlight.yml +++ b/src/playbook/Configuration/tweaks/qol/disable-windows-spotlight.yml @@ -1,7 +1,6 @@ --- title: Disable Windows Spotlight description: Windows Spotlight provides lockscreen messages like 'Like what you see?', and are disabled for QoL and privacy -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent' diff --git a/src/playbook/Configuration/tweaks/qol/do-not-reduce-sounds.yml b/src/playbook/Configuration/tweaks/qol/do-not-reduce-sounds.yml index c3425f93e4..483820d9ff 100644 --- a/src/playbook/Configuration/tweaks/qol/do-not-reduce-sounds.yml +++ b/src/playbook/Configuration/tweaks/qol/do-not-reduce-sounds.yml @@ -1,7 +1,6 @@ --- title: Do Not Reduce Sounds While in a Call description: Makes it so that Windows does not reduce sounds in a call for QoL, as people generally wouldn't want this behavior -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Multimedia\Audio' diff --git a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-always-read-section.yml b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-always-read-section.yml index 5ef26ce1c3..7d6a909df1 100644 --- a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-always-read-section.yml +++ b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-always-read-section.yml @@ -1,7 +1,6 @@ --- title: Disable 'Always Read and Scan This Section' description: Disables 'Always Read and Scan This Section' for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Ease of Access' diff --git a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-annoying-features-shortcuts.yml b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-annoying-features-shortcuts.yml index 07bc80f5c3..b3e9378ba2 100644 --- a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-annoying-features-shortcuts.yml +++ b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-annoying-features-shortcuts.yml @@ -1,7 +1,6 @@ --- title: Disable Commonly Annoying Features and Shortcuts description: Disables commonly annoying features such as pressing shift 5 times for sticky keys. -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Accessibility\HighContrast' diff --git a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-making-touch-easier.yml b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-making-touch-easier.yml index 867e23fa31..11dace5179 100644 --- a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-making-touch-easier.yml +++ b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-making-touch-easier.yml @@ -1,7 +1,6 @@ --- title: Disable Accessibility Tool Shortcut description: Disables the accessibility tool shortcut that launches with Win+Vol, which is also labeled as making touch and tablets easier to use, for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Accessibility\SlateLaunch' diff --git a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-warning-sounds.yml b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-warning-sounds.yml index a698de384f..b21daca940 100644 --- a/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-warning-sounds.yml +++ b/src/playbook/Configuration/tweaks/qol/ease-of-access/disable-warning-sounds.yml @@ -1,7 +1,6 @@ --- title: Disable Ease of Access Sounds description: Disable Ease Of Access sounds on activation or sound warnings, like the infamous sticky keys sound, for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Accessibility' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/install-cab.yml b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/install-cab.yml deleted file mode 100644 index ec3595caa5..0000000000 --- a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/install-cab.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Add 'Install CAB' to Context Menu -description: Allows you to install Windows packages in the form of .cab files in the context menu -privilege: TrustedInstaller -actions: - - !registryKey: {path: 'HKCR\CABFolder\Shell\RunAs'} - - !registryValue: - path: 'HKCR\CABFolder\Shell\RunAs' - value: '' - data: 'Install' - type: REG_SZ - - !registryValue: - path: 'HKCR\CABFolder\Shell\RunAs' - value: 'HasLUAShield' - data: '' - type: REG_SZ - - !registryValue: - path: 'HKCR\CABFolder\Shell\RunAs\Command' - value: '' - data: 'cmd /k DISM /Online /Add-Package /PackagePath:\"%1\"' - type: REG_SZ diff --git a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/merge-as-trustedinstaller.yml b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/merge-as-trustedinstaller.yml index 21b0280d76..0154356e9e 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/merge-as-trustedinstaller.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/merge-as-trustedinstaller.yml @@ -1,7 +1,6 @@ --- title: Add 'Merge as TrustedInstaller' to Context Menu description: Adds 'Merge as TrustedInstaller' to context menu for registry files -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\regfile\Shell\RunAs' @@ -16,5 +15,5 @@ actions: - !registryValue: path: 'HKCR\regfile\Shell\RunAs\Command' value: '' - data: 'cmd /c %windir%\AtlasModules\Scripts\RunAsTI.cmd "%1"' + data: 'cmd /c "%windir%\AtlasModules\Scripts\RunAsTI.cmd" "%1"' type: REG_SZ diff --git a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-bat.yml b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-bat.yml index 0c35c9b815..564959a2a7 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-bat.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-bat.yml @@ -1,7 +1,6 @@ --- title: Adds Batch Scripts to 'New' Context Menu description: Adds batch scripts (.bat) to 'New' context menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\.bat\ShellNew' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-ps1.yml b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-ps1.yml index 5467fbe54a..a22ca81d70 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-ps1.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-ps1.yml @@ -1,7 +1,6 @@ --- title: Add PowerShell Script to 'New' Context Menu description: Adds PowerShell script (.ps1) to 'New' context menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\.ps1' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-reg.yml b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-reg.yml index d5c384184f..c1578e4c13 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-reg.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/add-context-menus/new-reg.yml @@ -1,7 +1,6 @@ --- title: Add Registry Entries to 'New' Context Menu description: Adds registry entries (.reg) to 'New' context menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\.reg\ShellNew' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/always-more-details-transfer.yml b/src/playbook/Configuration/tweaks/qol/explorer/always-more-details-transfer.yml index 944db2a8c0..1d8652f91d 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/always-more-details-transfer.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/always-more-details-transfer.yml @@ -1,7 +1,6 @@ --- title: Show More Details by Default on Transfers description: Shows more details by default on file transfers such as exact speed of files copying, moving, deleting, etc. -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/classic-search.yml b/src/playbook/Configuration/tweaks/qol/explorer/classic-search.yml index 2ab77a8e26..76b1aa1546 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/classic-search.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/classic-search.yml @@ -1,7 +1,6 @@ --- title: Revert to Classic Search description: Reverts to the much faster and stable old search box in File Explorer -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/debloat-send-to.yml b/src/playbook/Configuration/tweaks/qol/explorer/debloat-send-to.yml new file mode 100644 index 0000000000..19aa99044b --- /dev/null +++ b/src/playbook/Configuration/tweaks/qol/explorer/debloat-send-to.yml @@ -0,0 +1,9 @@ +--- +title: Debloat Send-To Context Menu +description: Removes commonly un-used items from the Send-To context menu in Explorer +actions: + - !cmd: + command: >- + "AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Disable @('Documents', 'Mail Recipient', 'Fax recipient') + exeDir: true + wait: true diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-check-boxes.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-check-boxes.yml index 14117847e3..6579033a60 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-check-boxes.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-check-boxes.yml @@ -1,7 +1,6 @@ --- title: Disable Use Check Boxes to Select Items description: Disables check boxes in File Explorer to select items for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-folders-this-pc.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-folders-this-pc.yml index 556630b181..b09f725f13 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-folders-this-pc.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-folders-this-pc.yml @@ -1,7 +1,6 @@ --- title: Hide Folders from This PC description: Hides folders from 'This PC' as they are also in Quick Access to reduce clutter and QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-gallery.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-gallery.yml index b24bf57550..1d25ff7a66 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-gallery.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-gallery.yml @@ -1,7 +1,6 @@ --- title: Hide Gallery in File Explorer description: Hides the new 23H2 'Gallery' in File Explorer for viewing pictures -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-invalid-shortcuts-search.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-invalid-shortcuts-search.yml index c2f978aaa5..df0a6dcc5f 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-invalid-shortcuts-search.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-invalid-shortcuts-search.yml @@ -1,7 +1,6 @@ --- title: Disable Searching for Invalid Shortcuts description: Disables searching drives or using NTFS file system tracking for shortcuts that have invalid/non-existant paths for responsiveness -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-network-navigation-pane.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-network-navigation-pane.yml index 4312c5ea34..926d6b24ab 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-network-navigation-pane.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-network-navigation-pane.yml @@ -1,9 +1,7 @@ --- title: Disable Network Navigation Pane in Explorer description: Disables the network navigation pane/item in the Explorer sidebar for QoL by default, as it is mostly unused -privilege: TrustedInstaller actions: - - !registryKey: {path: 'HKCU\SOFTWARE\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}', operation: add} - !registryValue: path: 'HKCU\SOFTWARE\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}' value: 'System.IsPinnedToNameSpaceTree' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/disable-sharing-wizard.yml b/src/playbook/Configuration/tweaks/qol/explorer/disable-sharing-wizard.yml index a8dc902996..280314db7e 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/disable-sharing-wizard.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/disable-sharing-wizard.yml @@ -1,7 +1,6 @@ --- title: Disable Sharing Wizard description: Disables the 'Sharing Wizard' option in File Explorer for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/dont-show-office-files.yml b/src/playbook/Configuration/tweaks/qol/explorer/dont-show-office-files.yml index b858385fc4..6d1df96344 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/dont-show-office-files.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/dont-show-office-files.yml @@ -1,7 +1,6 @@ --- title: Don't Show Office Files description: Don't show Office files in Quick Access (Home) -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/explorer/extend-cache.yml b/src/playbook/Configuration/tweaks/qol/explorer/extend-cache.yml index a9ae924ca3..40abb31bdd 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/extend-cache.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/extend-cache.yml @@ -1,7 +1,6 @@ --- title: Extend Icon Cache description: Extends the icon cache to 4MB for better explorer responsiveness -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/full-context-on-more-than-15-items.yml b/src/playbook/Configuration/tweaks/qol/explorer/full-context-on-more-than-15-items.yml index b80c06ccc8..cbea4b0c97 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/full-context-on-more-than-15-items.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/full-context-on-more-than-15-items.yml @@ -1,7 +1,6 @@ --- title: Always Show the Full Context Menu On Items description: Fixes context menu items missing when more than 15 files are selected, this sets it to 100 items instead of 15, where some context menu items disappear -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/hide-frequently-used-items.yml b/src/playbook/Configuration/tweaks/qol/explorer/hide-frequently-used-items.yml index 93bf67e42a..29ffd65b00 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/hide-frequently-used-items.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/hide-frequently-used-items.yml @@ -1,7 +1,6 @@ --- title: Hide Recent Items description: Hide recent items in Quick Access and other places for privacy and QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/import-power-plan.yml b/src/playbook/Configuration/tweaks/qol/explorer/import-power-plan.yml index f21e1d0fca..cc65ed3fd8 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/import-power-plan.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/import-power-plan.yml @@ -1,7 +1,6 @@ --- title: Add Power Plan File Association description: Adds a file assocation for .pow files, so you can simply double click on it and import it -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\powerscheme\DefaultIcon' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/minimize-mouse-hover-time.yml b/src/playbook/Configuration/tweaks/qol/explorer/minimize-mouse-hover-time.yml index 6c22b7ede8..5588d66e0d 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/minimize-mouse-hover-time.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/minimize-mouse-hover-time.yml @@ -1,7 +1,6 @@ --- title: Minimize Mouse Hover Time for Item Info description: Minimizes mouse hover time (from 400 ms to 20 ms) for hovering over files or folders mostly in File Explorer, so that you can instantly see information for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/no-internet-open-with.yml b/src/playbook/Configuration/tweaks/qol/explorer/no-internet-open-with.yml index e8413c239e..6e8fe2ea05 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/no-internet-open-with.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/no-internet-open-with.yml @@ -1,7 +1,6 @@ --- title: Disable Internet File Assocation Service description: Makes it so that Windows does not ask you if you want to get results from the web for an unknown file extension -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/open-to-this-pc.yml b/src/playbook/Configuration/tweaks/qol/explorer/open-to-this-pc.yml index 54d8862cea..8887a0879a 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/open-to-this-pc.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/open-to-this-pc.yml @@ -1,7 +1,6 @@ --- title: Open File Explorer to This PC description: Configures File Explorer to open to This PC instead of Quick Access for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/removable-drives-only-this-pc.yml b/src/playbook/Configuration/tweaks/qol/explorer/removable-drives-only-this-pc.yml index 58eafdcc2d..710c35df94 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/removable-drives-only-this-pc.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/removable-drives-only-this-pc.yml @@ -1,7 +1,6 @@ --- title: Show Removable Drives Only in 'This PC' description: Shows removable drives only in 'This PC', instead of being seperate in the Explorer sidebar, for QoL -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\DelegateFolders\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}'} - !registryKey: {path: 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\DelegateFolders\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/cast-to-device.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/cast-to-device.yml index 6abeaa8f65..8a2520822a 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/cast-to-device.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/cast-to-device.yml @@ -1,7 +1,6 @@ --- title: Remove 'Cast to device' from Context Menu description: Removes 'Cast to device' from Context Menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/extract-all.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/extract-all.yml index f0892039f3..b933820f0a 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/extract-all.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/extract-all.yml @@ -1,7 +1,6 @@ --- title: Remove 'Extract all' from Context Menu description: Removes 'Extract all' from Context Menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\CompressedFolder\ShellEx\ContextMenuHandlers\{b8cdcb65-b1bf-4b42-9428-1dfdb7ee92af}'} - !registryKey: {path: 'HKCR\SystemFileAssociations\.zip\ShellEx\ContextMenuHandlers\{b8cdcb65-b1bf-4b42-9428-1dfdb7ee92af}'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/give-access-to.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/give-access-to.yml index 20531f9ce5..b5b1ff2a80 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/give-access-to.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/give-access-to.yml @@ -1,7 +1,6 @@ --- title: Remove 'Give access to' from Context Menu description: Removes 'Give access to' from context menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\*\shellex\ContextMenuHandlers\Sharing'} - !registryKey: {path: 'HKCR\Directory\Background\shellex\ContextMenuHandlers\Sharing'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/include-in-library.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/include-in-library.yml index 72180756d5..3577aeb08c 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/include-in-library.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/include-in-library.yml @@ -1,6 +1,5 @@ --- title: Remove 'Include in Library' from Context Menu description: Removes 'Include in Library' from context menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\Folder\ShellEx\ContextMenuHandlers\Library Location'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-bitmap.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-bitmap.yml index 6793b6832d..cd97efa32e 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-bitmap.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-bitmap.yml @@ -1,11 +1,5 @@ --- title: Remove Bitmap Image from 'New' Context Menu description: Removes bitmap image from the 'New' context menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\.bmp\ShellNew'} - # - !powerShell: - # command: '& REMOVEBITMAP.ps1' - # exeDir: true - # wait: true - # runas: currentUserElevated diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-rtf.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-rtf.yml index 9e374eef36..664b1b6b1d 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-rtf.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/new-rtf.yml @@ -1,6 +1,5 @@ --- title: Remove Rich Text Document from 'New' Context Menu description: Removes rich text document from 'New' context menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\.rtf\ShellNew'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/paint-3D.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/paint-3D.yml index e818771d90..ac4abe5555 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/paint-3D.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/paint-3D.yml @@ -1,7 +1,6 @@ --- title: Remove 'Edit with Paint 3D' from Context Menu description: Removes 'Edit with Paint 3D' from context menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\SystemFileAssociations\.3mf\Shell\3D Edit'} - !registryKey: {path: 'HKCR\SystemFileAssociations\.bmp\Shell\3D Edit'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/share.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/share.yml index 65338a48dd..599cbb663e 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/share.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/share.yml @@ -1,7 +1,6 @@ --- title: Remove 'Share' from Context Menu description: Removes 'Share' from Context Menu -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\*\shellex\ContextMenuHandlers\ModernSharing'} - !registryKey: {path: 'HKCR\AllFilesystemObjects\shellex\ContextMenuHandlers\ModernSharing'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/troubleshooting-compat.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/troubleshooting-compat.yml index 1dd8ed3b2a..7900ca9590 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/troubleshooting-compat.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-context-menus/troubleshooting-compat.yml @@ -1,7 +1,6 @@ --- title: Remove 'Troubleshooting Compatibility' from Context Menu description: Removes 'Troubleshooting Compatibility' from context menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-previous-versions.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-previous-versions.yml index 4471629002..6d30d2a73f 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-previous-versions.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-previous-versions.yml @@ -1,7 +1,6 @@ --- title: Remove Previous Versions from Explorer description: Removes previous versions from context menu and file's properties, for QoL -privilege: TrustedInstaller actions: - !registryKey: {path: 'HKCR\AllFilesystemObjects\shellex\PropertySheetHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}'} - !registryKey: {path: 'HKCR\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shellex\PropertySheetHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}'} diff --git a/src/playbook/Configuration/tweaks/qol/explorer/remove-shortcut-text.yml b/src/playbook/Configuration/tweaks/qol/explorer/remove-shortcut-text.yml index c6e7f58d87..fa28b2661a 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/remove-shortcut-text.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/remove-shortcut-text.yml @@ -1,7 +1,6 @@ --- title: Remove Shortcut Text description: Removes '- Shortcut' text appended onto the end of shortcuts for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/show-files.yml b/src/playbook/Configuration/tweaks/qol/explorer/show-files.yml index 54e2ad2431..796a94ccbd 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/show-files.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/show-files.yml @@ -1,7 +1,6 @@ --- title: Configure Explorer to Show All Files with File Extensions description: Configures Explorer to show all files with file extensions such as system files, hidden files, etc. This is for QoL and also security. -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/explorer/use-compact-mode.yml b/src/playbook/Configuration/tweaks/qol/explorer/use-compact-mode.yml index 2f000e440d..9148b1e40e 100644 --- a/src/playbook/Configuration/tweaks/qol/explorer/use-compact-mode.yml +++ b/src/playbook/Configuration/tweaks/qol/explorer/use-compact-mode.yml @@ -1,7 +1,6 @@ --- title: Use Compact Mode description: Sets compact mode in File Explorer -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/hide-disabled-disconnected-sounds.yml b/src/playbook/Configuration/tweaks/qol/hide-disabled-disconnected-sounds.yml index 941503936b..2fe07332a9 100644 --- a/src/playbook/Configuration/tweaks/qol/hide-disabled-disconnected-sounds.yml +++ b/src/playbook/Configuration/tweaks/qol/hide-disabled-disconnected-sounds.yml @@ -1,7 +1,6 @@ --- title: Hide Disabled and Disconnected Devices in Sounds Panel description: Hides disabled and disconnected devices in the sounds panel (mmsys.cpl) for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Multimedia\Audio\DeviceCpl' diff --git a/src/playbook/Configuration/tweaks/qol/security/disable-uac-secure-desktop.yml b/src/playbook/Configuration/tweaks/qol/security/disable-uac-secure-desktop.yml index d2a9e9f30e..fad21c0f42 100644 --- a/src/playbook/Configuration/tweaks/qol/security/disable-uac-secure-desktop.yml +++ b/src/playbook/Configuration/tweaks/qol/security/disable-uac-secure-desktop.yml @@ -1,7 +1,6 @@ --- title: Disable UAC Secure Desktop description: Disables switching to the Secure Desktop when prompting for elevation. An application would need admin privileges to control the mouse and keyboard to accept the UAC prompt anyways. As a note, UAC is not designed to save you from malware, UAC can easily be bypassed on admin accounts (e.g. check GitHub) -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' diff --git a/src/playbook/Configuration/tweaks/qol/set-hidden-settings-pages.yml b/src/playbook/Configuration/tweaks/qol/set-hidden-settings-pages.yml index 98878f5f85..5ab7deb983 100644 --- a/src/playbook/Configuration/tweaks/qol/set-hidden-settings-pages.yml +++ b/src/playbook/Configuration/tweaks/qol/set-hidden-settings-pages.yml @@ -1,7 +1,6 @@ --- title: Set Hidden Pages description: Hides Settings pages that are either broken or unused -privilege: TrustedInstaller actions: # https://learn.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app @@ -9,14 +8,14 @@ actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' value: 'SettingsPageVisibility' - data: 'hide:recovery;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;backup;' + data: 'hide:recovery;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;notifications;privacy-notifications;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;backup' type: REG_SZ - builds: [ '!>=22000' ] + builds: [ '<22000' ] # Windows 11 - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' value: 'SettingsPageVisibility' - data: 'hide:recovery;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;family-group;deviceusage;home;' + data: 'hide:recovery;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;notifications;privacy-notifications;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;family-group;deviceusage;home' type: REG_SZ builds: [ '>=22000' ] diff --git a/src/playbook/Configuration/tweaks/qol/shell/alt-tab-open-windows.yml b/src/playbook/Configuration/tweaks/qol/shell/alt-tab-open-windows.yml index d383e1426f..1f6009c751 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/alt-tab-open-windows.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/alt-tab-open-windows.yml @@ -1,7 +1,6 @@ --- title: Do Not Show Edge Tabs in Alt-Tab description: Sets the 'Alt + Tab shows' option to 'Open windows only', meaning that individual Edge tabs won't be displayed, which would clutter the alt-tab interface -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/shell/config-autorun-autoplay.yml b/src/playbook/Configuration/tweaks/qol/shell/config-autorun-autoplay.yml index fa5b95ebc5..04fc0fd067 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/config-autorun-autoplay.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/config-autorun-autoplay.yml @@ -1,7 +1,6 @@ --- title: Disable AutoRun/AutoPlay description: Disables AutoRun/AutoPlay for the optimal security and usability/QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/shell/disable-aero-shake.yml b/src/playbook/Configuration/tweaks/qol/shell/disable-aero-shake.yml index df6f14da9e..146d2c930b 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/disable-aero-shake.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/disable-aero-shake.yml @@ -1,7 +1,6 @@ --- title: Disable Aero Shake description: Disables Aero Shake, which is where you shake a window and all other Windows minimise, as most of the time it is accidently triggered -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/shell/disable-low-disk-warning.yml b/src/playbook/Configuration/tweaks/qol/shell/disable-low-disk-warning.yml index 75ff079692..3cd2a06d24 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/disable-low-disk-warning.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/disable-low-disk-warning.yml @@ -1,7 +1,6 @@ --- title: Diasble Low Disk Space Checks description: DIsables low disk space checks, meaning that there will not be a low disk space warning for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/shell/disable-menu-delay.yml b/src/playbook/Configuration/tweaks/qol/shell/disable-menu-delay.yml index cb08d69bae..f35b1f2767 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/disable-menu-delay.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/disable-menu-delay.yml @@ -1,7 +1,6 @@ --- title: Disable Menu Hover Delay description: Makes hovering over sub-menus in menus instant, instead of having a slight delay on hover -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/shell/disable-nearby-sharing.yml b/src/playbook/Configuration/tweaks/qol/shell/disable-nearby-sharing.yml index cdb1395c13..cf7b7ce389 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/disable-nearby-sharing.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/disable-nearby-sharing.yml @@ -1,7 +1,6 @@ --- title: Disable Shared Experiences description: Disables 'Shared Experiences', which is a way of sharing items between advices for privacy and QoL -privilege: TrustedInstaller actions: # https://www.elevenforum.com/t/turn-on-or-off-nearby-sharing-in-windows-11.2644/ - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/shell/disable-network-location-wizard.yml b/src/playbook/Configuration/tweaks/qol/shell/disable-network-location-wizard.yml index 2af8648ebf..ac55c632fb 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/disable-network-location-wizard.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/disable-network-location-wizard.yml @@ -1,7 +1,6 @@ --- title: Disable Network Location Wizard description: Disables the Network Location Wizard, which is the pop-up about your network being discoverable -privilege: TrustedInstaller actions: - !registryKey: path: 'HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff' diff --git a/src/playbook/Configuration/tweaks/qol/shell/disallow-edge-swipe.yml b/src/playbook/Configuration/tweaks/qol/shell/disallow-edge-swipe.yml new file mode 100644 index 0000000000..7f7c7d4070 --- /dev/null +++ b/src/playbook/Configuration/tweaks/qol/shell/disallow-edge-swipe.yml @@ -0,0 +1,8 @@ +--- +title: Disallow Edge Swipe +description: Disallows the ability to swipe from the edge of the screen, e.g., when in a fullscreen UWP app, the titlebar won't show when you put your mouse to the top of the screen. This can be useful for games. +actions: + - !cmd: + command: 'reg import "AtlasDesktop\4. Interface Tweaks\Edge Swipe\Disallow Edge Swipe (default).reg"' + exeDir: true + wait: true diff --git a/src/playbook/Configuration/tweaks/qol/shell/no-recommendations-start-menu.yml b/src/playbook/Configuration/tweaks/qol/shell/no-recommendations-start-menu.yml index 230de1168b..58101edae9 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/no-recommendations-start-menu.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/no-recommendations-start-menu.yml @@ -1,7 +1,6 @@ --- title: Disable Recommendations in the Start Menu description: Do not show recommendations for tips, shortcuts, new apps, and more in the Start Menu -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/shell/restore-old-context-menu.yml b/src/playbook/Configuration/tweaks/qol/shell/restore-old-context-menu.yml index 0441c89bb3..35577e90c4 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/restore-old-context-menu.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/restore-old-context-menu.yml @@ -1,7 +1,6 @@ --- title: Restore Old Context Menu description: Restores the old context menu in Windows 11 -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/shell/set-unpinned-notification-items.yml b/src/playbook/Configuration/tweaks/qol/shell/set-unpinned-notification-items.yml index ec5b0084bb..877dd44ca1 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/set-unpinned-notification-items.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/set-unpinned-notification-items.yml @@ -1,33 +1,34 @@ --- -title: Disable Windows Chat -description: Disables Windows Chat as it's not commonly used -privilege: TrustedInstaller +title: Set Unpinned Control Center Items +description: Disables unused control center items by default for QoL actions: + - !taskKill: {name: 'explorer'} + # Windows 10 - !registryValue: path: 'HKCU\Control Panel\Quick Actions\Control Center\Unpinned' value: 'Microsoft.QuickAction.Connect' data: '' type: REG_NONE - builds: [ '!>=22000' ] + builds: [ '<22000' ] - !registryValue: path: 'HKCU\Control Panel\Quick Actions\Control Center\Unpinned' value: 'Microsoft.QuickAction.Location' data: '' type: REG_NONE - builds: [ '!>=22000' ] + builds: [ '<22000' ] - !registryValue: path: 'HKCU\Control Panel\Quick Actions\Control Center\Unpinned' value: 'Microsoft.QuickAction.ScreenClipping' data: '' type: REG_NONE - builds: [ '!>=22000' ] + builds: [ '<22000' ] - !registryValue: path: 'HKCU\Control Panel\Quick Actions\Control Center\QuickActionsStateCapture' value: 'Toggles' data: 'Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.AllSettings:false,Microsoft.QuickAction.Project:false' type: REG_SZ - builds: [ '!>=22000' ] + builds: [ '<22000' ] # Windows 11 - !registryValue: @@ -48,3 +49,5 @@ actions: data: 'Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.Accessibility:false,Microsoft.QuickAction.ProjectL2:false' type: REG_SZ builds: [ '>=22000' ] + + - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false} diff --git a/src/playbook/Configuration/tweaks/qol/shell/show-more-pins.yml b/src/playbook/Configuration/tweaks/qol/shell/show-more-pins.yml index 9b8300b6b6..60eb139449 100644 --- a/src/playbook/Configuration/tweaks/qol/shell/show-more-pins.yml +++ b/src/playbook/Configuration/tweaks/qol/shell/show-more-pins.yml @@ -1,7 +1,6 @@ --- title: Show More Pins in Start description: Shows more pins in the Start Menu, meaning less recommendations -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/show-all-tasks-control-panel.yml b/src/playbook/Configuration/tweaks/qol/show-all-tasks-control-panel.yml index fed7433470..c606216774 100644 --- a/src/playbook/Configuration/tweaks/qol/show-all-tasks-control-panel.yml +++ b/src/playbook/Configuration/tweaks/qol/show-all-tasks-control-panel.yml @@ -1,7 +1,6 @@ --- title: Show All Tasks in Control Panel description: Shows 'All Tasks' in Control Panel (God Mode), so that people can easily access all settings for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCR\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}' diff --git a/src/playbook/Configuration/tweaks/qol/startup-shutdown/decrease-shutdown-time.yml b/src/playbook/Configuration/tweaks/qol/startup-shutdown/decrease-shutdown-time.yml index 4d02adee9c..f08cfc75aa 100644 --- a/src/playbook/Configuration/tweaks/qol/startup-shutdown/decrease-shutdown-time.yml +++ b/src/playbook/Configuration/tweaks/qol/startup-shutdown/decrease-shutdown-time.yml @@ -1,7 +1,6 @@ --- title: Decrease Shutdown Time description: Makes it so that Windows is less tolerable to hung apps, and tries to kill them as fast as possible on shutdown -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/startup-shutdown/disable-startup-delay.yml b/src/playbook/Configuration/tweaks/qol/startup-shutdown/disable-startup-delay.yml index d479a98135..bff5fd44ba 100644 --- a/src/playbook/Configuration/tweaks/qol/startup-shutdown/disable-startup-delay.yml +++ b/src/playbook/Configuration/tweaks/qol/startup-shutdown/disable-startup-delay.yml @@ -1,7 +1,6 @@ --- title: Disable Startup Delay description: Disables the startup delay of startup applications -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Serialize' diff --git a/src/playbook/Configuration/tweaks/qol/startup-shutdown/enable-verbose-messages.yml b/src/playbook/Configuration/tweaks/qol/startup-shutdown/enable-verbose-messages.yml new file mode 100644 index 0000000000..383a97349d --- /dev/null +++ b/src/playbook/Configuration/tweaks/qol/startup-shutdown/enable-verbose-messages.yml @@ -0,0 +1,9 @@ +--- +title: Enable verbose startup, shutdown, logon, and logoff status messages +description: Enables verbose status messages so users can have more insight on exactly what's happening on startup, shutdown, logon, and logoff +actions: + - !registryValue: + path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' + value: 'verbosestatus' + data: '1' + type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/qol/startup-shutdown/force-end-shutdown-apps.yml b/src/playbook/Configuration/tweaks/qol/startup-shutdown/force-end-shutdown-apps.yml index 396b85191a..ff8f3fec61 100644 --- a/src/playbook/Configuration/tweaks/qol/startup-shutdown/force-end-shutdown-apps.yml +++ b/src/playbook/Configuration/tweaks/qol/startup-shutdown/force-end-shutdown-apps.yml @@ -1,7 +1,6 @@ --- title: Force Close Applications On Session End description: Forcefully closes all applications on restart, shut down, or sign out of Windows, instead of prompting the user to save everything first -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/system/crash-control-qol.yml b/src/playbook/Configuration/tweaks/qol/system/crash-control-qol.yml index b35962963e..96608c8642 100644 --- a/src/playbook/Configuration/tweaks/qol/system/crash-control-qol.yml +++ b/src/playbook/Configuration/tweaks/qol/system/crash-control-qol.yml @@ -1,7 +1,6 @@ --- title: Configure Crash Control description: Configures the BSoD for having the most useful information and not leaving behind dumps (which most people will not look into anyways) -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SYSTEM\CurrentControlSet\Control\CrashControl' diff --git a/src/playbook/Configuration/tweaks/qol/system/disable-wpbt.yml b/src/playbook/Configuration/tweaks/qol/system/disable-wpbt.yml index 51339b9343..f6c68863ad 100644 --- a/src/playbook/Configuration/tweaks/qol/system/disable-wpbt.yml +++ b/src/playbook/Configuration/tweaks/qol/system/disable-wpbt.yml @@ -1,7 +1,6 @@ --- title: Disable Windows Platform Binary Table Execution (WPBT) description: Disables WPBT with an undocumented Registry value, which is an ACPI table in your firmware to execute a program each boot of Windows such as unwanted OEM bloatware. -privilege: TrustedInstaller actions: # https://github.com/Jamesits/dropWPBT # https://download.microsoft.com/download/8/A/2/8A2FB72D-9B96-4E2D-A559-4A27CF905A80/windows-platform-binary-table.docx diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/cmd-win-x.yml b/src/playbook/Configuration/tweaks/qol/taskbar/cmd-win-x.yml index feb9b430e6..913f3dacc9 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/cmd-win-x.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/cmd-win-x.yml @@ -1,7 +1,6 @@ --- title: Show Command Prompt on Win+X description: Shows Command Prompt instead of PowerShell on Windows + X, as it is what most users are familar with -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/config-pins.yml b/src/playbook/Configuration/tweaks/qol/taskbar/config-pins.yml index de7aef6534..45238434f6 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/config-pins.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/config-pins.yml @@ -1,14 +1,15 @@ --- title: Configure Taskbar Pins description: Configures taskbar pins for QoL, puts the browser first (if there is one) and Explorer next -privilege: TrustedInstaller actions: # PowerShell commands used: - # [BitConverter]::ToString($(Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "FavoritesResolve").FavoritesResolve) -replace '-' - # [BitConverter]::ToString($(Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "Favorites").Favorites) -replace '-' + # [BitConverter]::ToString($(Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "FavoritesResolve").FavoritesResolve) -replace '-' | clip + # [BitConverter]::ToString($(Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "Favorites").Favorites) -replace '-' | clip + - !taskKill: {name: 'explorer'} - !run: exe: 'TASKBARPINS.cmd' + option: '!install-another-browser' exeDir: true - !run: exe: 'TASKBARPINS.cmd' @@ -25,3 +26,9 @@ actions: args: '"Google Chrome"' option: 'browser-chrome' exeDir: true + - !run: + exe: 'TASKBARPINS.cmd' + args: '"LibreWolf"' + option: 'browser-librewolf' + exeDir: true + - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false} diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-badges-taskbar.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-badges-taskbar.yml deleted file mode 100644 index 4c727e962b..0000000000 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-badges-taskbar.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Hide UWP Badges on Taskbar -description: Hides badges on the taskbar for QoL -privilege: TrustedInstaller -actions: - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' - value: 'TaskbarBadges' - data: '0' - type: REG_DWORD diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-cloud-optimized-content.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-cloud-optimized-content.yml index cfe0e929f8..7a531dc17c 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-cloud-optimized-content.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-cloud-optimized-content.yml @@ -1,7 +1,6 @@ --- title: Disable Cloud Optimized Content on Taskbar -description: Disables cloud optimized content in the taskbar for QoL, which will pin items dependant on what you use like having a linked phone or Xbox Live -privilege: TrustedInstaller +description: Disables cloud optimized content in the taskbar for QoL, which pins items dependant on things like having linked phone or Xbox Live - seems to break Windows Spotlight actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-copilot.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-copilot.yml index 53ad5666bf..a427821f05 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-copilot.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-copilot.yml @@ -1,7 +1,6 @@ --- -title: Disable Windows Copilot -description: Disables Windows Copilot as it depends on Edge, as well it collecting data and it not being used by most users -privilege: TrustedInstaller +title: Disable Microsoft Copilot +description: Disables Microsoft Copilot as it depends on Edge, as well it collecting data and not being used by most users builds: [ '>=22000' ] actions: # Doesn't work with HKLM diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-desktop-peek.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-desktop-peek.yml index 9d67d45027..337011fe0f 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-desktop-peek.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-desktop-peek.yml @@ -1,7 +1,6 @@ --- title: Disable Show Desktop Peek on Taskbar description: Disables the 'Show Desktop' peek feature on the taskbar, as most of the time people accidently trigger it, so it is disabled here for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-news-and-interests.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-news-and-interests.yml index 60f9df9a2e..eb81530957 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-news-and-interests.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-news-and-interests.yml @@ -1,15 +1,9 @@ --- title: Disable News and Interests description: Disables News and Interests on the taskbar for privacy (lots of third party connections) and QoL -privilege: TrustedInstaller actions: - !taskKill: {name: 'explorer'} - - !registryValue: - path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds' - value: 'ShellFeedsTaskbarViewMode' - data: '2' - type: REG_DWORD - - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false} + - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds' value: 'EnableFeeds' @@ -20,15 +14,5 @@ actions: value: 'AllowNewsAndInterests' data: '0' type: REG_DWORD - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests\AllowNewsAndInterests' - value: 'value' - data: '0' - type: REG_DWORD - # Disable Widgets in taskbar - - !registryValue: - path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' - value: 'TaskbarDa' - data: '0' - type: REG_DWORD - builds: [ '>=22000' ] + + - !run: {exe: 'explorer.exe', runas: 'currentUser', wait: false} diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-tablet-mode.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-tablet-mode.yml index a2e44d0e39..fa403836d7 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-tablet-mode.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-tablet-mode.yml @@ -1,7 +1,6 @@ --- title: Never Use Tablet Mode description: Makes Windows never use tablet mode for QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/disable-windows-chat.yml b/src/playbook/Configuration/tweaks/qol/taskbar/disable-windows-chat.yml index 0c75f4bc53..91e3008160 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/disable-windows-chat.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/disable-windows-chat.yml @@ -1,7 +1,6 @@ --- title: Disable Windows Chat description: Disables Windows Chat as it's not commonly used -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/end-task.yml b/src/playbook/Configuration/tweaks/qol/taskbar/end-task.yml index 0c1db2927c..7ae250e00f 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/end-task.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/end-task.yml @@ -1,7 +1,6 @@ --- title: Add 'End task' to the taskbar description: Adds 'End task' as a right-click option on taskbar for QoL -privilege: TrustedInstaller builds: [ '>22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/hide-meet-now.yml b/src/playbook/Configuration/tweaks/qol/taskbar/hide-meet-now.yml index d5bb36e905..6bd91cc8b4 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/hide-meet-now.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/hide-meet-now.yml @@ -1,7 +1,6 @@ --- title: Hide 'Meet Now' on Taskbar description: Hides 'Meet Now' on the taskbar for QoL and privacy (as it is an online feature) -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/hide-task-view.yml b/src/playbook/Configuration/tweaks/qol/taskbar/hide-task-view.yml index 20d7c8a38f..e0076bf8c5 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/hide-task-view.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/hide-task-view.yml @@ -1,7 +1,6 @@ --- title: Disable Task View on Taskbar description: Disables the Task View button on the taskbar for QoL, as it can be accessed with Win + Tab anyways -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultiTaskingView\AllUpView' diff --git a/src/playbook/Configuration/tweaks/qol/taskbar/set-to-left.yml b/src/playbook/Configuration/tweaks/qol/taskbar/set-to-left.yml index 47e248ae9d..6055729aa3 100644 --- a/src/playbook/Configuration/tweaks/qol/taskbar/set-to-left.yml +++ b/src/playbook/Configuration/tweaks/qol/taskbar/set-to-left.yml @@ -1,7 +1,6 @@ --- title: Set Taskbar to Align Left description: Sets taskbar to align left instead of centered -privilege: TrustedInstaller builds: [ '>=22000' ] actions: - !registryValue: diff --git a/src/playbook/Configuration/tweaks/qol/visual-effects.yml b/src/playbook/Configuration/tweaks/qol/visual-effects.yml index 3586bfbdfb..b4012f37b7 100644 --- a/src/playbook/Configuration/tweaks/qol/visual-effects.yml +++ b/src/playbook/Configuration/tweaks/qol/visual-effects.yml @@ -1,7 +1,6 @@ --- title: Configure Visual Effects description: Configures the visual effects in Windows for the optimal responsiveness, performance and QoL -privilege: TrustedInstaller actions: - !registryValue: path: 'HKCU\Control Panel\Desktop' diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/defer-updates.yml b/src/playbook/Configuration/tweaks/qol/windows-update/defer-updates.yml deleted file mode 100644 index ae71405438..0000000000 --- a/src/playbook/Configuration/tweaks/qol/windows-update/defer-updates.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Defer Non-Critical Windows Updates -description: Defers/delays non-critical Windows Updates that are most likely for new features for QoL and increased stability. -privilege: TrustedInstaller -actions: - # Defer updates - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferQualityUpdates', data: '1', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferQualityUpdatesPeriodInDays', data: '6', type: REG_DWORD} diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-reboot.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-reboot.yml index 152f4e7fd9..72287c406b 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-reboot.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-reboot.yml @@ -1,7 +1,6 @@ --- title: Disable WU Auto-Reboot description: Disables Windows Update from automatically restarting your computer when there's pending updates. -privilege: TrustedInstaller actions: # Make WU not wake up your computer to install updates # Seems to be legacy on Windows 11 diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-updates.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-updates.yml index b62045c29f..72e4c10e44 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-updates.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-auto-updates.yml @@ -1,31 +1,31 @@ --- title: Disable WU Auto-Updates description: Disables Windows Update from automatically updating Windows for QoL, at the cost of security. -privilege: TrustedInstaller actions: # Disable auto-updates - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU', value: 'AUOptions', data: '2', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU', value: 'NoAutoUpdate', data: '1', type: REG_DWORD} + - !cmd: + command: 'reg import "AtlasDesktop\3. General Configuration\Windows Update\Automatic Updates\Disable Automatic Updates (default).reg"' + exeDir: true + wait: true + option: 'disable-auto-updates' - # Prevent DevHome & Outlook from installing + # Prevent DevHome & Outlook from re-installing - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\DevHomeUpdate'} - !registryKey: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\OutlookUpdate'} # Prevent random apps from installing, including Widgets or advertisements - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\Settings', value: 'STOREBIZCRITICALAPPS', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\InstallService\State\CategoryCache', value: '48caba8a-2e62-2097-dcd8-4255c637b32dUS', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'AccountsService', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'BackupBanner', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'DesktopSpotlight', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'IrisService', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'SystemSettingsExtensions', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'WebExperienceHost', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'WindowsBackup', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\LastOnlineScanTimeForAppCategory\855E8A7C-ECB4-4CA3-B045-1DFA50104289', value: 'EA6A8EC8-24BF-48A3-B0F0-A86A6447C0E2', operation: delete} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RequestedAppCategories\855E8A7C-ECB4-4CA3-B045-1DFA50104289', value: 'EA6A8EC8-24BF-48A3-B0F0-A86A6447C0E2', operation: delete} - - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\AppIso\FirewallRules', value: '{5D2C72C6-969D-4C1E-8484-41ED53782351}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|RA42=IntErnet|RA62=IntErnet|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUAuth=O:LSD:(A;;CC;;;S-1-15-3-1)(A;;CC;;;WD)(A;;CC;;;AN)|LUOwn=S-1-5-21-1752034362-1788923297-4099944-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|'} - - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules', value: '{26037439-AD8B-4A56-AF2E-F6CDDB59F6BE}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUOwn=S-1-5-21-1752034362-1788923297-4099944-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|Platform=2:6:2|Platform2=GTEQ|'} - - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules', value: '{44000509-BE9E-419B-A60B-54E62CF41203}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUOwn=S-1-5-21-2784447539-1655915103-1638202157-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|'} - - # Prevent Microsoft Teams installation - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications', value: 'ConfigureChatAutoInstall', data: '0', type: REG_DWORD} + # Commented until it's proven that this helps - deleting these values is irreversible + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\Settings', value: 'STOREBIZCRITICALAPPS', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\InstallService\State\CategoryCache', value: '48caba8a-2e62-2097-dcd8-4255c637b32dUS', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'AccountsService', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'BackupBanner', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'DesktopSpotlight', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'IrisService', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'SystemSettingsExtensions', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'WebExperienceHost', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages\Components', value: 'WindowsBackup', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\LastOnlineScanTimeForAppCategory\855E8A7C-ECB4-4CA3-B045-1DFA50104289', value: 'EA6A8EC8-24BF-48A3-B0F0-A86A6447C0E2', operation: delete} + # - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RequestedAppCategories\855E8A7C-ECB4-4CA3-B045-1DFA50104289', value: 'EA6A8EC8-24BF-48A3-B0F0-A86A6447C0E2', operation: delete} + # - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\AppIso\FirewallRules', value: '{5D2C72C6-969D-4C1E-8484-41ED53782351}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|RA42=IntErnet|RA62=IntErnet|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUAuth=O:LSD:(A;;CC;;;S-1-15-3-1)(A;;CC;;;WD)(A;;CC;;;AN)|LUOwn=S-1-5-21-1752034362-1788923297-4099944-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|'} + # - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules', value: '{26037439-AD8B-4A56-AF2E-F6CDDB59F6BE}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUOwn=S-1-5-21-1752034362-1788923297-4099944-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|Platform=2:6:2|Platform2=GTEQ|'} + # - !registryValue: {path: 'HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules', value: '{44000509-BE9E-419B-A60B-54E62CF41203}', data: 'v2.32|Action=Block|Active=TRUE|Dir=Out|Profile=Domain|Profile=Private|Profile=Public|Name=Windows Web Experience Pack|Desc=Windows Web Experience Pack|LUOwn=S-1-5-21-2784447539-1655915103-1638202157-1001|AppPkgId=S-1-15-2-1312876954-3728250218-3694470604-4188764552-3197360367-780678243-3229644300|EmbedCtxt=Windows Web Experience Pack|'} diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-delivery-optimization.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-delivery-optimization.yml index 9fdcbcfe74..23172f88fe 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-delivery-optimization.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-delivery-optimization.yml @@ -1,7 +1,6 @@ --- title: Disable Delivery Optimization description: Disables Delivery Optimization to make sure that no bandwidth is used in the background for peer-to-peer Windows Updates -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-feature-updates.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-feature-updates.yml index bbc7569d28..dac336c128 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-feature-updates.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-feature-updates.yml @@ -1,14 +1,14 @@ --- title: Disable Feature Updates -description: Disables feature updates as they will almost definetly reset tweaks, bring back bloatware and potentially break the system. -privilege: TrustedInstaller +description: Disables feature updates as they might reset tweaks, bring back bloatware and potentially break the system. actions: - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferFeatureUpdates', data: '1', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferFeatureUpdatesPeriodInDays', data: '365', type: REG_DWORD} + # - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferFeatureUpdates', data: '1', type: REG_DWORD} + # - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'DeferFeatureUpdatesPeriodInDays', data: '365', type: REG_DWORD} # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.WindowsUpdate::TargetReleaseVersion - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'TargetReleaseVersion', data: '1', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'BranchReadinessLevel', data: '20', type: REG_DWORD} - !powerShell: - command: 'if ((Get-WmiObject Win32_OperatingSystem).Caption -Match 11) {$a = ''Windows 11''} else {$a = ''Windows 10''}; New-ItemProperty -Path ''HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'' -Name ''ProductVersion'' -Value $a -PropertyType String -Force' + command: 'if ((Get-CimInstance -Class Win32_OperatingSystem).Caption -match 11) {$a = ''Windows 11''} else {$a = ''Windows 10''}; New-ItemProperty -Path ''HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'' -Name ''ProductVersion'' -Value $a -PropertyType String -Force' + wait: true - !powerShell: command: '$ver = (Get-ItemProperty ''HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'').DisplayVersion; New-ItemProperty -Path ''HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'' -Name ''TargetReleaseVersion'' -Value $ver -PropertyType String -Force' + wait: true diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-insider.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-insider.yml index 0fc6b40977..c136bb91d3 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-insider.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-insider.yml @@ -1,7 +1,6 @@ --- title: Restrict Windows Insider description: Forcefully restricts Windows Insider from being enabled to prevent extra data collection, tweaks being reverted and general instability. -privilege: TrustedInstaller actions: # Disable Windows Insider # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.WindowsUpdate::ManagePreviewBuilds diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-installation.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-telemetry.yml similarity index 57% rename from src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-installation.yml rename to src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-telemetry.yml index dcd5ed5939..4eff1ca16f 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-installation.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-msrt-telemetry.yml @@ -1,11 +1,7 @@ --- -title: Disable MSRT installation -description: Disables MSRT installation in Windows Update and its telemetry features -privilege: TrustedInstaller +title: Disable MSRT telemetry +description: Disables MSRT's (Malicious Software Removal Tool) telemetry features actions: - # Prevent Malicious Software Removal Tool from installing - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\MRT', value: 'DontOfferThroughWUAU', type: REG_DWORD, data: '1'} - # Disable MSRT telemetry - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\MRT', value: 'DontReportInfectionInformation', type: REG_DWORD, data: '1'} - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\RemovalTools\MpGears', value: 'HeartbeatTrackingIndex', type: REG_DWORD, data: '0'} diff --git a/src/playbook/Configuration/tweaks/qol/windows-update/disable-nagging.yml b/src/playbook/Configuration/tweaks/qol/windows-update/disable-nagging.yml index c3a9558a8a..9f6b532430 100644 --- a/src/playbook/Configuration/tweaks/qol/windows-update/disable-nagging.yml +++ b/src/playbook/Configuration/tweaks/qol/windows-update/disable-nagging.yml @@ -1,13 +1,9 @@ --- title: Disable WU Nagging description: Disables Windows Update from nagging you in any way possible, e.g. about restarting your computer. -privilege: TrustedInstaller actions: # Do not adjust default option to 'Install Updates and Shut Down' in Shut Down Windows dialog box # https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.WindowsUpdate::AUNoUasDefaultPolicy_Mach - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU', value: 'NoAUAsDefaultShutdownOption', data: '1', type: REG_DWORD} # Seems to be legacy, but it will be kept anyways https://www.thewindowsclub.com/disable-windows-creators-update-notice-windows-update - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings', value: 'HideMCTLink', data: '1', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'SetAutoRestartNotificationDisable', data: '1', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings', value: 'RestartNotificationsAllowed2', data: '0', type: REG_DWORD} - - !registryValue: {path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate', value: 'SetUpdateNotificationLevel', data: '2', type: REG_DWORD} diff --git a/src/playbook/Configuration/tweaks/scripts/script-backup2.yml b/src/playbook/Configuration/tweaks/scripts/script-backup2.yml index 6e72245317..edfbe25791 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-backup2.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-backup2.yml @@ -1,9 +1,9 @@ --- title: Backup Atlas Services and Drivers description: Backs up default Atlas services and drivers, after all the tweaks are finished -privilege: TrustedInstaller actions: - - !cmd: - command: 'powershell -NoP -EP Unrestricted -File BACKUP.ps1 "%windir%\AtlasModules\Other\atlasServices.reg"' + - !powerShell: + command: >- + .\BACKUP.ps1 -FilePath """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Other\atlasServices.reg""" wait: true exeDir: true diff --git a/src/playbook/Configuration/tweaks/scripts/script-cleanup.yml b/src/playbook/Configuration/tweaks/scripts/script-cleanup.yml index 1b92d061f6..5026883c35 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-cleanup.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-cleanup.yml @@ -1,7 +1,6 @@ --- title: Cleanup Temporary Files description: Cleans up temporary files using Disk Cleanup (if no other installs of Windows are found) -privilege: TrustedInstaller actions: - !powerShell: command: '.\CLEANUP.ps1' diff --git a/src/playbook/Configuration/tweaks/scripts/script-clientcbs.yml b/src/playbook/Configuration/tweaks/scripts/script-clientcbs.yml new file mode 100644 index 0000000000..d44d4d9797 --- /dev/null +++ b/src/playbook/Configuration/tweaks/scripts/script-clientcbs.yml @@ -0,0 +1,8 @@ +--- +title: Modify Client.CBS +description: Modifies components related to Client.CBS, the miscellaneous system package in Windows 10+ +actions: + - !powerShell: + command: '.\CLIENTCBS.ps1' + exeDir: true + wait: true diff --git a/src/playbook/Configuration/tweaks/scripts/script-core-isolation.yml b/src/playbook/Configuration/tweaks/scripts/script-core-isolation.yml index 055caaa7b1..9c4e3c872d 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-core-isolation.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-core-isolation.yml @@ -1,7 +1,6 @@ --- title: Disable Core Isolation description: Disables Core Isolation (VBS) based on the user's options -privilege: TrustedInstaller option: 'vbs-disable' actions: - !powerShell: diff --git a/src/playbook/Configuration/tweaks/scripts/script-devices.yml b/src/playbook/Configuration/tweaks/scripts/script-devices.yml index 8c18aec8ee..10ba6b4936 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-devices.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-devices.yml @@ -1,7 +1,6 @@ --- title: Disable Devices description: Disables devices that users would not typically need to reduce any potential system resources usage in the background -privilege: TrustedInstaller actions: - !powerShell: {command: 'Disable-NetAdapterBinding -Name "*" -ComponentID ms_msclient, ms_server, ms_lldp, ms_lltdio, ms_rspndr'} - !powerShell: diff --git a/src/playbook/Configuration/tweaks/scripts/script-file-associations.yml b/src/playbook/Configuration/tweaks/scripts/script-file-associations.yml index b86791a041..09a43262b5 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-file-associations.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-file-associations.yml @@ -1,7 +1,6 @@ --- title: Set File Associations -description: Sets file associations for the user-selected web browser and other apps like the Windows Photo Viewer -privilege: TrustedInstaller +description: Sets file associations for the user-selected web browser and other apps actions: - !run: exe: 'FILEASSOC.cmd' @@ -12,6 +11,11 @@ actions: args: '"Brave"' option: 'browser-brave' exeDir: true + - !run: + exe: 'FILEASSOC.cmd' + args: '"LibreWolf"' + option: 'browser-librewolf' + exeDir: true - !run: exe: 'FILEASSOC.cmd' args: '"Firefox"' @@ -22,18 +26,3 @@ actions: args: '"Google Chrome"' option: 'browser-chrome' exeDir: true - - !run: - exe: 'FILEASSOC.cmd' - args: '"mpv"' - option: 'player-mpv' - exeDir: true - - !run: - exe: 'FILEASSOC.cmd' - args: '"MPC-HC"' - option: 'player-mpchc' - exeDir: true - - !run: - exe: 'FILEASSOC.cmd' - args: '"VLC"' - option: 'player-vlc' - exeDir: true diff --git a/src/playbook/Configuration/tweaks/scripts/script-finalize.yml b/src/playbook/Configuration/tweaks/scripts/script-finalize.yml index 7cede54c09..44809786c9 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-finalize.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-finalize.yml @@ -1,9 +1,8 @@ --- -title: Do Final Tweaks -description: Does final tweaks that are run from a batch script, as some tweaks cannot be done in playbook YAMLs -privilege: TrustedInstaller +title: Final Tweaks +description: Runs any tweaks that are miscellaneous but need more advanced scripting features actions: - - !run: + - !powerShell: + command: '.\FINALIZE.ps1' exeDir: true - exe: 'FINALIZE.cmd' - weight: 100 + wait: true diff --git a/src/playbook/Configuration/tweaks/scripts/script-mitigations.yml b/src/playbook/Configuration/tweaks/scripts/script-mitigations.yml index 0261cb5d33..ff7e535225 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-mitigations.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-mitigations.yml @@ -1,7 +1,6 @@ --- title: Disable Mitigations description: Disables mitigations in Windows dependant on the user's options -privilege: TrustedInstaller option: 'mitigations-disable' actions: - !cmd: diff --git a/src/playbook/Configuration/tweaks/scripts/script-ngen.yml b/src/playbook/Configuration/tweaks/scripts/script-ngen.yml index 5bc9ddb5f7..ac24ae6e9e 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-ngen.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-ngen.yml @@ -1,7 +1,6 @@ --- title: Runs NGEN on PowerShell libraries description: Optimizes PowerShell startup time by compiling the .NET libraries -privilege: TrustedInstaller actions: - !powerShell: command: '.\NGEN.ps1' diff --git a/src/playbook/Configuration/tweaks/scripts/script-pfp.yml b/src/playbook/Configuration/tweaks/scripts/script-pfp.yml index 1d4e317eab..4c4dba8eb6 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-pfp.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-pfp.yml @@ -1,7 +1,6 @@ --- title: Set Profile Pictures description: Sets the default Atlas profile pictures -privilege: TrustedInstaller actions: - !powerShell: command: '.\PFP.ps1' diff --git a/src/playbook/Configuration/tweaks/scripts/script-power.yml b/src/playbook/Configuration/tweaks/scripts/script-power.yml index cd1d6d4c64..d1293e9896 100644 --- a/src/playbook/Configuration/tweaks/scripts/script-power.yml +++ b/src/playbook/Configuration/tweaks/scripts/script-power.yml @@ -1,20 +1,37 @@ --- title: Configure Power Settings description: Executes script to configure power settings for the best performance, especially focusing on the lowest latency e.g. by reducing any potential jitter -privilege: TrustedInstaller actions: - # Disable Power Saving features + # Disable power saving features - !cmd: - command: '"AtlasDesktop\3. Configuration\Power\Power Saving\Disable Power Saving.cmd" /silent' + command: '"AtlasDesktop\3. General Configuration\Power\Power-saving\Disable Power-saving.cmd" -Silent' exeDir: true wait: true weight: 20 option: 'disable-power-saving' - # Disable Hibernation & Fast Startup + # Disable Fast Startup + - !registryValue: + path: 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power' + value: 'HiberbootEnabled' + data: '0' + type: REG_DWORD + + # Disable Hibernation # Disabling makes NTFS accessible outside of Windows - !cmd: - command: '"AtlasDesktop\3. Configuration\Power\Hibernation\Disable Hibernation (default).cmd" /silent' + command: '"AtlasDesktop\3. General Configuration\Power\Hibernation\Disable Hibernation (default).cmd" /silent' exeDir: true wait: true weight: 20 + option: 'disable-hibernation' + + # Set 'Balanced' power scheme if keeping power saving + - !run: {exe: 'powercfg.exe', args: '/setactive "381b4222-f694-41f0-9685-ff5bb260df2e"', option: '!disable-power-saving'} + + # Delete scheme only used for installation + - !powerShell: + command: >- + $gPath = """$([Environment]::GetFolderPath('Windows'))\atlasospowercfgguid"""; + powercfg /delete """$((Get-Content $gPath -Raw).Trim())"""; + Remove-Item $gPath -Force; diff --git a/src/playbook/Configuration/tweaks/security/block-anonymous-enum-sam.yml b/src/playbook/Configuration/tweaks/security/block-anonymous-enum-sam.yml index 1edf295105..e7ea07e448 100644 --- a/src/playbook/Configuration/tweaks/security/block-anonymous-enum-sam.yml +++ b/src/playbook/Configuration/tweaks/security/block-anonymous-enum-sam.yml @@ -1,7 +1,6 @@ --- title: Blocks Anonymous Enumeration of SAM Accounts description: Blocks the anonymous enumeration of SAM accounts to prevent the ability to list the potential points of attack to the system -privilege: TrustedInstaller actions: # https://www.stigviewer.com/stig/microsoft_windows_10/2022-04-08/finding/V-220929 - !registryValue: diff --git a/src/playbook/Configuration/tweaks/security/delete-defaultuser0.yml b/src/playbook/Configuration/tweaks/security/delete-defaultuser0.yml index ec06c4ec18..da546d7d86 100644 --- a/src/playbook/Configuration/tweaks/security/delete-defaultuser0.yml +++ b/src/playbook/Configuration/tweaks/security/delete-defaultuser0.yml @@ -1,6 +1,5 @@ --- title: Delete 'defaultuser0' Account Used During OOBE description: Deletes the hidden 'defaultuser0' account used during OOBE (Out of Box Experience) -privilege: TrustedInstaller actions: - - !run: {exe: 'net', args: 'user defaultuser0 /delete', ignoreErrors: true} + - !cmd: {command: 'net user defaultuser0 /delete & exit 0'} diff --git a/src/playbook/Configuration/tweaks/security/disable-remote-assistance.yml b/src/playbook/Configuration/tweaks/security/disable-remote-assistance.yml index 6f50a8b815..e45854ba94 100644 --- a/src/playbook/Configuration/tweaks/security/disable-remote-assistance.yml +++ b/src/playbook/Configuration/tweaks/security/disable-remote-assistance.yml @@ -1,7 +1,6 @@ --- title: Disable Remote Assistance description: As Remote Assistance is an unused and a potential vulnerable feature, it is disabled -privilege: TrustedInstaller actions: - !registryValue: path: 'HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance' diff --git a/src/playbook/Configuration/tweaks/statuses/status-cleanup.yml b/src/playbook/Configuration/tweaks/statuses/status-cleanup.yml index 20a71df40d..a592b98cb8 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-cleanup.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-cleanup.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for cleaner script description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Cleaning up'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-debloat.yml b/src/playbook/Configuration/tweaks/statuses/status-debloat.yml index 5fe69e6c32..00094f37da 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-debloat.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-debloat.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Debloating Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running debloating tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-misc.yml b/src/playbook/Configuration/tweaks/statuses/status-misc.yml index ff28522b35..faeaf6182b 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-misc.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-misc.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Miscellaneous Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running miscellaneous tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-networking.yml b/src/playbook/Configuration/tweaks/statuses/status-networking.yml index a0ae0c8a83..9235f13279 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-networking.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-networking.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Networking Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running networking tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-ngen.yml b/src/playbook/Configuration/tweaks/statuses/status-ngen.yml deleted file mode 100644 index 80a1a125a8..0000000000 --- a/src/playbook/Configuration/tweaks/statuses/status-ngen.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Status in AME Wizard for Running .NET Optimization -description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller -actions: - - !writeStatus: {status: 'Optimizing PowerShell'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-performance.yml b/src/playbook/Configuration/tweaks/statuses/status-performance.yml index 6be1569a13..86368cce72 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-performance.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-performance.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Performance Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running performance tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-privacy.yml b/src/playbook/Configuration/tweaks/statuses/status-privacy.yml index b30945ad1e..83b213f446 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-privacy.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-privacy.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Privacy Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running privacy tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-qol.yml b/src/playbook/Configuration/tweaks/statuses/status-qol.yml index 92f0c9eb56..9255a26657 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-qol.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-qol.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the QoL Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running QoL tweaks'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-scripts.yml b/src/playbook/Configuration/tweaks/statuses/status-scripts.yml index e4ae46352e..d648917fe6 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-scripts.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-scripts.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Scripts Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running scripts'} diff --git a/src/playbook/Configuration/tweaks/statuses/status-security.yml b/src/playbook/Configuration/tweaks/statuses/status-security.yml index 758e6a99fc..467b0d66f0 100644 --- a/src/playbook/Configuration/tweaks/statuses/status-security.yml +++ b/src/playbook/Configuration/tweaks/statuses/status-security.yml @@ -1,6 +1,5 @@ --- title: Status in AME Wizard for the Security Category description: Displays a status in AME Wizard for a specified category -privilege: TrustedInstaller actions: - !writeStatus: {status: 'Running security tweaks'} diff --git a/src/playbook/Executables/AtlasDesktop/1. Software/Install Software.cmd b/src/playbook/Executables/AtlasDesktop/1. Software/Install Software.cmd index 80bc176313..3527caeadc 100644 --- a/src/playbook/Executables/AtlasDesktop/1. Software/Install Software.cmd +++ b/src/playbook/Executables/AtlasDesktop/1. Software/Install Software.cmd @@ -2,7 +2,8 @@ set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\InstallSoftware.ps1" if not exist "%script%" ( echo Script not found. - echo %script% + echo "%script%" + pause exit /b 1 ) -powershell -EP Bypass -NoP Unblock-File -Path """$env:script""" -EA 0; ^& """$env:script""" %* \ No newline at end of file +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/1. Software/Remove Edge.cmd b/src/playbook/Executables/AtlasDesktop/1. Software/Install or Remove Edge.cmd similarity index 57% rename from src/playbook/Executables/AtlasDesktop/1. Software/Remove Edge.cmd rename to src/playbook/Executables/AtlasDesktop/1. Software/Install or Remove Edge.cmd index c2c64f1e80..76191a2a45 100644 --- a/src/playbook/Executables/AtlasDesktop/1. Software/Remove Edge.cmd +++ b/src/playbook/Executables/AtlasDesktop/1. Software/Install or Remove Edge.cmd @@ -2,7 +2,8 @@ set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\RemoveEdge.ps1" if not exist "%script%" ( echo Script not found. - echo %script% + echo "%script%" + pause exit /b 1 ) -powershell -EP Bypass -NoP Unblock-File -Path """$env:script""" -EA 0; ^& """$env:script""" %* \ No newline at end of file +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/1. Software/How To Install Software.url b/src/playbook/Executables/AtlasDesktop/1. Software/Software Documentation.url similarity index 85% rename from src/playbook/Executables/AtlasDesktop/1. Software/How To Install Software.url rename to src/playbook/Executables/AtlasDesktop/1. Software/Software Documentation.url index 7bb3d3ed1e..35302b48cf 100644 --- a/src/playbook/Executables/AtlasDesktop/1. Software/How To Install Software.url +++ b/src/playbook/Executables/AtlasDesktop/1. Software/Software Documentation.url @@ -2,4 +2,4 @@ Prop3=19,11 [InternetShortcut] IDList= -URL=https://docs.atlasos.net/getting-started/post-installation/software/ +URL=https://docs.atlasos.net/getting-started/post-installation/software/getting-started/ diff --git a/src/playbook/Executables/AtlasDesktop/2. Drivers/Driver Instructions.url b/src/playbook/Executables/AtlasDesktop/2. Drivers/Driver Documentation (Recommended).url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/2. Drivers/Driver Instructions.url rename to src/playbook/Executables/AtlasDesktop/2. Drivers/Driver Documentation (Recommended).url diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Driver Updates/Disable Automatic Driver Updates.reg b/src/playbook/Executables/AtlasDesktop/2. Drivers/Drivers from Windows Update/Disable Drivers from Windows Update.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Driver Updates/Disable Automatic Driver Updates.reg rename to src/playbook/Executables/AtlasDesktop/2. Drivers/Drivers from Windows Update/Disable Drivers from Windows Update.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Driver Updates/Enable Automatic Driver Updates.reg b/src/playbook/Executables/AtlasDesktop/2. Drivers/Drivers from Windows Update/Enable Drivers from Windows Update.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Driver Updates/Enable Automatic Driver Updates.reg rename to src/playbook/Executables/AtlasDesktop/2. Drivers/Drivers from Windows Update/Enable Drivers from Windows Update.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Disable Troubleshooting (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Disable Troubleshooting (default).cmd deleted file mode 100644 index 2e1cc0a5d9..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Disable Troubleshooting (default).cmd +++ /dev/null @@ -1,20 +0,0 @@ -@echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -for %%a in ( - "WdiServiceHost" - "WdiSystemHost" -) do ( - call setSvc.cmd %%~a 4 -) - -choice /c:yn /n /m "Would you like to disable Diagnostic Policy Service (DPS)? Note: It breaks Data Usage page in Settings [Y/N] " -if %ERRORLEVEL% == 1 call setSvc.cmd DPS 4 - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Enable Troubleshooting.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Enable Troubleshooting.cmd deleted file mode 100644 index 306bf7f6a9..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Diagnostics and Troubleshooting/Enable Troubleshooting.cmd +++ /dev/null @@ -1,14 +0,0 @@ -@echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call setSvc.cmd DPS 2 -call setSvc.cmd WdiServiceHost 3 -call setSvc.cmd WdiSystemHost 3 - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Disable FSO & Game Bar Support.reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Disable FSO & Game Bar Support.reg deleted file mode 100644 index 94f87b1d82..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Disable FSO & Game Bar Support.reg +++ /dev/null @@ -1,44 +0,0 @@ -Windows Registry Editor Version 5.00 - -; Configure Fullscreen Exclusive (FSE) - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_DSEBehavior"=dword:00000002 -"GameDVR_DXGIHonorFSEWindowsCompatible"=dword:00000001 -"GameDVR_EFSEFeatureFlags"=dword:00000000 -"GameDVR_FSEBehavior"=dword:00000002 -"GameDVR_FSEBehaviorMode"=dword:00000002 -"GameDVR_HonorUserFSEBehaviorMode"=dword:00000001 - -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] -"__COMPAT_LAYER"="~ DISABLEDXMAXIMIZEDWINDOWEDMODE" - -; Disable Game Bar - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_Enabled"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR] -"AppCaptureEnabled"=dword:00000000 - -; Disable Game Bar tips -; Disable 'Open Xbox Game Bar using this button on a controller' - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"GamePanelStartupTipIndex"=dword:00000003 -"ShowStartupPanel"=dword:00000000 -"UseNexusForGameBarEnabled"=dword:00000000 - -; Disable Game Bar Presence Writer - -[HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter] -"ActivationType"=dword:00000000 - -; Disable Windows Game Recording and Broadcasting -; It automatically disables Game Bar - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] -"AllowGameDVR"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR] -"value"=dword:00000000 diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Disable Game Bar Support (default).reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Disable Game Bar Support (default).reg deleted file mode 100644 index 178a00a9b8..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Disable Game Bar Support (default).reg +++ /dev/null @@ -1,47 +0,0 @@ -Windows Registry Editor Version 5.00 - -; Configure Fullscreen Optimizations (FSO) -; Windows default - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_DSEBehavior"=- -"GameDVR_DXGIHonorFSEWindowsCompatible"=dword:00000000 -"GameDVR_EFSEFeatureFlags"=dword:00000000 -"GameDVR_FSEBehavior"=- -"GameDVR_FSEBehaviorMode"=dword:00000002 -"GameDVR_HonorUserFSEBehaviorMode"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] -"__COMPAT_LAYER"=- - -; Disable Game Bar - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_Enabled"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR] -"AppCaptureEnabled"=dword:00000000 - -; Disable Game Bar tips -; Disable 'Open Xbox Game Bar using this button on a controller' - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"ShowStartupPanel"=dword:00000000 -"UseNexusForGameBarEnabled"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"GamePanelStartupTipIndex"=dword:00000003 - -; Disable Game Bar Presence Writer - -[HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter] -"ActivationType"=dword:00000000 - -; Disable Windows Game Recording and Broadcasting -; It automatically disables Game Bar - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] -"AllowGameDVR"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR] -"value"=dword:00000000 diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Game Bar Support.reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Game Bar Support.reg deleted file mode 100644 index f8aea59beb..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Enable FSO & Game Bar Support.reg +++ /dev/null @@ -1,43 +0,0 @@ -Windows Registry Editor Version 5.00 - -; Configure Fullscreen Optimizations (FSO) -; Windows default - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_DSEBehavior"=- -"GameDVR_DXGIHonorFSEWindowsCompatible"=dword:00000000 -"GameDVR_EFSEFeatureFlags"=dword:00000000 -"GameDVR_FSEBehavior"=- -"GameDVR_FSEBehaviorMode"=dword:00000002 -"GameDVR_HonorUserFSEBehaviorMode"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] -"__COMPAT_LAYER"=- - -; Enable Game Bar - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_Enabled"=dword:00000001 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR] -"AppCaptureEnabled"=- - -; Enable Game Bar tips -; Enable 'Open Xbox Game Bar using this button on a controller' - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"GamePanelStartupTipIndex"=- -"ShowStartupPanel"=- -"UseNexusForGameBarEnabled"=- - -; Enable Game Bar Presence Writer - -[HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter] -"ActivationType"=dword:00000001 - -; Enable Windows Game Recording and Broadcasting (DVR) - -[-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR] -"value"=dword:00000001 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Disable Game Mode (Default).reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Disable Game Mode (Default).reg deleted file mode 100644 index 109da0439b..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Disable Game Mode (Default).reg +++ /dev/null @@ -1,5 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"AllowAutoGameMode"=dword:00000000 -"AutoGameModeEnabled"=dword:00000000 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Enable Game Mode.reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Enable Game Mode.reg deleted file mode 100644 index b6222551ee..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Game Mode/Enable Game Mode.reg +++ /dev/null @@ -1,5 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar] -"AllowAutoGameMode"=- -"AutoGameModeEnabled"=- \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Disable HAGS.reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Disable HAGS.reg deleted file mode 100644 index 4810133f1c..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Disable HAGS.reg +++ /dev/null @@ -1,4 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers] -"HwSchMode"=dword:00000001 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Enable HAGS (default).reg b/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Enable HAGS (default).reg deleted file mode 100644 index 04b6f0b305..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/HAGS/Enable HAGS (default).reg +++ /dev/null @@ -1,4 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers] -"HwSchMode"=dword:00000002 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications (default).cmd deleted file mode 100644 index 0ebfed548a..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Disable Notifications (default).cmd +++ /dev/null @@ -1,27 +0,0 @@ -@echo off - -if "%~1" == "/silent" goto main - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -:main -call %windir%\AtlasModules\Scripts\setSvc.cmd WpnService 4 -sc stop WpnService > nul 2>&1 -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Deny" /f > nul -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "0" /f > nul -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /t REG_DWORD /d "1" /f > nul - -:: Only disable action center on 10, as on Windows 11 as it disables the calendar -for /f "tokens=6 delims=[.] " %%a in ('ver') do ( - if %%a LSS 22000 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d "1" /f > nul -) - -if "%~1" == "/silent" exit - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications.cmd deleted file mode 100644 index fd879e6897..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Notifications/Enable Notifications.cmd +++ /dev/null @@ -1,18 +0,0 @@ -@echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call setSvc.cmd WpnService 2 -sc start WpnService > nul 2>&1 -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Allow" /f > nul -reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "1" /f > nul -reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /f > nul 2>&1 -reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > nul 2>&1 - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd deleted file mode 100644 index 0b2c0b13eb..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Disable Power Saving.cmd +++ /dev/null @@ -1,113 +0,0 @@ -@echo off - -if "%~1" == "/silent" goto main - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call %windir%\AtlasModules\Scripts\RunAsTI.cmd "%~f0" %* - exit /b -) - -:: Detect if user uses laptop device or personal computer -for /f "delims=:{}" %%a in ('wmic path Win32_SystemEnclosure get ChassisTypes ^| findstr [0-9]') do set "CHASSIS=%%a" -set "DEVICE_TYPE=PC" -for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "%CHASSIS%" == "%%a" (set "DEVICE_TYPE=LAPTOP") - -if "%DEVICE_TYPE%" == "LAPTOP" ( - echo WARNING: You are on a laptop, disabling power saving features will cause faster battery drainage and increased heat output. - echo If you use your laptop on battery, certain power saving features will enable, but not all. - echo It's NOT recommended to disable power saving on laptops in general. - echo] - timeout /t 2 /nobreak > nul - echo Press any key to continue anyways... - pause > nul -) else ( - echo This script will disable many power saving features in Windows for reduced latency and increased performance. - echo Ensure that you have adequate cooling. - echo] - pause -) - -cls - -:main -:: Duplicate Ultimate Performance power scheme, customize it and make it the Atlas power scheme -powercfg /l | find "Power Scheme GUID: 11111111-1111-1111-1111-111111111111 (Atlas Power Scheme)" > nul || ( - powercfg /duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 11111111-1111-1111-1111-111111111111 > nul -) -powercfg /setactive 11111111-1111-1111-1111-111111111111 - -:: Set current power scheme to Atlas -powercfg /changename scheme_current "Atlas Power Scheme" "Power scheme optimized for optimal latency and performance." -:: Secondary NVMe Idle Timeout - 0 miliseconds -powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 d3d55efd-c1ff-424e-9dc3-441be7833010 0 -:: Primary NVMe Idle Timeout - 0 miliseconds -powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 d639518a-e56d-4345-8af2-b9f32fb26109 0 -:: NVME NOPPME - Off -powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 fc7372b6-ab2d-43ee-8797-15e9841f2cca 0 -:: Slide show - Paused -powercfg /setacvalueindex scheme_current 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 1 -:: Hub Selective Suspend Timeout - 0 miliseconds -powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 0853a681-27c8-4100-a2fd-82013e970683 0 -:: USB selective suspend - Disabled -powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0 -:: USB 3 Link Power Mangement - Off -powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 0 -:: Allow Throttle States - Off -powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb 0 -:: Dim display after - 0 seconds -powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 17aaa29b-8b43-4b94-aafe-35f64daaf1ee 0 -:: Turn off display after - 0 seconds -powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0 -:: Processor performance time check interval - 200 miliseconds -:: Reduces DPCs, can be set all the way to 5000ms for statically clocked systems -powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 200 - -:: Set the active scheme as the current scheme -powercfg /setactive scheme_current - -:: Disable Advanced Configuration and Power Interface (ACPI) devices -call %windir%\AtlasModules\Scripts\toggleDev.cmd @("ACPI Processor Aggregator", "Microsoft Windows Management Interface for ACPI") > nul - -:: Disable driver/device power saving -PowerShell -NoP -C "$usb_devices = @('Win32_USBController', 'Win32_USBControllerDevice', 'Win32_USBHub'); $power_device_enable = Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi; foreach ($power_device in $power_device_enable){$instance_name = $power_device.InstanceName.ToUpper(); foreach ($device in $usb_devices){foreach ($hub in Get-WmiObject $device){$pnp_id = $hub.PNPDeviceID; if ($instance_name -like \"*$pnp_id*\"){$power_device.enable = $False; $power_device.psbase.put()}}}}" > nul -for %%a in ( - "AllowIdleIrpInD3" - "D3ColdSupported" - "DeviceSelectiveSuspended" - "EnableIdlePowerManagement" - "EnableSelectiveSuspend" - "EnhancedPowerManagementEnabled" - "IdleInWorkingState" - "SelectiveSuspendEnabled" - "SelectiveSuspendOn" - "WaitWakeEnabled" - "WakeEnabled" - "WdfDirectedPowerTransitionEnable" -) do ( - for /f "delims=" %%b in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum" /s /f "%%~a" ^| findstr "HKEY"') do ( - reg add "%%b" /v "%%~a" /t REG_DWORD /d "0" /f > nul - ) -) - -:: Disable D3 support on SATA/NVMEs while using Modern Standby -:: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro#d3-support -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Storage" /v "StorageD3InModernStandby" /t REG_DWORD /d "0" /f > nul - -:: Disable IdlePowerMode for stornvme.sys (storage devices) - the device will never enter a low-power state -reg add "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "IdlePowerMode" /t REG_DWORD /d "0" /f > nul - -:: Disable power throttling -:: https://blogs.windows.com/windows-insider/2017/04/18/introducing-power-throttling -reg add "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" /v "PowerThrottlingOff" /t REG_DWORD /d "1" /f > nul - -:: Disable the kernel from being tickless -:: It's power saving -:: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#additional-settings -bcdedit /set disabledynamictick yes > nul - -if "%~1" == "/silent" exit - -echo Completed. -echo Press any key to exit... -pause > nul -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd deleted file mode 100644 index 905bebaff0..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Power Saving/Enable Power Saving.cmd +++ /dev/null @@ -1,54 +0,0 @@ -@echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -:: Restore default power schemes -:: This should set the power plan to 'Balanced' by default -powercfg /restoredefaultschemes - -:: Enable Advanced Configuration and Power Interface (ACPI) devices -call toggleDev.cmd -Enable @("ACPI Processor Aggregator", "Microsoft Windows Management Interface for ACPI") > nul - -:: Disable driver/device power saving -PowerShell -NoP -C "$usb_devices = @('Win32_USBController', 'Win32_USBControllerDevice', 'Win32_USBHub'); $power_device_enable = Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi; foreach ($power_device in $power_device_enable){$instance_name = $power_device.InstanceName.ToUpper(); foreach ($device in $usb_devices){foreach ($hub in Get-WmiObject $device){$pnp_id = $hub.PNPDeviceID; if ($instance_name -like \"*$pnp_id*\"){$power_device.enable = $True; $power_device.psbase.put()}}}}" > nul -for %%a in ( - "AllowIdleIrpInD3" - "D3ColdSupported" - "DeviceSelectiveSuspended" - "EnableIdlePowerManagement" - "EnableSelectiveSuspend" - "EnhancedPowerManagementEnabled" - "IdleInWorkingState" - "SelectiveSuspendEnabled" - "SelectiveSuspendOn" - "WaitWakeEnabled" - "WakeEnabled" - "WdfDirectedPowerTransitionEnable" -) do ( - for /f "delims=" %%b in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum" /s /f "%%~a" ^| findstr "HKEY"') do ( - reg delete "%%b" /v "%%~a" /f > nul 2>&1 - ) -) - -:: Disable D3 support on SATA/NVMEs while using Modern Standby -:: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro#d3-support -reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Storage" /v "StorageD3InModernStandby" /f > nul 2>&1 - -:: Disable IdlePowerMode for stornvme.sys (storage devices) - the device will never enter a low-power state -reg delete "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "IdlePowerMode" /f > nul 2>&1 - -:: Reset power throttling to default -:: https://blogs.windows.com/windows-insider/2017/04/18/introducing-power-throttling -reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" /v "PowerThrottlingOff" /f > nul 2>&1 - -:: Enable the kernel being tickless -:: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#additional-settings -bcdedit /deletevalue disabledynamictick > nul 2>&1 - -echo Completed. -echo Press any key to exit... -pause > nul -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd deleted file mode 100644 index e7b5051543..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Disable Search Indexing (default).cmd +++ /dev/null @@ -1,25 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call setSvc.cmd WSearch 4 -sc stop WSearch > nul 2>&1 - -:: Hide Settings page -set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 -if %ERRORLEVEL% == 0 ( - for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "%%a;cortana-windowssearch;" /f > nul - ) -) else ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "hide:cortana-windowssearch;" /f > nul -) - -echo Finished. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd deleted file mode 100644 index e90cf7d570..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Search Indexing/Enable Search Indexing.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call setSvc.cmd WSearch 2 - -:: Hide Settings pages -set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 -if %ERRORLEVEL% == 0 call :enableSettingsPage - -echo Finished, please reboot your device for changes to apply. -pause -exit /b - -:enableSettingsPage -for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do (set "currentPages=%%a") -reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "!currentPages:cortana-windowssearch;=!" /f > nul -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd deleted file mode 100644 index 22eccc5b99..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Disable VPN support.cmd +++ /dev/null @@ -1,38 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call toggleDev.cmd -Silent @("NDIS Virtual Network Adapter Enumerator", "Microsoft RRAS Root Enumerator", "WAN Miniport*") - -for %%a in ( - "Eaphost" - "IKEEXT" - "iphlpsvc" - "NdisVirtualBus" - "RasMan" - "SstpSvc" - "WinHttpAutoProxySvc" -) do ( - call setSvc.cmd %%~a 4 -) - -:: Hide Settings page -if not "%~1" == "/silent" ( - set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" - reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 - if %ERRORLEVEL% == 0 ( - for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "%%a;network-vpn;" /f > nul - ) - ) else ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "hide:network-vpn;" /f > nul - ) -) - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd b/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd deleted file mode 100644 index 209eaad8ab..0000000000 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/VPN/Enable VPN support (default).cmd +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -call toggleDev.cmd -Silent -Enable @("NDIS Virtual Network Adapter Enumerator", "Microsoft RRAS Root Enumerator", "WAN Miniport*") - -call setSvc.cmd BFE 2 -call setSvc.cmd Eaphost 3 -call setSvc.cmd IKEEXT 3 -call setSvc.cmd iphlpsvc 3 -call setSvc.cmd NdisVirtualBus 3 -call setSvc.cmd RasMan 2 -call setSvc.cmd SstpSvc 3 -call setSvc.cmd WinHttpAutoProxySvc 3 - -:: Hide Settings pages -set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 -if %ERRORLEVEL% == 0 call :enableSettingsPage - -echo Finished, please reboot your device for changes to apply. -pause -exit /b - -:enableSettingsPage -for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do (set "currentPages=%%a") -reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "!currentPages:network-vpn;=!" /f > nul -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Background Apps/Disable Background Apps (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Background Apps/Disable Background Apps (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Background Apps/Disable Background Apps (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Background Apps/Disable Background Apps (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Background Apps/Enable Background Apps.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Background Apps/Enable Background Apps.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Background Apps/Enable Background Apps.reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Background Apps/Enable Background Apps.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Disable Bluetooth.cmd similarity index 64% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Disable Bluetooth.cmd index 7a1fcfa6fc..4f85b1e3be 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Disable Bluetooth.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Disable Bluetooth.cmd @@ -3,7 +3,7 @@ if "%~1" == "/silent" goto main whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call %windir%\AtlasModules\Scripts\RunAsTI.cmd "%~f0" %* + call "%windir%\AtlasModules\Scripts\RunAsTI.cmd" "%~f0" %* exit /b ) @@ -26,16 +26,17 @@ for %%a in ( "Microsoft_Bluetooth_AvrcpTransport" "RFCOMM" ) do ( - call %windir%\AtlasModules\Scripts\setSvc.cmd %%~a 4 + call "%windir%\AtlasModules\Scripts\setSvc.cmd" %%~a 4 ) :: Seems to not exist sometimes -call %windir%\AtlasModules\Scripts\setSvc.cmd BthPan 4 > nul 2>&1 +call "%windir%\AtlasModules\Scripts\setSvc.cmd" BthPan 4 > nul 2>&1 :: Disable Bluetooth devices -call %windir%\AtlasModules\Scripts\toggleDev.cmd -Silent '*Bluetooth*' +call "%windir%\AtlasModules\Scripts\toggleDev.cmd" -Silent '*Bluetooth*' -attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +:: Disable in Send To context menu +call "%windir%\AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Disable @('Bluetooth') :: https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-connectivity reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Connectivity\AllowBluetooth" /v "value" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Enable Bluetooth.cmd similarity index 76% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Enable Bluetooth.cmd index ce92374cfa..7d5f48df8f 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Bluetooth/Enable Bluetooth.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Bluetooth/Enable Bluetooth.cmd @@ -36,8 +36,8 @@ call toggleDev.cmd -Silent -Enable '*Bluetooth*' reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Connectivity\AllowBluetooth" /v "value" /t REG_DWORD /d "2" /f > nul choice /c:yn /n /m "Would you like to enable the 'Bluetooth File Transfer' Send To context menu entry? [Y/N] " -if %ERRORLEVEL% == 1 attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" -if %ERRORLEVEL% == 2 attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +if %ERRORLEVEL% == 1 call "%windir%\AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Enable @('Bluetooth') +if %ERRORLEVEL% == 2 call "%windir%\AtlasDesktop\4. Interface Tweaks\Context Menus\Send To\Debloat Send To Context Menu.cmd" -Disable @('Bluetooth') echo Finished, please reboot your device for changes to apply. pause diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Disable FSO and Game Bar Support.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Disable FSO and Game Bar Support.cmd new file mode 100644 index 0000000000..a41ab208c3 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Disable FSO and Game Bar Support.cmd @@ -0,0 +1,36 @@ +@echo off + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +( + reg add "HKCU\System\GameConfigStore" /v "GameDVR_DSEBehavior" /t REG_DWORD /d "2" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_DXGIHonorFSEWindowsCompatible" /t REG_DWORD /d "1" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_EFSEFeatureFlags" /t REG_DWORD /d "0" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehavior" /t REG_DWORD /d "2" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehaviorMode" /t REG_DWORD /d "2" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_HonorUserFSEBehaviorMode" /t REG_DWORD /d "1" /f + + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "__COMPAT_LAYER" /t REG_SZ /d "~ DISABLEDXMAXIMIZEDWINDOWEDMODE" /f + + reg add "HKCU\System\GameBar" /v "GamePanelStartupTipIndex" /t REG_DWORD /d "3" /f + reg add "HKCU\System\GameBar" /v "ShowStartupPanel" /t REG_DWORD /d "0" /f + reg add "HKCU\System\GameBar" /v "UseNexusForGameBarEnabled" /t REG_DWORD /d "0" /f + + reg add "HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" /v "ActivationType" /t REG_DWORD /d "0" /f + + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d "0" /f + + reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" /v "value" /t REG_DWORD /d "0" /f + + reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f + + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d "0" /f +) > nul + +echo Finished, FSO and Game Bar are now disabled. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Enable FSO and Game Bar Support (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Enable FSO and Game Bar Support (default).cmd new file mode 100644 index 0000000000..5136b506a6 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/FSO and Game Bar/Enable FSO and Game Bar Support (default).cmd @@ -0,0 +1,36 @@ +@echo off + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +( + reg delete "HKCU\System\GameConfigStore" /v "GameDVR_DSEBehavior" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_DXGIHonorFSEWindowsCompatible" /t REG_DWORD /d "0" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_EFSEFeatureFlags" /t REG_DWORD /d "0" /f + reg delete "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehavior" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehaviorMode" /t REG_DWORD /d "2" /f + reg add "HKCU\System\GameConfigStore" /v "GameDVR_HonorUserFSEBehaviorMode" /t REG_DWORD /d "0" /f + + reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "__COMPAT_LAYER" /f + + reg delete "HKCU\System\GameBar" /v "GamePanelStartupTipIndex" /f + reg delete "HKCU\System\GameBar" /v "ShowStartupPanel" /f + reg delete "HKCU\System\GameBar" /v "UseNexusForGameBarEnabled" /f + + reg add "HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" /v "ActivationType" /t REG_DWORD /d "1" /f + + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /f + + reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" /v "value" /t REG_DWORD /d "1" /f + + reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "1" /f + + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" "AppCaptureEnabled" /f +) > nul 2>&1 + +echo Finished, FSO is now enabled and you should be able to use Game Bar. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/General Configuration Documentation.url b/src/playbook/Executables/AtlasDesktop/3. General Configuration/General Configuration Documentation.url new file mode 100644 index 0000000000..2454fa8100 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/General Configuration Documentation.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/post-installation/atlas-folder/general-configuration/ diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows Copilot/Disable Windows Copilot (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Microsoft Copilot/Disable Microsoft Copilot (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows Copilot/Disable Windows Copilot (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Microsoft Copilot/Disable Microsoft Copilot (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Microsoft Copilot/Enable Microsoft Copilot.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Microsoft Copilot/Enable Microsoft Copilot.cmd new file mode 100644 index 0000000000..f40ccc594c --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Microsoft Copilot/Enable Microsoft Copilot.cmd @@ -0,0 +1,34 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo Please note that some regions or devices may not have Copilot avaliable. +echo This means that the script can seem to 'not work', but it would do if it was avaliable. +pause + +cls +echo] +call "%windir%\AtlasModules\Scripts\edgeCheck.cmd" /edgeonly +if %errorlevel% neq 0 exit /b 1 +echo] + +echo Enabling Copilot... +taskkill /f /im explorer.exe > nul 2>&1 +reg delete "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v "TurnOffWindowsCopilot" /f > nul 2>&1 +reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowCopilotButton" /t REG_DWORD /d "1" /f > nul +start explorer.exe + +echo] +echo Finished, changes are applied. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Disable Mobile Device Settings (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Disable Mobile Device Settings (default).cmd new file mode 100644 index 0000000000..9c024ff020 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Disable Mobile Device Settings (default).cmd @@ -0,0 +1,26 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoConnectedUser" /t REG_DWORD /d "1" /f > nul +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide mobile-devices + +choice /c:yn /n /m "Would you like to remove the 'Phone Link' app? [Y/N] " +if %errorlevel% == 1 powershell -NoP -NonI "Get-AppxPackage -AllUsers Microsoft.YourPhone* | Remove-AppxPackage -AllUsers" + +choice /c:yn /n /m "Would you like to disable Store auto-updates? [Y/N] " +if %errorlevel% == 1 reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d "2" /f > nul +if %errorlevel% == 2 reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d "4" /f > nul + +echo Finished. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Enable Mobile Device Settings.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Enable Mobile Device Settings.cmd new file mode 100644 index 0000000000..8036d29f8a --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Mobile Devices (Phone Link)/Enable Mobile Device Settings.cmd @@ -0,0 +1,24 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoConnectedUser" /f > nul 2>&1 +reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /f > nul 2>&1 +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d "4" /f > nul +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide mobile-devices + +taskkill /f /im SystemSettings.exe > nul 2>&1 +start ms-settings:mobile-devices + +echo Finished, you can now use the mobile device settings to sync your phone. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Disable Network Discovery Services.cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Disable Network Discovery Services.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Disable Network Discovery Services.cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Enable Network Discovery Services (default).cmd similarity index 82% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Enable Network Discovery Services (default).cmd index c0c2f0cfbe..94a40c2afe 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Enable Network Discovery Services (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Enable Network Discovery Services (default).cmd @@ -9,7 +9,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( :main :: Enable Lanman Workstation (SMB) as a dependency -call "%windir%\AtlasDesktop\3. Configuration\Lanman Workstation (SMB)\Enable Lanman Workstation (default).cmd" /silent +call "%windir%\AtlasDesktop\6. Advanced Configuration\Lanman Workstation (SMB)\Enable Lanman Workstation (default).cmd" /silent :: Enable EventLog as a dependency call setSvc.cmd eventlog 2 @@ -24,6 +24,7 @@ call setSvc.cmd SSDPSRV 3 if "%~1" == "/silent" exit /b +echo] echo Finished, please reboot your device for changes to apply. pause exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd new file mode 100644 index 0000000000..14bcc0f78f --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd @@ -0,0 +1,22 @@ +@echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\DisableFileSharing.ps1" + +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd new file mode 100644 index 0000000000..9b2592ca23 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd @@ -0,0 +1,22 @@ +@echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\EnableFileSharing.ps1" + +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Network Navigation Pane/Disable Network Navigation Pane (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Network Navigation Pane/Disable Network Navigation Pane (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Network Navigation Pane/Disable Network Navigation Pane (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Network Navigation Pane/Disable Network Navigation Pane (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Network Navigation Pane/User Network Navigation Pane choice.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Network Navigation Pane/User Network Navigation Pane choice.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/Network Navigation Pane/User Network Navigation Pane choice.reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Network Discovery/Network Navigation Pane/User Network Navigation Pane choice.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Disable Notifications.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Disable Notifications.cmd new file mode 100644 index 0000000000..89d55cf50d --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Disable Notifications.cmd @@ -0,0 +1,61 @@ +@echo off + +if "%~1" == "/includeuserservice" goto main + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +:main +sc config WpnService start=disabled > nul +sc stop WpnService > nul 2>&1 + +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Deny" /f > nul +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "0" /f > nul +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "0" /f > nul +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /t REG_DWORD /d "1" /f > nul + +for %%a in ( + "notifications" + "privacy-notifications" +) do ( + call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide %%a /silent +) + +if "%~1"=="/includeuserservice" ( + call :userservice + call :disablecenter + exit /b +) else ( + for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a LSS 22000 call :disablecenter) +) + +taskkill /f /im explorer.exe > nul 2>&1 +taskkill /f /im SystemSettings.exe > nul 2>&1 +taskkill /f /im ShellExperienceHost.exe > nul 2>&1 +start explorer.exe + +echo Finished. +pause +exit /b + +:userservice +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d "1" /f > nul +call "%windir%\AtlasModules\Scripts\setSvc.cmd" "WpnUserService" 4 +for /f "tokens=5 delims=\" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services" ^| find "WpnUserService_"') do ( + call "%windir%\AtlasModules\Scripts\setSvc.cmd" "%%a" 4 + sc stop "%%a" > nul + sc delete "%%a" > nul +) +exit /b + +:disablecenter +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d "1" /f > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Enable Notifications.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Enable Notifications.cmd new file mode 100644 index 0000000000..c1f3194b3c --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Notifications/Enable Notifications.cmd @@ -0,0 +1,49 @@ +@echo off + +if "%~1" == "/justuserservice" goto main + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +:main +call "%windir%\AtlasModules\Scripts\setSvc.cmd" "WpnUserService" 2 +for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 call :enablecenter) +if "%~1" == "/justuserservice" exit /b + +sc config WpnService start=auto > nul + +call :enablecenter +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Allow" /f > nul +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "1" /f > nul +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "1" /f > nul +reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoCloudApplicationNotification" /f > nul 2>&1 + +for %%a in ( + "notifications" + "privacy-notifications" +) do ( + call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide "%%a" /silent +) + +if "%~1" == "/silent" exit /b + +taskkill /f /im explorer.exe > nul 2>&1 +taskkill /f /im SystemSettings.exe > nul 2>&1 +taskkill /f /im ShellExperienceHost.exe > nul 2>&1 +start explorer.exe + +echo Finished, please reboot your device for changes to apply. +pause +exit /b + +:enablecenter +reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > nul 2>&1 +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Context Menu/Add Idle toggle in context menu.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Desktop Context Menu/Add Idle Toggle in Desktop Context Menu.reg similarity index 68% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Context Menu/Add Idle toggle in context menu.reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Desktop Context Menu/Add Idle Toggle in Desktop Context Menu.reg index e6778578bb..ebd18b334c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Context Menu/Add Idle toggle in context menu.reg +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Desktop Context Menu/Add Idle Toggle in Desktop Context Menu.reg @@ -13,11 +13,11 @@ Windows Registry Editor Version 5.00 "Icon"="powercpl.dll" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\CpuIdle\Shell\Disable Idle\Command] -@="cmd /c powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 1 & powercfg /setactive scheme_current" +@="cmd /c \"\"%%windir%%\\AtlasDesktop\\3. General Configuration\\Power\\CPU Idle\\Disable Idle.cmd\"\" /silent" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\CpuIdle\Shell\Enable Idle] "Icon"="powercpl.dll" "MUIVerb"="Enable Idle" [HKEY_CLASSES_ROOT\DesktopBackground\Shell\CpuIdle\Shell\Enable Idle\Command] -@="cmd /c powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 0 & powercfg /setactive scheme_current" +@="cmd /c \"\"%%windir%%\\AtlasDesktop\\3. General Configuration\\Power\\CPU Idle\\Enable Idle (default).cmd\"\" /silent" diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Context Menu/Remove Idle toggle in context menu (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Desktop Context Menu/Remove Idle Toggle in Desktop Context Menu (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Context Menu/Remove Idle toggle in context menu (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Desktop Context Menu/Remove Idle Toggle in Desktop Context Menu (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd similarity index 69% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd index 01dc53be83..6d8f3681ad 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Disable Idle.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd @@ -5,16 +5,21 @@ for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set " for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfLogicalProcessors /value') do set "LOGICAL_CORES=%%a" if "%LOGICAL_CORES%" GTR "%PHYSICAL_CORES%" goto :hyperThreading -echo This forces your CPU to work at its maximum speed always, ensure you have good cooling. -echo] -echo Task Manager will display CPU usage as 100%% always, due to how Task Manager calculates CPU percentage. -echo It does not occur in other tools such as Process Explorer, System Informer or Process Hacker. -echo] -pause -cls +if "%~1" neq "/silent" ( + echo This forces your CPU to work at its maximum speed always, ensure you have good cooling. + echo] + echo Task Manager will display CPU usage as 100%% always, due to how Task Manager calculates CPU percentage. + echo It does not occur in other tools such as Process Explorer, System Informer or Process Hacker. + echo] + pause + cls +) + powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 1 powercfg /setactive scheme_current +if "%~1"=="/silent" exit /b + echo Finished, changes have been applied. pause exit /b @@ -22,12 +27,12 @@ exit /b :hyperThreading :: set ANSI escape characters cd /d "%~dp0" -for /f %%A in ('forfiles /m "%~nx0" /c "cmd /c echo 0x1B"') do set "ESC=%%A" +for /f %%a in ('forfiles /m "%~nx0" /c "cmd /c echo 0x1B"') do set "ESC=%%a" +chcp 65001 > nul title HT/SMT Detected - Atlas - mode con: cols=46 lines=13 -chcp 65001 > nul + echo] echo %ESC%[32m Hyper Threading/SMT Detected echo โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€%ESC%[0m @@ -37,8 +42,9 @@ echo overall CPU performance much worse. echo] echo It can be disabled by using BIOS. echo Instead of disabling idle, consider -echo disabling C-states. +echo disabling C-states in BIOS. echo] echo %ESC%[1m%ESC%[33mPress any key to exit... %ESC%[?25l + pause > nul exit /b 1 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Enable Idle (default).cmd similarity index 87% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Enable Idle (default).cmd index 8b600c0e02..e7ebf31222 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/CPU Idle/Enable Idle (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Enable Idle (default).cmd @@ -3,6 +3,8 @@ powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 0 powercfg /setactive scheme_current +if "%~1"=="/silent" exit /b + echo Finished, changes have been applied. pause exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Disable Hibernation (default).cmd similarity index 79% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Disable Hibernation (default).cmd index 9eadcf4973..57d7c5f971 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Disable Hibernation (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Disable Hibernation (default).cmd @@ -8,8 +8,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( ) :main -powercfg /hibernate off -powercfg /setactive scheme_current +powercfg /h off if "%~1" == "/silent" exit diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Enable Hibernation.cmd similarity index 71% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Enable Hibernation.cmd index 03622d7522..18c70d47e3 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Hibernation/Enable Hibernation.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Hibernation/Enable Hibernation.cmd @@ -7,9 +7,8 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -powercfg /hibernate on -powercfg /hibernate /type full -powercfg /setactive scheme_current +:main +powercfg /h on if "%~1" == "/silent" exit /b diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Default Power-saving.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Default Power-saving.cmd new file mode 100644 index 0000000000..7ebf1ac1a7 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Default Power-saving.cmd @@ -0,0 +1,22 @@ +@echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\DefaultPowerSaving.ps1" + +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Disable Power-saving.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Disable Power-saving.cmd new file mode 100644 index 0000000000..f018eff2f2 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Power-saving/Disable Power-saving.cmd @@ -0,0 +1,22 @@ +@echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\DisablePowerSaving.ps1" + +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Disable Sleep Study (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Disable Sleep Study (default).cmd new file mode 100644 index 0000000000..b4ac2f5d2a --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Disable Sleep Study (default).cmd @@ -0,0 +1,25 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +for %%a in ( + "Microsoft-Windows-SleepStudy/Diagnostic" + "Microsoft-Windows-Kernel-Processor-Power/Diagnostic" + "Microsoft-Windows-UserModePowerService/Diagnostic" +) do ( + wevtutil sl "%%~a" /q:false > nul +) +schtasks /change /tn "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /disable > nul + +echo Finished, changes have been applied. +pause +exit /b diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Enable Sleep Study.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Enable Sleep Study.cmd new file mode 100644 index 0000000000..63ee7350d6 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep Study/Enable Sleep Study.cmd @@ -0,0 +1,25 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +for %%a in ( + "Microsoft-Windows-SleepStudy/Diagnostic" + "Microsoft-Windows-Kernel-Processor-Power/Diagnostic" + "Microsoft-Windows-UserModePowerService/Diagnostic" +) do ( + wevtutil sl "%%~a" /q:true > nul +) +schtasks /change /tn "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /enable > nul + +echo Finished, changes have been applied. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Disable Sleep.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Disable Sleep.cmd similarity index 70% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Disable Sleep.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Disable Sleep.cmd index b7daeca87d..fb0d118346 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Disable Sleep.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Disable Sleep.cmd @@ -1,5 +1,16 @@ @echo off +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + :: Allow Away Mode Policy - No powercfg /setacvalueindex scheme_current 238c9fa8-0aad-41ed-83f4-97be242c8f20 25dfa149-5dd1-4736-b5ab-e8a37b5b8187 0 @@ -25,9 +36,9 @@ if "%~1" == "/silent" exit /b choice /n /c:yn /m "Would you like to disable hibernation? [Y/N]" if %errorlevel%==1 ( - call "%windir%\AtlasDesktop\3. Configuration\Power\Hibernation\Disable Hibernation (default).cmd" /silent + call "%windir%\AtlasDesktop\3. General Configuration\Power\Hibernation\Disable Hibernation (default).cmd" /silent ) else ( - call "%windir%\AtlasDesktop\3. Configuration\Power\Hibernation\Enable Hibernation.cmd" /silent + call "%windir%\AtlasDesktop\3. General Configuration\Power\Hibernation\Enable Hibernation.cmd" /silent ) echo Finished, changes have been applied. diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Enable Sleep (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Enable Sleep (default).cmd similarity index 68% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Enable Sleep (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Enable Sleep (default).cmd index 9bdde7f230..b8cc133a34 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Sleep/Enable Sleep (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Sleep/Enable Sleep (default).cmd @@ -1,5 +1,16 @@ @echo off +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + :: Allow Away Mode Policy - Yes powercfg /setacvalueindex scheme_current 238c9fa8-0aad-41ed-83f4-97be242c8f20 25dfa149-5dd1-4736-b5ab-e8a37b5b8187 1 @@ -25,9 +36,9 @@ if "%~1" == "/silent" exit /b choice /n /c:yn /m "Would you like to enable hibernation? [Y/N]" if %errorlevel%==1 ( - start "Enabling Hibernation" "%windir%\AtlasDesktop\3. Configuration\Power\Hibernation\Enable Hibernation.cmd" + start "Enabling Hibernation" "%windir%\AtlasDesktop\3. General Configuration\Power\Hibernation\Enable Hibernation.cmd" ) else ( - start "Disabling Hibernation" "%windir%\AtlasDesktop\3. Configuration\Power\Hibernation\Disable Hibernation (default).cmd" + start "Disabling Hibernation" "%windir%\AtlasDesktop\3. General Configuration\Power\Hibernation\Disable Hibernation (default).cmd" ) echo Finished, changes have been applied. diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/! Documentation.url b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/! Documentation.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/! Documentation.url rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/! Documentation.url diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/! MeasureSleep.exe b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/! MeasureSleep.exe similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/! MeasureSleep.exe rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/! MeasureSleep.exe diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/Disable timer resolution (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/Disable timer resolution (default).cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/Disable timer resolution (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/Disable timer resolution (default).cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/Enable timer resolution.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/Enable timer resolution.cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Power/Timer Resolution/Enable timer resolution.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/Timer Resolution/Enable timer resolution.cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Disable Printing.cmd similarity index 59% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Disable Printing.cmd index 05a334ece9..3048d3a060 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Disable Printing (default).cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Disable Printing.cmd @@ -9,7 +9,10 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( ) :main -:: Remove print from context menu +echo Disabling printing... +echo] + +echo Removing 'Print' from context menu... reg add "HKCR\SystemFileAssociations\image\shell\print" /v "ProgrammaticAccessOnly" /t REG_SZ /d "" /f > nul for %%a in ( "batfile" @@ -33,7 +36,6 @@ for %%a in ( ) do ( reg add "HKCR\%%~a\shell\print" /v "ProgrammaticAccessOnly" /t REG_SZ /d "" /f > nul ) - for /f "tokens=6 delims=[.] " %%a in ('ver') do ( if %%a GEQ 22000 ( reg add "HKCR\AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw\Shell\Print" /v "LegacyDisable" /t REG_SZ /d "" /f > nul @@ -45,29 +47,33 @@ for /f "tokens=6 delims=[.] " %%a in ('ver') do ( ) ) -call %windir%\AtlasModules\Scripts\setSvc.cmd Spooler 4 -call %windir%\AtlasModules\Scripts\setSvc.cmd PrintWorkFlowUserSvc 4 +echo Disabling services... +call "%windir%\AtlasModules\Scripts\setSvc.cmd" Spooler 4 +call "%windir%\AtlasModules\Scripts\setSvc.cmd" PrintWorkFlowUserSvc 4 -:: Hide Settings page -if not "%~1" == "/silent" ( - set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" - reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 - if %ERRORLEVEL% == 0 ( - for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "%%a;printers;" /f > nul - ) - ) else ( - reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "hide:printers;" /f > nul - ) +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide printing + +echo Disabling capabilities... +for %%a in ( + "Print.Fax.Scan~~~~0.0.1.0" + "Print.Management.Console~~~~0.0.1.0" +) do ( + dism /Online /Remove-Capability /CapabilityName:"%%a" /NoRestart > nul ) -if "%~1" == "/silent" exit /b +echo Disabling features... +for %%a in ( + "Printing-Foundation-Features" + "Printing-Foundation-InternetPrinting-Client" + "Printing-XPSServices-Features" + "Printing-PrintToPDFServices-Features" +) do ( + dism /Online /Disable-Feature /FeatureName:"%%a" /NoRestart > nul +) -DISM /Online /Disable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart > nul -DISM /Online /Disable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart > nul -DISM /Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart > nul -DISM /Online /Disable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart > nul +if "%~1" == "/silent" exit /b +echo] echo Finished, please reboot your device for changes to apply. pause exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Enable Printing.cmd similarity index 63% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Enable Printing.cmd index d6faef247b..de6f829db9 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Printing/Enable Printing.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Printing/Enable Printing.cmd @@ -6,7 +6,10 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -:: Add print to context menu +echo Enabling printing... +echo] + +echo Adding 'Print' to context menu... reg delete "HKCR\SystemFileAssociations\image\shell\print" /v "ProgrammaticAccessOnly" /f > nul 2>&1 for %%a in ( "batfile" @@ -30,7 +33,6 @@ for %%a in ( ) do ( reg delete "HKCR\%%~a\shell\print" /v "ProgrammaticAccessOnly" /f > nul 2>&1 ) - for /f "tokens=6 delims=[.] " %%a in ('ver') do ( if %%a GEQ 22000 ( reg delete "HKCR\AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw\Shell\Print" /v "LegacyDisable" /f > nul 2>&1 @@ -42,24 +44,31 @@ for /f "tokens=6 delims=[.] " %%a in ('ver') do ( ) ) +echo Enabling services... call setSvc.cmd Spooler 2 call setSvc.cmd PrintWorkFlowUserSvc 3 -:: Hide Settings pages -set "pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -reg query "!pageKey!" /v "SettingsPageVisibility" > nul 2>&1 -if %ERRORLEVEL% == 0 call :enableSettingsPage +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide printing + +echo Enabling capabilities (this might take a while)... +for %%a in ( + "Print.Fax.Scan~~~~0.0.1.0" + "Print.Management.Console~~~~0.0.1.0" +) do ( + dism /Online /Add-Capability /CapabilityName:"%%a" /NoRestart > nul +) -DISM /Online /Enable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart > nul -DISM /Online /Enable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart > nul -DISM /Online /Enable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart > nul -DISM /Online /Enable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart > nul +echo Enabling features... +for %%a in ( + "Printing-Foundation-Features" + "Printing-Foundation-InternetPrinting-Client" + "Printing-XPSServices-Features" + "Printing-PrintToPDFServices-Features" +) do ( + dism /Online /Enable-Feature /FeatureName:"%%a" /NoRestart > nul +) +echo] echo Finished, please reboot your device for changes to apply. pause -exit /b - -:enableSettingsPage -for /f "usebackq tokens=3" %%a in (`reg query "!pageKey!" /v "SettingsPageVisibility"`) do (set "currentPages=%%a") -reg add "!pageKey!" /v "SettingsPageVisibility" /t REG_SZ /d "!currentPages:printers;=!" /f > nul exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Disable Search Indexing (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Disable Search Indexing (default).cmd new file mode 100644 index 0000000000..ddcdd29fa1 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Disable Search Indexing (default).cmd @@ -0,0 +1,15 @@ +@echo off +setlocal EnableDelayedExpansion + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +sc config WSearch start=disabled > nul +sc stop WSearch > nul 2>&1 +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide cortana-windowssearch + +echo Finished. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Enable Search Indexing.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Enable Search Indexing.cmd new file mode 100644 index 0000000000..781425a207 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Search Indexing/Enable Search Indexing.cmd @@ -0,0 +1,20 @@ +@echo off +setlocal EnableDelayedExpansion +if "%~1"=="/silent" goto main + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +:main +( + sc config WSearch start=auto + sc start WSearch +) > nul +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide cortana-windowssearch + +if "%~1"=="/silent" exit /b +echo Finished, please reboot your device for changes to apply. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/System Restore/Disable System Restore.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/System Restore/Disable System Restore.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/System Restore/Disable System Restore.reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/System Restore/Disable System Restore.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/System Restore/Enable System Restore (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/System Restore/Enable System Restore (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/System Restore/Enable System Restore (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/System Restore/Enable System Restore (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Disable VPN support.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Disable VPN support.cmd new file mode 100644 index 0000000000..db2098e193 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Disable VPN support.cmd @@ -0,0 +1,27 @@ +@echo off +setlocal EnableDelayedExpansion + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +call toggleDev.cmd -Silent @("NDIS Virtual Network Adapter Enumerator", "Microsoft RRAS Root Enumerator", "WAN Miniport*") + +for %%a in ( + "Eaphost" + "IKEEXT" + "iphlpsvc" + "NdisVirtualBus" + "RasMan" + "SstpSvc" + "WinHttpAutoProxySvc" +) do ( + call setSvc.cmd %%~a 4 +) + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide network-vpn /silent + +echo Finished, please reboot your device for changes to apply. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Enable VPN support (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Enable VPN support (default).cmd new file mode 100644 index 0000000000..f5cdf147f1 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/VPN/Enable VPN support (default).cmd @@ -0,0 +1,28 @@ +@echo off +setlocal EnableDelayedExpansion + +whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( + call RunAsTI.cmd "%~f0" %* + exit /b +) + +call toggleDev.cmd -Silent -Enable @("NDIS Virtual Network Adapter Enumerator", "Microsoft RRAS Root Enumerator", "WAN Miniport*") + +for %%a in ( + "SstpSvc" + "WinHttpAutoProxySvc" + "iphlpsvc" + "NdisVirtualBus" + "IKEEXT" + "Eaphost" +) do ( + call setSvc.cmd %%~a 3 +) +call setSvc.cmd BFE 2 +call setSvc.cmd RasMan 2 + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide network-vpn /silent + +echo Finished, please reboot your device for changes to apply. +pause +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd new file mode 100644 index 0000000000..fffe9c1529 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Disable Web Search (default).cmd @@ -0,0 +1,41 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo] +echo Disabling Web Search ^& Search Highlights... + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide search-permissions /silent + +( + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d "0" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsAADCloudSearchEnabled" /t REG_DWORD /d "0" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDeviceSearchHistoryEnabled" /t REG_DWORD /d "0" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsMSACloudSearchEnabled" /t REG_DWORD /d "0" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "SafeSearchMode" /t REG_DWORD /d "0" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /t REG_DWORD /d "0" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableSearchBoxSuggestions" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d "1" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "EnableDynamicContentInWSB" /t REG_DWORD /d "0" /f + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDynamicSearchBoxEnabled" /t REG_DWORD /d "0" /f + taskkill /f /im explorer.exe + taskkill /f /im SearchHost.exe + taskkill /f /im SystemSettings.exe + start explorer.exe +) > nul 2>&1 + +echo] +echo Finished. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd new file mode 100644 index 0000000000..612ae40e33 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Web Search (includes Search Highlights)/Enable Web Search.cmd @@ -0,0 +1,50 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo] +echo Enabling Web Search ^& Search Highlights... + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide search-permissions /silent + +( + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsAADCloudSearchEnabled" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDeviceSearchHistoryEnabled" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsMSACloudSearchEnabled" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "SafeSearchMode" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /f + reg delete "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableSearchBoxSuggestions" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "EnableDynamicContentInWSB" /f + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDynamicSearchBoxEnabled" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d "2" /f + taskkill /f /im explorer.exe + taskkill /f /im SearchHost.exe + taskkill /f /im SystemSettings.exe + start explorer.exe +) > nul 2>&1 + +for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 sc query wsearch | find "STOPPED" > nul && call :searchIndexBug) + +echo] +echo Finished, you should be able to use Web Search and Search Highlights. +echo Press any key to exit... +pause > nul +exit /b + +:searchIndexBug +echo] +echo On Windows 11, having search indexing disabled causes a graphical bug in web search. +choice /c:yn /n /m "Would you like to enable search indexing to fix it? [Y/N] " +if %errorlevel%==1 call "%windir%\AtlasDesktop\3. General Configuration\Search Indexing\Enable Search Indexing.cmd" /silent & set ____restart=true +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Disable Widgets (default).cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Disable Widgets (default).cmd new file mode 100644 index 0000000000..0c524e5c3b --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Disable Widgets (default).cmd @@ -0,0 +1,28 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo] +echo Disabling News and Interests (called Widgets in Windows 11)... + +( + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v "EnableFeeds" /t REG_DWORD /d "0" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d "0" /f + taskkill /f /im explorer.exe + start explorer.exe +) > nul 2>&1 + +echo] +echo Finished, changes have been applied. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Enable Widgets.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Enable Widgets.cmd new file mode 100644 index 0000000000..50001a2c0c --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Widgets (News and Interests)/Enable Widgets.cmd @@ -0,0 +1,35 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +call "%windir%\AtlasModules\Scripts\edgeCheck.cmd" +if %errorlevel% neq 0 exit /b 1 + +echo] +echo Enabling News and Interests (called Widgets in Windows 11)... + +( + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v "EnableFeeds" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /f + taskkill /f /im explorer.exe + start explorer.exe +) > nul 2>&1 + +ping 127.0.0.1 -n 2 > nul +taskkill /f /im SystemSettings.exe > nul 2>&1 +start ms-settings:taskbar + +echo] +echo Finished, you should be able to toggle News and Interests or Widgets in Settings. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Disable Windows Spotlight (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Disable Windows Spotlight (default).reg new file mode 100644 index 0000000000..4355be936e --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Disable Windows Spotlight (default).reg @@ -0,0 +1,23 @@ +Windows Registry Editor Version 5.00 + +; Background apps aren't disabled again as we don't know the user's preference +; As in, we don't know if the user already had background apps enabled or not + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent] +"DisableCloudOptimizedContent"=dword:00000001 + +[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent] +"DisableWindowsSpotlightFeatures"=dword:00000001 +"DisableWindowsSpotlightWindowsWelcomeExperience"=dword:00000001 +"DisableWindowsSpotlightOnActionCenter"=dword:00000001 +"DisableWindowsSpotlightOnSettings"=dword:00000001 +"DisableThirdPartySuggestions"=dword:00000001 + + +; Disable in Content Delivery Manager +[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager] +"ContentDeliveryAllowed"=dword:00000000 +"FeatureManagementEnabled"=dword:00000000 +"SubscribedContentEnabled"=dword:00000000 +"SubscribedContent-338387Enabled"=dword:00000000 +"RotatingLockScreenOverlayEnabled"=dword:00000000 diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Game Bar Download.url b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Dynamic Theme (Alternative).url similarity index 59% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Game Bar Download.url rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Dynamic Theme (Alternative).url index 41aaa5f680..2d09c8bb3c 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/FSO and XBOX/Game Bar Download.url +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Dynamic Theme (Alternative).url @@ -2,4 +2,4 @@ Prop3=19,0 [InternetShortcut] IDList= -URL=ms-windows-store://review/?ProductId=9NZKPSTSNW4P +URL=ms-windows-store://pdp/?ProductId=9nblggh1zbkw diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Enable Windows Spotlight.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Enable Windows Spotlight.reg new file mode 100644 index 0000000000..dddd802ba0 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Spotlight/Enable Windows Spotlight.reg @@ -0,0 +1,39 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent] +"DisableCloudOptimizedContent"=- + +[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent] +"DisableWindowsSpotlightFeatures"=- +"DisableWindowsSpotlightWindowsWelcomeExperience"=- +"DisableWindowsSpotlightOnActionCenter"=- +"DisableWindowsSpotlightOnSettings"=- +; Windows Spotlight features may suggest apps and content from +; third-party software publishers in addition to Microsoft apps +; and content +"DisableThirdPartySuggestions"=- + +; "Get fun facts, tips, tricks and more on your lockscreen" +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent] +"DisableSoftLanding"=- + + +; Enable background apps +; Seems to be required for Spotlight to work properly +[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search] +"BackgroundAppGlobalToggle"=- + +[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications] +"GlobalUserDisabled"=- + +[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppPrivacy] +"LetAppsRunInBackground"=- + + +; Enable in Content Delivery Manager +[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager] +"ContentDeliveryAllowed"=dword:00000001 +"FeatureManagementEnabled"=dword:00000001 +"SubscribedContentEnabled"=dword:00000001 +"SubscribedContent-338387Enabled"=dword:00000001 +"RotatingLockScreenOverlayEnabled"=dword:00000001 diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Disable Automatic Updates (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Disable Automatic Updates (default).reg new file mode 100644 index 0000000000..b133a941c4 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Disable Automatic Updates (default).reg @@ -0,0 +1,5 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU] +"AUOptions"=dword:00000002 +"NoAutoUpdate"=dword:00000001 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Enable Automatic Updates.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Enable Automatic Updates.reg new file mode 100644 index 0000000000..fe831e5534 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Automatic Updates/Enable Automatic Updates.reg @@ -0,0 +1,5 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU] +"AUOptions"=- +"NoAutoUpdate"=- \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Delivery Optimization/Disable Delivery Optimization (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Delivery Optimization/Disable Delivery Optimization (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Delivery Optimization/Disable Delivery Optimization (default).reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Delivery Optimization/Disable Delivery Optimization (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Delivery Optimization/Enable Delivery Optimization.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Delivery Optimization/Enable Delivery Optimization.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Delivery Optimization/Enable Delivery Optimization.reg rename to src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Delivery Optimization/Enable Delivery Optimization.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Disable Update Notifications.reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Disable Update Notifications.reg new file mode 100644 index 0000000000..5971f5d091 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Disable Update Notifications.reg @@ -0,0 +1,10 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] +"SetAutoRestartNotificationDisable"=dword:00000001 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings] +"RestartNotificationsAllowed2"=dword:00000000 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] +"SetUpdateNotificationLevel"=dword:00000002 diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Enable Update Notifications (default).reg b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Enable Update Notifications (default).reg new file mode 100644 index 0000000000..992db954cf --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Windows Update/Update Notifications/Enable Update Notifications (default).reg @@ -0,0 +1,10 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] +"SetAutoRestartNotificationDisable"=- + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings] +"RestartNotificationsAllowed2"=- + +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] +"SetUpdateNotificationLevel"=- diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Alt-Tab/Legacy Alt-Tab.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Alt-Tab/Legacy Alt-Tab.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Alt-Tab/Legacy Alt-Tab.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Alt-Tab/Legacy Alt-Tab.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Alt-Tab/Modern Alt-Tab (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Alt-Tab/Modern Alt-Tab (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Alt-Tab/Modern Alt-Tab (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Alt-Tab/Modern Alt-Tab (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Run With Priority in context menu/Add Run With Priority In Context Menu.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Run With Priority/Add Run With Priority in Context Menu.reg similarity index 91% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Run With Priority in context menu/Add Run With Priority In Context Menu.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Run With Priority/Add Run With Priority in Context Menu.reg index f55b2dfbc2..9cf2f24550 100644 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Run With Priority in context menu/Add Run With Priority In Context Menu.reg +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Run With Priority/Add Run With Priority in Context Menu.reg @@ -8,7 +8,7 @@ Windows Registry Editor Version 5.00 @="Realtime" [HKEY_CLASSES_ROOT\exefile\Shell\Priority\shell\001flyout\command] -@="cmd /c start \"\" /Realtime \"%1\"" +@="powershell start -file 'cmd' -args '/c start \"\"\"Realtime App\"\"\" /Realtime \"\"\"%1\"\"\"' -verb runas" [HKEY_CLASSES_ROOT\exefile\Shell\Priority\shell\002flyout] @="High" diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Run With Priority in context menu/Remove Run With Priority In Context Menu (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Run With Priority/Remove Run With Priority In Context Menu (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Run With Priority in context menu/Remove Run With Priority In Context Menu (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Run With Priority/Remove Run With Priority In Context Menu (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Send To/Debloat Send To Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Send To/Debloat Send To Context Menu.cmd new file mode 100644 index 0000000000..642d2605ba --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Send To/Debloat Send To Context Menu.cmd @@ -0,0 +1,22 @@ +@echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\DebloatSendToContextMenu.ps1" + +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args""" -WindowStyle Minimized" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Add Take Ownership to Context Menu.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Add Take Ownership to Context Menu.reg new file mode 100644 index 0000000000..f5134b58b1 Binary files /dev/null and b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Add Take Ownership to Context Menu.reg differ diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Remove Take Ownership to Context Menu (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Remove Take Ownership to Context Menu (default).reg new file mode 100644 index 0000000000..47fe37e531 Binary files /dev/null and b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Take Ownership/Remove Take Ownership to Context Menu (default).reg differ diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals (no Windows Terminal).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals (no Windows Terminal).reg new file mode 100644 index 0000000000..4ecb988685 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals (no Windows Terminal).reg @@ -0,0 +1,324 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked] +"{9F156763-7844-4DC4-B2B1-901F640F5155}"=- + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +; RunAsTI function +; https://github.com/AveYo/LeanAndMean +[HKEY_CLASSES_ROOT\TermsRunAsTI] +"10"="function RunAsTI ($cmd,$arg) { $id='RunAsTI'; $key=\"Registry::HKU\\$(((whoami /user)-split' ')[-1])\\Volatile Environment\"; $code=@'" +"11"=" $I=[int32]; $M=$I.module.gettype(\"System.Runtime.Interop`Services.Mar`shal\"); $P=$I.module.gettype(\"System.Int`Ptr\"); $S=[string]" +"12"=" $D=@(); $T=@(); $DM=[AppDomain]::CurrentDomain.\"DefineDynami`cAssembly\"(1,1).\"DefineDynami`cModule\"(1); $Z=[uintptr]::size " +"13"=" 0..5|% {$D += $DM.\"Defin`eType\"(\"AveYo_$_\",1179913,[ValueType])}; $D += [uintptr]; 4..6|% {$D += $D[$_].\"MakeByR`efType\"()}" +"14"=" $F='kernel','advapi','advapi', ($S,$S,$I,$I,$I,$I,$I,$S,$D[7],$D[8]), ([uintptr],$S,$I,$I,$D[9]),([uintptr],$S,$I,$I,[byte[]],$I)" +"15"=" 0..2|% {$9=$D[0].\"DefinePInvok`eMethod\"(('CreateProcess','RegOpenKeyEx','RegSetValueEx')[$_],$F[$_]+'32',8214,1,$S,$F[$_+3],1,4)}" +"16"=" $DF=($P,$I,$P),($I,$I,$I,$I,$P,$D[1]),($I,$S,$S,$S,$I,$I,$I,$I,$I,$I,$I,$I,[int16],[int16],$P,$P,$P,$P),($D[3],$P),($P,$P,$I,$I)" +"17"=" 1..5|% {$k=$_; $n=1; $DF[$_-1]|% {$9=$D[$k].\"Defin`eField\"('f' + $n++, $_, 6)}}; 0..5|% {$T += $D[$_].\"Creat`eType\"()}" +"18"=" 0..5|% {nv \"A$_\" ([Activator]::CreateInstance($T[$_])) -fo}; function F ($1,$2) {$T[0].\"G`etMethod\"($1).invoke(0,$2)}" +"19"=" $TI=(whoami /groups)-like'*1-16-16384*'; $As=0; if(!$cmd) {$cmd='control';$arg='admintools'}; if ($cmd-eq'This PC'){$cmd='file:'}" +"20"=" if (!$TI) {'TrustedInstaller','lsass','winlogon'|% {if (!$As) {$9=sc.exe start $_; $As=@(get-process -name $_ -ea 0|% {$_})[0]}}" +"21"=" function M ($1,$2,$3) {$M.\"G`etMethod\"($1,[type[]]$2).invoke(0,$3)}; $H=@(); $Z,(4*$Z+16)|% {$H += M \"AllocHG`lobal\" $I $_}" +"22"=" M \"WriteInt`Ptr\" ($P,$P) ($H[0],$As.Handle); $A1.f1=131072; $A1.f2=$Z; $A1.f3=$H[0]; $A2.f1=1; $A2.f2=1; $A2.f3=1; $A2.f4=1" +"23"=" $A2.f6=$A1; $A3.f1=10*$Z+32; $A4.f1=$A3; $A4.f2=$H[1]; M \"StructureTo`Ptr\" ($D[2],$P,[boolean]) (($A2 -as $D[2]),$A4.f2,$false)" +"24"=" $Run=@($null, \"PowerShell -win 1 -nop -c iex `$env:R; # $id\", 0, 0, 0, 0x0E080600, 0, $null, ($A4 -as $T[4]), ($A5 -as $T[5]))" +"25"=" F 'CreateProcess' $Run; return}; $env:R=''; rp $key $id -force; $priv=[diagnostics.process].\"GetM`ember\"('SetPrivilege',42)[0]" +"26"=" 'SeSecurityPrivilege','SeTakeOwnershipPrivilege','SeBackupPrivilege','SeRestorePrivilege' |% {$priv.Invoke($null, @(\"$_\",2))}" +"27"=" $HKU=[uintptr][uint32]2147483651; $NT='S-1-5-18'; $reg=($HKU,$NT,8,2,($HKU -as $D[9])); F 'RegOpenKeyEx' $reg; $LNK=$reg[4]" +"28"=" function L ($1,$2,$3) {sp 'Registry::HKCR\\AppID\\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}' 'RunAs' $3 -force -ea 0" +"29"=" $b=[Text.Encoding]::Unicode.GetBytes(\"\\Registry\\User\\$1\"); F 'RegSetValueEx' @($2,'SymbolicLinkValue',0,6,[byte[]]$b,$b.Length)}" +"30"=" function Q {[int](gwmi win32_process -filter 'name=\"explorer.exe\"'|?{$_.getownersid().sid-eq$NT}|select -last 1).ProcessId}" +"31"=" $env:wt='PowerShell'; dir \"$env:ProgramFiles\\WindowsApps\\Microsoft.WindowsTerminal*\\wt.exe\" -rec|% {$env:wt='\"'+$_.FullName+'\" \"-d .\"'}" +"32"=" $11bug=($((gwmi Win32_OperatingSystem).BuildNumber)-eq'22000')-AND(($cmd-eq'file:')-OR(test-path -lit $cmd -PathType Container))" +"33"=" if ($11bug) {'System.Windows.Forms','Microsoft.VisualBasic' |% {$9=[Reflection.Assembly]::LoadWithPartialName(\"'$_\")}}" +"34"=" if ($11bug) {$path='^(l)'+$($cmd -replace '([\\+\\^\\%\\~\\(\\)\\[\\]])','{$1}')+'{ENTER}'; $cmd='control.exe'; $arg='admintools'}" +"35"=" L ($key-split'\\\\')[1] $LNK ''; $R=[diagnostics.process]::start($cmd,$arg); if ($R) {$R.PriorityClass='High'; $R.WaitForExit()}" +"36"=" if ($11bug) {$w=0; do {if($w-gt40){break}; sleep -mi 250;$w++} until (Q); [Microsoft.VisualBasic.Interaction]::AppActivate($(Q))}" +"37"=" if ($11bug) {[Windows.Forms.SendKeys]::SendWait($path)}; do {sleep 7} while(Q); L '.Default' $LNK 'Interactive User'" +"38"="'@; $V='';'cmd','arg','id','key'|%{$V+=\"`n`$$_='$($(gv $_ -val)-replace\"'\",\"''\")';\"}; sp $key $id $($V,$code) -type 7 -force -ea 0" +"39"=" start PowerShell -args \"-win 1 -nop -c `n$V `$env:R=(gi `$key -ea 0).getvalue(`$id)-join''; iex `$env:R\" -verb runas" +"40"="}; $A=,([environment]::commandline-split'-[-]%+ ?',2)[1]-split'\"([^\"]+)\"|([^ ]+)',2|%{$_.Trim(' \"')}; RunAsTI $A[1] $A[2]; # AveYo, 2023.07.06" +; \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals.reg new file mode 100644 index 0000000000..927b7358ad --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Add Terminals.reg @@ -0,0 +1,384 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked] +"{9F156763-7844-4DC4-B2B1-901F640F5155}"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item1] +"MUIVerb"="Windows Terminal" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item1\command] +@="wt.exe -d \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenElevatedCmd] +"MUIVerb"="Windows Terminal (Admin)" +"Icon"="%windir%\\system32\\cmd.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenElevatedCmd\command] +@="mshta vbscript:createobject(\"shell.application\").shellexecute(\"wt.exe\",\"-d \"\"%V\"\"\",\"\",\"runas\",1)(close)" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item1] +"MUIVerb"="Windows Terminal" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item1\command] +@="wt.exe -d \"%V\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenElevatedCmd] +"MUIVerb"="Windows Terminal (Admin)" +"Icon"="%windir%\\system32\\cmd.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenElevatedCmd\command] +@="mshta vbscript:createobject(\"shell.application\").shellexecute(\"wt.exe\",\"-d \"\"%V\"\"\",\"\",\"runas\",1)(close)" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item1] +"MUIVerb"="Windows Terminal" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item1\command] +@="wt.exe -d \"%V\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenElevatedCmd] +"MUIVerb"="Windows Terminal (Admin)" +"Icon"="%windir%\\system32\\cmd.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenElevatedCmd\command] +@="mshta vbscript:createobject(\"shell.application\").shellexecute(\"wt.exe\",\"-d \"\"%V\"\"\",\"\",\"runas\",1)(close)" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals] +"MUIVerb"="Terminals" +"SubCommands"="" +"Icon"="%windir%\\system32\\cmd.exe,0" +"NoWorkingDirectory"="" +"NeverDefault"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell] + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\cmd2] +"NeverDefault"="" +"Icon"="cmd.exe" +"Extended"="" +"NoWorkingDirectory"="" +@="Command Prompt" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\cmd2\command] +@="cmd.exe /s /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\AtlasTerminals] +"NoWorkingDirectory"="" +"Extended"="" +"Icon"="PowerShell.exe" +"NeverDefault"="" +@="PowerShell" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\AtlasTerminals\command] +@="PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item1] +"MUIVerb"="Windows Terminal" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item1\command] +@="wt.exe -d \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item10] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item2] +"NoWorkingDirectory"="" +@="Command Prompt (Admin)" +"Icon"="cmd.exe" +"Extended"="" +"NeverDefault"="" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item2\command] +@="PowerShell.exe -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item3] +@="PowerShell (Admin)" +"Extended"="" +"HasLUAShield"="" +"Icon"="PowerShell.exe" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\Item3\command] +@="PowerShell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs PowerShell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenElevatedCmd] +"MUIVerb"="Windows Terminal (Admin)" +"Icon"="%windir%\\system32\\cmd.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenElevatedCmd\command] +@="mshta vbscript:createobject(\"shell.application\").shellexecute(\"wt.exe\",\"-d \"\"%V\"\"\",\"\",\"runas\",1)(close)" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPS] +"CommandFlags"=dword:00000008 + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin] +"MUIVerb"="Command Prompt (System)" +"HasLUAShield"="" +"Icon"="%windir%\\system32\\cmd.exe,0" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% cmd /k pushd \"%V\"" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin0] +"MUIVerb"="PowerShell (System)" +"Icon"="%windir%\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe,0" +"HasLUAShield"="" + +[HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals\shell\OpenPSAdmin0\command] +@="PowerShell.exe -win 1 -nop -c iex((10..40|%%{(gp 'Registry::HKCR\\TermsRunAsTI' $_ -ea 0).$_})-join[char]10); # --%% PowerShell.exe -noexit -command Set-Location -literalPath '%V'" + +; RunAsTI function +; https://github.com/AveYo/LeanAndMean +[HKEY_CLASSES_ROOT\TermsRunAsTI] +"10"="function RunAsTI ($cmd,$arg) { $id='RunAsTI'; $key=\"Registry::HKU\\$(((whoami /user)-split' ')[-1])\\Volatile Environment\"; $code=@'" +"11"=" $I=[int32]; $M=$I.module.gettype(\"System.Runtime.Interop`Services.Mar`shal\"); $P=$I.module.gettype(\"System.Int`Ptr\"); $S=[string]" +"12"=" $D=@(); $T=@(); $DM=[AppDomain]::CurrentDomain.\"DefineDynami`cAssembly\"(1,1).\"DefineDynami`cModule\"(1); $Z=[uintptr]::size " +"13"=" 0..5|% {$D += $DM.\"Defin`eType\"(\"AveYo_$_\",1179913,[ValueType])}; $D += [uintptr]; 4..6|% {$D += $D[$_].\"MakeByR`efType\"()}" +"14"=" $F='kernel','advapi','advapi', ($S,$S,$I,$I,$I,$I,$I,$S,$D[7],$D[8]), ([uintptr],$S,$I,$I,$D[9]),([uintptr],$S,$I,$I,[byte[]],$I)" +"15"=" 0..2|% {$9=$D[0].\"DefinePInvok`eMethod\"(('CreateProcess','RegOpenKeyEx','RegSetValueEx')[$_],$F[$_]+'32',8214,1,$S,$F[$_+3],1,4)}" +"16"=" $DF=($P,$I,$P),($I,$I,$I,$I,$P,$D[1]),($I,$S,$S,$S,$I,$I,$I,$I,$I,$I,$I,$I,[int16],[int16],$P,$P,$P,$P),($D[3],$P),($P,$P,$I,$I)" +"17"=" 1..5|% {$k=$_; $n=1; $DF[$_-1]|% {$9=$D[$k].\"Defin`eField\"('f' + $n++, $_, 6)}}; 0..5|% {$T += $D[$_].\"Creat`eType\"()}" +"18"=" 0..5|% {nv \"A$_\" ([Activator]::CreateInstance($T[$_])) -fo}; function F ($1,$2) {$T[0].\"G`etMethod\"($1).invoke(0,$2)}" +"19"=" $TI=(whoami /groups)-like'*1-16-16384*'; $As=0; if(!$cmd) {$cmd='control';$arg='admintools'}; if ($cmd-eq'This PC'){$cmd='file:'}" +"20"=" if (!$TI) {'TrustedInstaller','lsass','winlogon'|% {if (!$As) {$9=sc.exe start $_; $As=@(get-process -name $_ -ea 0|% {$_})[0]}}" +"21"=" function M ($1,$2,$3) {$M.\"G`etMethod\"($1,[type[]]$2).invoke(0,$3)}; $H=@(); $Z,(4*$Z+16)|% {$H += M \"AllocHG`lobal\" $I $_}" +"22"=" M \"WriteInt`Ptr\" ($P,$P) ($H[0],$As.Handle); $A1.f1=131072; $A1.f2=$Z; $A1.f3=$H[0]; $A2.f1=1; $A2.f2=1; $A2.f3=1; $A2.f4=1" +"23"=" $A2.f6=$A1; $A3.f1=10*$Z+32; $A4.f1=$A3; $A4.f2=$H[1]; M \"StructureTo`Ptr\" ($D[2],$P,[boolean]) (($A2 -as $D[2]),$A4.f2,$false)" +"24"=" $Run=@($null, \"PowerShell -win 1 -nop -c iex `$env:R; # $id\", 0, 0, 0, 0x0E080600, 0, $null, ($A4 -as $T[4]), ($A5 -as $T[5]))" +"25"=" F 'CreateProcess' $Run; return}; $env:R=''; rp $key $id -force; $priv=[diagnostics.process].\"GetM`ember\"('SetPrivilege',42)[0]" +"26"=" 'SeSecurityPrivilege','SeTakeOwnershipPrivilege','SeBackupPrivilege','SeRestorePrivilege' |% {$priv.Invoke($null, @(\"$_\",2))}" +"27"=" $HKU=[uintptr][uint32]2147483651; $NT='S-1-5-18'; $reg=($HKU,$NT,8,2,($HKU -as $D[9])); F 'RegOpenKeyEx' $reg; $LNK=$reg[4]" +"28"=" function L ($1,$2,$3) {sp 'Registry::HKCR\\AppID\\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}' 'RunAs' $3 -force -ea 0" +"29"=" $b=[Text.Encoding]::Unicode.GetBytes(\"\\Registry\\User\\$1\"); F 'RegSetValueEx' @($2,'SymbolicLinkValue',0,6,[byte[]]$b,$b.Length)}" +"30"=" function Q {[int](gwmi win32_process -filter 'name=\"explorer.exe\"'|?{$_.getownersid().sid-eq$NT}|select -last 1).ProcessId}" +"31"=" $env:wt='PowerShell'; dir \"$env:ProgramFiles\\WindowsApps\\Microsoft.WindowsTerminal*\\wt.exe\" -rec|% {$env:wt='\"'+$_.FullName+'\" \"-d .\"'}" +"32"=" $11bug=($((gwmi Win32_OperatingSystem).BuildNumber)-eq'22000')-AND(($cmd-eq'file:')-OR(test-path -lit $cmd -PathType Container))" +"33"=" if ($11bug) {'System.Windows.Forms','Microsoft.VisualBasic' |% {$9=[Reflection.Assembly]::LoadWithPartialName(\"'$_\")}}" +"34"=" if ($11bug) {$path='^(l)'+$($cmd -replace '([\\+\\^\\%\\~\\(\\)\\[\\]])','{$1}')+'{ENTER}'; $cmd='control.exe'; $arg='admintools'}" +"35"=" L ($key-split'\\\\')[1] $LNK ''; $R=[diagnostics.process]::start($cmd,$arg); if ($R) {$R.PriorityClass='High'; $R.WaitForExit()}" +"36"=" if ($11bug) {$w=0; do {if($w-gt40){break}; sleep -mi 250;$w++} until (Q); [Microsoft.VisualBasic.Interaction]::AppActivate($(Q))}" +"37"=" if ($11bug) {[Windows.Forms.SendKeys]::SendWait($path)}; do {sleep 7} while(Q); L '.Default' $LNK 'Interactive User'" +"38"="'@; $V='';'cmd','arg','id','key'|%{$V+=\"`n`$$_='$($(gv $_ -val)-replace\"'\",\"''\")';\"}; sp $key $id $($V,$code) -type 7 -force -ea 0" +"39"=" start PowerShell -args \"-win 1 -nop -c `n$V `$env:R=(gi `$key -ea 0).getvalue(`$id)-join''; iex `$env:R\" -verb runas" +"40"="}; $A=,([environment]::commandline-split'-[-]%+ ?',2)[1]-split'\"([^\"]+)\"|([^ ]+)',2|%{$_.Trim(' \"')}; RunAsTI $A[1] $A[2]; # AveYo, 2023.07.06" +; \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Remove Terminals Context Menu (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Remove Terminals Context Menu (default).reg new file mode 100644 index 0000000000..571039bb61 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Terminals/Remove Terminals Context Menu (default).reg @@ -0,0 +1,14 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked] +"{9F156763-7844-4DC4-B2B1-901F640F5155}"=- + +[-HKEY_CLASSES_ROOT\TermsRunAsTI] + +[-HKEY_CLASSES_ROOT\Directory\shell\AtlasTerminals] + +[-HKEY_CLASSES_ROOT\LibraryFolder\shell\AtlasTerminals] + +[-HKEY_CLASSES_ROOT\Drive\shell\AtlasTerminals] + +[-HKEY_CLASSES_ROOT\Directory\Background\shell\AtlasTerminals] \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Context Menu/New Context Menu.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Windows 11/New Context Menu.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Context Menu/New Context Menu.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Windows 11/New Context Menu.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Context Menu/Old Context Menu (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Windows 11/Old Context Menu (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Context Menu/Old Context Menu (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Context Menus/Windows 11/Old Context Menu (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Allow Edge Swipe.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Allow Edge Swipe.reg new file mode 100644 index 0000000000..e4e3cf850d --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Allow Edge Swipe.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EdgeUI] +"AllowEdgeSwipe"=- \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Disallow Edge Swipe (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Disallow Edge Swipe (default).reg new file mode 100644 index 0000000000..09b7886938 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Edge Swipe/Disallow Edge Swipe (default).reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EdgeUI] +"AllowEdgeSwipe"=dword:00000000 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Disable Automatic Folder Discovery (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Disable Automatic Folder Discovery (default).reg new file mode 100644 index 0000000000..071a9b1606 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Disable Automatic Folder Discovery (default).reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell] +"FolderType"=- \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Enable Automatic Folder Discovery.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Enable Automatic Folder Discovery.reg new file mode 100644 index 0000000000..8d25ab4cdd --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Automatic Folder Discovery/Enable Automatic Folder Discovery.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell] +"FolderType"=dword:00000000 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Compact View/Disable Compact View.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Compact View/Disable Compact View.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Compact View/Disable Compact View.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Compact View/Disable Compact View.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Compact View/Enable Compact View (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Compact View/Enable Compact View (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Compact View/Enable Compact View (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Compact View/Enable Compact View (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win10/Remove all folders in This PC (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Folders in This PC/Remove all folders in This PC (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win10/Remove all folders in This PC (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Folders in This PC/Remove all folders in This PC (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win10/Restore all folders in This PC.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Folders in This PC/Restore all folders in This PC.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win10/Restore all folders in This PC.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Folders in This PC/Restore all folders in This PC.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Gallery/Disable Gallery (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Gallery/Disable Gallery (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Gallery/Disable Gallery (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Gallery/Disable Gallery (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Gallery/Enable Gallery.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Gallery/Enable Gallery.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Gallery/Enable Gallery.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Gallery/Enable Gallery.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Quick Access/Remove Quick Access.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Quick Access/Remove Quick Access.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Quick Access/Remove Quick Access.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Quick Access/Remove Quick Access.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Quick Access/Show Quick Access (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Quick Access/Show Quick Access (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Quick Access/Show Quick Access (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Quick Access/Show Quick Access (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Removable Drives in Sidebar/Disable Removable Drives in Sidebar (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Removable Drives in Sidebar/Disable Removable Drives in Sidebar (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Removable Drives in Sidebar/Disable Removable Drives in Sidebar (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Removable Drives in Sidebar/Disable Removable Drives in Sidebar (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Removable Drives in Sidebar/Enable Removable Drives in Sidebar.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Removable Drives in Sidebar/Enable Removable Drives in Sidebar.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Removable Drives in Sidebar/Enable Removable Drives in Sidebar.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/File Explorer Customization/Removable Drives in Sidebar/Enable Removable Drives in Sidebar.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Interface Tweaks Documentation.url b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Interface Tweaks Documentation.url new file mode 100644 index 0000000000..79c38c82b5 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Interface Tweaks Documentation.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/post-installation/atlas-folder/interface-tweaks/ diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Lock Screen/Hide Lock Screen.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Hide Lock Screen.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Lock Screen/Hide Lock Screen.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Hide Lock Screen.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Lock Screen/Show Lock Screen (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Show Lock Screen (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Lock Screen/Show Lock Screen (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Show Lock Screen (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Modern Battery Flyout (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Modern Battery Flyout (default).reg new file mode 100644 index 0000000000..447ad1dea5 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Modern Battery Flyout (default).reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell] +"UseWin32BatteryFlyout"=dword:00000000 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Old Battery Flyout.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Old Battery Flyout.reg new file mode 100644 index 0000000000..02041dbf69 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Battery Flyout/Old Battery Flyout.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell] +"UseWin32BatteryFlyout"=dword:00000001 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Modern Date and Time Flyout (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Modern Date and Time Flyout (default).reg new file mode 100644 index 0000000000..6663ddde79 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Modern Date and Time Flyout (default).reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell] +"UseWin32TrayClockExperience"=dword:00000000 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Old Date and Time Flyout.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Old Date and Time Flyout.reg new file mode 100644 index 0000000000..65a8c05268 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Date and Time Flyout/Old Date and Time Flyout.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell] +"UseWin32TrayClockExperience"=dword:00000001 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Volume Flyout/Modern Volume Flyout (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Volume Flyout/Modern Volume Flyout (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Volume Flyout/Modern Volume Flyout (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Volume Flyout/Modern Volume Flyout (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Volume Flyout/Old Volume Flyout.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Volume Flyout/Old Volume Flyout.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Volume Flyout/Old Volume Flyout.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Old Flyouts/Volume Flyout/Old Volume Flyout.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Restart Explorer.lnk b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Restart Explorer.lnk similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Restart Explorer.lnk rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Restart Explorer.lnk diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/Classic.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/Classic.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/Classic.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/Classic.reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/Default Windows (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/Default Windows (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/Default Windows (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/Default Windows (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/None (security risk).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/None (security risk).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Icon/None (security risk).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Icon/None (security risk).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Text/Disable Shortcut Text (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Text/Disable Shortcut Text (default).reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Text/Disable Shortcut Text (default).reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Text/Disable Shortcut Text (default).reg diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Text/Restore Shortcut Text.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Text/Restore Shortcut Text.reg similarity index 100% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Shortcut Text/Restore Shortcut Text.reg rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Shortcut Text/Restore Shortcut Text.reg diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Atlas Open-Shell Preset.xml b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/Atlas Open-Shell Preset.xml similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Atlas Open-Shell Preset.xml rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/Atlas Open-Shell Preset.xml diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/ExplorerPatcher.url b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/ExplorerPatcher.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/ExplorerPatcher.url rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/ExplorerPatcher.url diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/Install Open-Shell.cmd similarity index 90% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/Install Open-Shell.cmd index 99e4891bd9..ff3512e912 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/Install Open-Shell.cmd +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/Install Open-Shell.cmd @@ -1,16 +1,17 @@ @echo off +set "___args="%~f0" %*" fltmc > nul 2>&1 || ( echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( echo You must run this script as admin. + if "%*"=="" pause exit /b 1 ) exit /b ) :: Check if WinGet is functional or not -echo Checking if WinGet exists... call "%windir%\AtlasModules\Scripts\wingetCheck.cmd" if %ERRORLEVEL% NEQ 0 exit /b 1 diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/StartAllBack.url b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/StartAllBack.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Start Menu/StartAllBack.url rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Start Menu/StartAllBack.url diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Disable Recent Items (default).cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Disable Recent Items (default).cmd new file mode 100644 index 0000000000..1b073a89ba --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Disable Recent Items (default).cmd @@ -0,0 +1,44 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo Disabling recent items... + +( + rem Policy + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ClearRecentDocsOnExit" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoRemoteDestinations" /t REG_DWORD /d "1" /f + reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /t REG_DWORD /d "1" /f + reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /t REG_DWORD /d "1" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "HideRecentlyAddedApps" /t REG_DWORD /d "1" /f + + rem Non-policy + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d "0" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d "0" /f +) > nul + +( + taskkill /f /im SettingsApp.exe + taskkill /f /im explorer.exe + start explorer.exe +) > nul 2>&1 + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide privacy-general + +echo] +echo Finished, features relating to app, document, etc tracking have been disabled. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Unlock Recent Items.cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Unlock Recent Items.cmd new file mode 100644 index 0000000000..e5e7f1b786 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Unlock Recent Items/Unlock Recent Items.cmd @@ -0,0 +1,43 @@ +@echo off + +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b +) + +echo Unlocking recent items... + +( + rem Policy + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ClearRecentDocsOnExit" /f + reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /f + reg delete "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoRemoteDestinations" /f + reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f + reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRecentDocsHistory" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /f + reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "HideRecentlyAddedApps" /f + + rem Non-policy + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d "1" /f + reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d "1" /f + + taskkill /f /im SettingsApp.exe + taskkill /f /im explorer.exe + start explorer.exe +) > nul 2>&1 + +call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide privacy-general + +echo] +echo Finished, you should be able to configure features relating to app, document, etc tracking. +echo See File Explorer's options panel, as well as the Start and general privacy settings pages. +echo Press any key to exit... +pause > nul +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Disable Verbose Messages.reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Disable Verbose Messages.reg new file mode 100644 index 0000000000..5a4ef41941 Binary files /dev/null and b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Disable Verbose Messages.reg differ diff --git a/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Enable Verbose Messages (default).reg b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Enable Verbose Messages (default).reg new file mode 100644 index 0000000000..0f9b681b63 Binary files /dev/null and b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Verbose Status Messages/Enable Verbose Messages (default).reg differ diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Atlas Visual Effects (default).cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Atlas Visual Effects (default).cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Atlas Visual Effects (default).cmd rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Atlas Visual Effects (default).cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Default Windows Visual Effects.cmd b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Default Windows Visual Effects.cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Default Windows Visual Effects.cmd rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Default Windows Visual Effects.cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Visual Effect Settings.lnk b/src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Visual Effect Settings.lnk similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Visual Effects/Visual Effect Settings.lnk rename to src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Visual Effects/Visual Effect Settings.lnk diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Remove all folders in This PC (default).reg b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Remove all folders in This PC (default).reg deleted file mode 100644 index 74e30b3ff8..0000000000 Binary files a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Remove all folders in This PC (default).reg and /dev/null differ diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Restore all folders in This PC.reg b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Restore all folders in This PC.reg deleted file mode 100644 index 63894c36ba..0000000000 Binary files a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/File Explorer Customization/Folders in This PC/Win11/Restore all folders in This PC.reg and /dev/null differ diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd deleted file mode 100644 index b37073a03b..0000000000 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Send To Context Menu/Debloat Send To Context Menu.cmd +++ /dev/null @@ -1,43 +0,0 @@ -@echo off - -for %%a in ( - "bluetooth" - "zipfolder" - "mail" - "documents" - "removableDrives" -) do ( - set "%%~a=false" -) - -for /f "usebackq tokens=*" %%a in ( - `multichoice.exe "Send To Debloat" "Tick the default 'Send To' context menu items that you want to disable here (un-checked items are enabled)" "Bluetooth device;Compressed (zipped) folder;Desktop (create shortcut);Mail recipient;Documents;Removable Drives"` -) do (set "items=%%a") -for %%a in ("%items:;=" "%") do ( - if "%%~a" == "Bluetooth device" (set "bluetooth=true") - if "%%~a" == "Compressed (zipped) folder" (set "zipfolder=true") - if "%%~a" == "Desktop (create shortcut)" (set "desktop=true") - if "%%~a" == "Mail recipient" (set "mail=true") - if "%%~a" == "Documents" (set "documents=true") - if "%%~a" == "Removable Drives" (set "removableDrives=true") -) -if "%bluetooth%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK") -if "%zipfolder%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Compressed (zipped) Folder.ZFSendToTarget") -if "%desktop%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Desktop (create shortcut).DeskLink") -if "%mail%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail") -if "%documents%" == "true" (attrib +h "%APPDATA%\Microsoft\Windows\SendTo\Documents.mydocs") else (attrib -h "%APPDATA%\Microsoft\Windows\SendTo\Documents.mydocs") -if "%removableDrive%" == "true" ( - reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrivesInSendToMenu" /t REG_DWORD /d "1" /f > nul 2>&1 -) else ( - reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrivesInSendToMenu" /f > nul 2>&1 -) -for /f "usebackq tokens=*" %%a in (`multichoice "Explorer Restart" "You need to restart File Explorer to fully apply the changes." "Restart now"`) do ( - if "%%a" == "Restart now" ( - taskkill /f /im explorer.exe > nul 2>&1 - start explorer.exe - ) -) - -echo Finished, changes have been applied. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Disable News and Interests.reg b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Disable News and Interests.reg deleted file mode 100644 index 9bc20787c1..0000000000 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Disable News and Interests.reg +++ /dev/null @@ -1,17 +0,0 @@ -Windows Registry Editor Version 5.00 -; Atlas default - -[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Feeds] -"ShellFeedsTaskbarViewMode"=dword:00000002 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds] -"EnableFeeds"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh] -"AllowNewsAndInterests"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests\AllowNewsAndInterests] -"value"=dword:00000000 - -[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -"TaskbarDa"=dword:00000000 diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Enable News and Interests.reg b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Enable News and Interests.reg deleted file mode 100644 index 1773b99906..0000000000 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows 11 Taskbar/Enable News and Interests.reg +++ /dev/null @@ -1,16 +0,0 @@ -Windows Registry Editor Version 5.00 -; Windows default - -[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Feeds] -"ShellFeedsTaskbarViewMode"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds] -"EnableFeeds"=dword:00000001 - -[-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh] - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests\AllowNewsAndInterests] -"value"=dword:00000001 - -[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -"TaskbarDa"=dword:00000001 diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows Copilot/Enable Windows Copilot.cmd b/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows Copilot/Enable Windows Copilot.cmd deleted file mode 100644 index 8de1a35bc7..0000000000 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/Windows Copilot/Enable Windows Copilot.cmd +++ /dev/null @@ -1,68 +0,0 @@ -@echo off - -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( - echo You must run this script as admin. - exit /b 1 - ) - exit /b -) - -if not exist "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" goto msedgeInstall - -:main -taskkill /f /im explorer.exe > nul 2>&1 -reg delete "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v "TurnOffWindowsCopilot" /f > nul 2>&1 -reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowCopilotButton" /t REG_DWORD /d "1" /f > nul -start explorer.exe - -echo Finished, changes are applied. -echo Press any key to exit... -pause > nul -exit /b - -:::::::::::::::::: -:: Edge install :: -:::::::::::::::::: - -:msedgeInstall -echo Microsoft Edge is requried to be installed for Windows Copilot. -choice /c:yn /n /m "Would you like to install it now? [Y/N]" -if %errorlevel%==2 ( - cls - echo You must have Edge installed to enable Copilot. - echo Press any key to exit... - pause > nul - exit /b 1 -) - -cls - -:: Check if WinGet is functional or not -:: If not, go to download page for Edge instead of using WinGet -echo Checking for WinGet... -call "%windir%\AtlasModules\Scripts\wingetCheck.cmd" /silent -if %ERRORLEVEL% NEQ 0 goto edgeFail - -:: Install Edge with WinGet -echo Installing Microsoft Edge with WinGet... -echo] -winget install -e --id Microsoft.Edge -h --accept-source-agreements --accept-package-agreements --force -if %ERRORLEVEL% NEQ 0 ( - echo Edge install with WinGet failed. - echo] - goto edgeFail -) - -echo] -echo Edge installed successfully! Enabling Copilot... -timeout /t 3 /nobreak > nul -goto main - -:edgeFail -start https://www.microsoft.com/en-us/edge/download -echo You must download Edge manually before you enable Copilot. -echo Press any key to exit... -pause > nul -exit /b 2 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/ExplorerPatcher.url b/src/playbook/Executables/AtlasDesktop/5. Windows Settings/Default Graphics Settings (HAGS).url similarity index 53% rename from src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/ExplorerPatcher.url rename to src/playbook/Executables/AtlasDesktop/5. Windows Settings/Default Graphics Settings (HAGS).url index 8919191955..2d1dec656d 100644 --- a/src/playbook/Executables/AtlasDesktop/4. Optional Tweaks/ExplorerPatcher.url +++ b/src/playbook/Executables/AtlasDesktop/5. Windows Settings/Default Graphics Settings (HAGS).url @@ -1,5 +1,5 @@ [{000214A0-0000-0000-C000-000000000046}] -Prop3=19,11 +Prop3=19,0 [InternetShortcut] IDList= -URL=https://github.com/valinet/ExplorerPatcher +URL=ms-settings:display-advancedgraphics-default diff --git a/src/playbook/Executables/AtlasDesktop/5. Windows Settings/Windows Settings Documentation.url b/src/playbook/Executables/AtlasDesktop/5. Windows Settings/Windows Settings Documentation.url new file mode 100644 index 0000000000..53d8ea2aa9 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/5. Windows Settings/Windows Settings Documentation.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/post-installation/atlas-folder/windows-settings/ diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd index 5c64f18521..9de265e41f 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/Appearance/Spinning Animation.cmd @@ -18,12 +18,10 @@ if %ERRORLEVEL% == 1 ( ) :disable -echo] bcdedit /set {globalsettings} custom:16000069 true > nul goto finish :enable -echo] bcdedit /deletevalue {globalsettings} custom:16000069 > nul 2>&1 goto finish diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/README.txt b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/README.txt deleted file mode 100644 index 8d384462e0..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Boot Configuration/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -Here you can change the boot configuration for Windows, which can modify the quality of life and pre-boot behavior. - -You can either completely mess things up or potentially (unlikely) improve performance with experimental options. - -There might also be undocumented options. \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd deleted file mode 100644 index 0a0d303583..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/DSCP/Add Game to DSCP Policy.cmd +++ /dev/null @@ -1,25 +0,0 @@ -@echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) - -for /f "tokens=* delims=\" %%i in ('filepicker.exe exe') do ( - if "%%i" == "cancelled by user" exit /b 1 - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Application Name" /t REG_SZ /d "%%~ni%%~xi" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "DSCP Value" /t REG_SZ /d "46" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Local IP Prefix Length" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Local IP" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Local Port" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Protocol" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Remote IP Prefix Length" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Remote IP" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Remote Port" /t REG_SZ /d "*" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Throttle Rate" /t REG_SZ /d "-1" /f > nul - reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\QoS\%%~ni%%~xi" /v "Version" /t REG_SZ /d "1.0" /f > nul -) - -echo Finished, please reboot your device for changes to apply. -pause -exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/AutoGpuAffinity.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/AutoGpuAffinity.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/AutoGpuAffinity.url rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/AutoGpuAffinity.url diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/GoInterruptPolicy.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/GoInterruptPolicy.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/GoInterruptPolicy.url rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/GoInterruptPolicy.url diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/Interrupt Affinity Tool.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/Interrupt Affinity Tool.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Affinity/Interrupt Affinity Tool.url rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/Interrupt Affinity Tool.url diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/MSI Utility V3.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/MSI Utility V3.url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/MSI Utility V3.url rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Driver Configuration/MSI Utility V3.url diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Lanman Workstation (SMB)/Disable Lanman Workstation.cmd diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd similarity index 100% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Lanman Workstation (SMB)/Enable Lanman Workstation (default).cmd diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Must Read First.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Must Read First (Documentation).url similarity index 100% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Must Read First.url rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Must Read First (Documentation).url diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd index df8c6cf567..ca6744b7ac 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Disable Container Context Menu.cmd @@ -1,9 +1,11 @@ @echo off +set "___args="%~f0" %*" fltmc > nul 2>&1 || ( echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( echo You must run this script as admin. + if "%*"=="" pause exit /b 1 ) exit /b diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd index 19209401ff..3f99dfe972 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Context Menu/Enable Container Context Menu.cmd @@ -1,9 +1,11 @@ @echo off +set "___args="%~f0" %*" fltmc > nul 2>&1 || ( echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( echo You must run this script as admin. + if "%*"=="" pause exit /b 1 ) exit /b @@ -27,14 +29,15 @@ reg add "HKCR\DesktopBackground\Shell\NVIDIAContainer" /v "Position" /t REG_SZ / reg add "HKCR\DesktopBackground\Shell\NVIDIAContainer" /v "SubCommands" /t REG_SZ /d "" /f > nul reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001" /v "HasLUAShield" /t REG_SZ /d "" /f > nul reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001" /v "MUIVerb" /t REG_SZ /d "Enable NVIDIA Display Container LS" /f > nul -reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. Configuration\NVIDIA Display Container\Enable NVIDIA Display Container LS.cmd"" /f > nul +reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer001\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. General Configuration\NVIDIA Display Container\Enable NVIDIA Display Container LS.cmd"" /f > nul reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002" /v "HasLUAShield" /t REG_SZ /d "" /f > nul reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002" /v "MUIVerb" /t REG_SZ /d "Disable NVIDIA Display Container LS" /f > nul -reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. Configuration\NVIDIA Display Container\Disable NVIDIA Display Container LS.cmd"" /f > nul +reg add "HKCR\DesktopBackground\shell\NVIDIAContainer\shell\NVIDIAContainer002\command" /ve /t REG_SZ /d "\"%windir%\AtlasDesktop\3. General Configuration\NVIDIA Display Container\Disable NVIDIA Display Container LS.cmd"" /f > nul taskkill /f /im explorer.exe > nul 2>&1 start explorer.exe +echo] echo Finished, changes have been applied. pause exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd index 827bc5f7e1..7c6cdf787a 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Disable NVIDIA Display Container LS.cmd @@ -21,7 +21,7 @@ echo] echo You can enable the NVIDIA Control Panel and the service again by running the enable script. echo Additionally, you can add a context menu to the desktop with another script in the Atlas folder. echo] -echo Read README.txt for more info. +echo See 'Must Read First' for more info. echo] pause diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Must Read First.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Must Read First.url new file mode 100644 index 0000000000..72a2e4ca45 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/Must Read First.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/post-installation/atlas-folder/advanced-configuration/#nvidia-display-container diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/README.txt b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/README.txt deleted file mode 100644 index 7a917c6ce6..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/NVIDIA Display Container/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -Disabling "NVIDIA Display Container LS" ------------------------------------------ -This allows you to enable/disable the 'NVIDIA Display Container LS service', which connects to a few NVIDIA IPs and uses a tiny bit of CPU usage. -These scripts are aimed at users that have a stripped driver, and people that barely touch the NVIDIA Control Panel. - -Warning: -Disabling the "NVIDIA Display Container LS" service will make it so you cannot use NVIDIA Control Panel and other NVIDIA driver features! -However, you can enable it again and add a context menu to the desktop for easily enabling/disabling it. \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Install Process Explorer.cmd similarity index 72% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Install Process Explorer.cmd index 6b69e38bfb..1d506fe1ac 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Install Process Explorer.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Install Process Explorer.cmd @@ -1,8 +1,9 @@ @echo off +set "___args="%~f0" %*" fltmc > nul 2>&1 || ( echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( echo You must run this script as admin. pause & exit /b 1 ) @@ -22,7 +23,7 @@ if %ERRORLEVEL% NEQ 0 ( ) echo Creating the Start menu shortcut... -PowerShell -NoP -C "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut("""$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk"""); $Shortcut.TargetPath = """$env:windir\AtlasModules\Apps\ProcessExplorer\process-explorer.exe"""; $Shortcut.Save()" > nul +PowerShell -NoP -C "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut("""$([Environment]::GetFolderPath('CommonStartMenu'))\Programs\Process Explorer.lnk"""); $Shortcut.TargetPath = """$([Environment]::GetFolderPath('Windows'))\AtlasModules\Apps\ProcessExplorer\procexp.exe"""; $Shortcut.Save()" > nul if %ERRORLEVEL% NEQ 0 ( echo Process Explorer shortcut could not be created in the start menu! ) @@ -31,8 +32,7 @@ echo Configuring Process Explorer... :: Run Process Explorer only in one instance reg add "HKCU\SOFTWARE\Sysinternals\Process Explorer" /v "OneInstance" /t REG_DWORD /d "1" /f > nul sc config pcw start=disabled > nul -sc stop pcw > nul 2>&1 -reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe" /v "Debugger" /t REG_SZ /d "%windir%\AtlasModules\Apps\ProcessExplorer\process-explorer.exe" /f > nul +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe" /v "Debugger" /t REG_SZ /d "%windir%\AtlasModules\Apps\ProcessExplorer\procexp.exe" /f > nul echo] echo Finished, changes have been applied. diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Uninstall Process Explorer.cmd similarity index 88% rename from src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd rename to src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Uninstall Process Explorer.cmd index f3c581daab..b49b599c95 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/Process Explorer/Uninstall Process Explorer.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Process Explorer/Uninstall Process Explorer.cmd @@ -1,8 +1,9 @@ @echo off +set "___args="%~f0" %*" fltmc > nul 2>&1 || ( echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( echo You must run this script as admin. pause & exit /b 1 ) @@ -21,7 +22,6 @@ if %ERRORLEVEL% NEQ 0 echo info: Process Explorer uninstallation failed, reverti :otherChanges sc config pcw start=boot > nul -sc start pcw > nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe" /v "Debugger" /f > nul 2>&1 del /f /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk" > nul diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd index aefe4837d0..54f4a1a328 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Static IP/Automatically Set Static IP.cmd @@ -5,22 +5,21 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -ping -n 1 -4 www.example.com > nul 2>&1 -if %ERRORLEVEL% == 1 ( +ping -n 1 -4 www.example.com > nul 2>&1 || ( echo You must have an internet connection to use this script. pause exit /b 1 ) -set /P DNS1="Set primary DNS Server (e.g. 1.1.1.1): " -set /P DNS2="Set alternate DNS Server (e.g. 1.0.0.1): " -for /f "tokens=4" %%a in ('netsh int show interface ^| find "Connected"') do set "DeviceName=%%a" +set /P DNS1="Set primary DNS Server (e.g. 1.1.1.1): " || set DNS1=1.1.1.1 +set /P DNS2="Set alternate DNS Server (e.g. 1.0.0.1): " || set DNS1=1.0.0.1 +for /f "tokens=*" %%a in ('powershell -NonI -NoP -C "(Get-NetAdapter -Physical | ? { $_.Status -eq 'Up' }).Name"') do set "DeviceName=%%a" for /f "tokens=3" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr "IP Address:"') do set "LocalIP=%%a" for /f "tokens=3" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr "Default Gateway:"') do set "DHCPGateway=%%a" for /f "tokens=2 delims=()" %%a in ('netsh int ip show config name^="%DeviceName%" ^| findstr /r "(.*)"') do for %%i in (%%a) do set "DHCPSubnetMask=%%i" :: Check for errors and exit if invalid -cls +echo] if "%DeviceName%" == "" set "incorrectIP=1" call :isValidIP %LocalIP% call :isValidIP %DHCPGateway% @@ -29,17 +28,15 @@ call :isValidIP %DNS1% call :isValidIP %DNS2% if "%incorrectIP%" == "1" ( - echo Setting a Static IP address failed. + echo Setting a Static IP address failed, as something detected was invalid. pause exit /b 1 ) -:: Set Static IP -netsh int ipv4 set address name="%DeviceName%" static %LocalIP% %DHCPSubnetMask% %DHCPGateway% > nul 2>&1 -netsh int ipv4 set dns name="%DeviceName%" static %DNS1% primary > nul 2>&1 -netsh int ipv4 add dns name="%DeviceName%" %DNS2% index=2 > nul 2>&1 - :: Display details about the connection +echo ---------------------------- +echo Settings to be applied +echo ---------------------------- echo Interface: %DeviceName% echo Private IP: %LocalIP% echo Subnet Mask: %DHCPSubnetMask%% @@ -48,10 +45,14 @@ echo Primary DNS: %DNS1% echo Alternate DNS: %DNS2% echo] echo If this information appears to be incorrect or is blank, please report it on Discord or GitHub. +echo] +echo Press any key to apply... +pause > nul -:: Disable DHCP service, not needed when using Static IP -call setSvc.cmd Dhcp 4 -sc stop Dhcp > nul 2>&1 +:: Set Static IP +netsh int ipv4 set address name="%DeviceName%" static %LocalIP% %DHCPSubnetMask% %DHCPGateway% > nul 2>&1 +netsh int ipv4 set dns name="%DeviceName%" static %DNS1% primary > nul 2>&1 +netsh int ipv4 add dns name="%DeviceName%" %DNS2% index=2 > nul 2>&1 echo Completed. pause diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/GameUtil.url b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/GameUtil.url deleted file mode 100644 index 238f4f6fd4..0000000000 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Utilities/GameUtil.url +++ /dev/null @@ -1,2 +0,0 @@ -[InternetShortcut] -URL=https://github.com/Atlas-OS/Atlas-Utilities/releases?q=gameutil-rs&expanded=true diff --git a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Wi-Fi/Disable Wi-Fi.cmd b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Wi-Fi/Disable Wi-Fi.cmd index 6efed78825..772c17ddfe 100644 --- a/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Wi-Fi/Disable Wi-Fi.cmd +++ b/src/playbook/Executables/AtlasDesktop/6. Advanced Configuration/Wi-Fi/Disable Wi-Fi.cmd @@ -9,7 +9,8 @@ call setSvc.cmd vwififlt 4 call setSvc.cmd WlanSvc 4 echo Applications like Microsoft Store and Spotify may not function correctly when Wi-Fi is disabled. -echo If this is a problem, enable Wi-Fi and restart the computer. +echo There might be other issues as well, therefore, we do not recommend it. +pause echo] echo Finished, please reboot your device for changes to apply. pause diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Core Isolation (VBS)/Current Configuration.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Core Isolation (VBS)/Current Configuration.cmd index 62f88a572f..dc1b324871 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Core Isolation (VBS)/Current Configuration.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Core Isolation (VBS)/Current Configuration.cmd @@ -2,7 +2,8 @@ set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\ConfigVBS.ps1" if not exist "%script%" ( echo Script not found. - echo %script% + echo "%script%" + pause exit /b 1 ) -powershell -EP Bypass -NoP Unblock-File -Path """$env:script""" -EA 0; ^& """$env:script""" %* \ No newline at end of file +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd index b2d92c0632..8ba61ff511 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Defender/Toggle Defender.cmd @@ -1,117 +1,21 @@ -<# : batch portion @echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\ToggleDefender.ps1" +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 ) -set args= & set "args1=%*" -if defined args1 set "args=%args1:"='%" -PowerShell -NoP "& ([Scriptblock]::Create((Get-Content '%~f0' -Raw))) %args%" -exit /b %ERRORLEVEL% -: end batch / begin PowerShell #> - -param ( - [switch]$NextStartup +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) + exit /b ) -if ($NextStartup) { - $message = "Atlas can't configure the Windows Defender settings after removal. Clicking 'OK' will take you to the Defender settings page." - if ((New-Object -ComObject "Wscript.Shell").Popup($message,20,'Windows Defender Configuration - Atlas',0+64) -eq 1) { - Start-Process 'windowsdefender://threat' - } - exit -} - -$ProgressPreference = 'SilentlyContinue' -function PauseNul ($message = "Press any key to exit... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null -} - -$packages = (Get-WindowsPackage -online | Where-Object { $_.PackageName -like "*NoDefender*" }).PackageName -if (!$?) { - Write-Host "Failed to get packages!" -ForegroundColor Red - PauseNul; exit 1 -} -if ($null -eq $packages) {$DefenderEnabled = '(current)'} else {$DefenderDisabled = '(current)'} - -function Menu { - Clear-Host - $ColourDisable = 'White'; $ColourEnable = $ColourDisable - if ($DefenderDisabled) {$ColourDisable = 'Gray'} else {$ColourEnable = 'Gray'} - - Write-Host "Disabling Defender will automatically restart your computer.`n" -ForegroundColor Blue - - Write-Host "1) Disable Defender $DefenderDisabled" -ForegroundColor $ColourDisable - Write-Host "2) Enable Defender $DefenderEnabled`n" -ForegroundColor $ColourEnable - - Write-Host "Choose 1 or 2: " -NoNewline -ForegroundColor Yellow - $pageInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') - - switch ($pageInput.Character) { - # Disable Defender - 1 { - if ($DefenderDisabled) {Menu} - Clear-Host; Write-Host "Are you sure that you want to disable Defender?" -ForegroundColor Red - Write-Host "Although disabling Windows Defender will improve performance and convienience, it's important for security.`n" - Write-Host "Your computer will restart automatically if you proceed.`n" -ForegroundColor Yellow - - Pause; Clear-Host - Write-Host "Disabling Defender... Your computer will auto-restart.`n" -ForegroundColor Green - & "$env:windir\AtlasModules\PackagesEnvironment\centralScript.ps1" -DefenderOnly - if ($lastexitcode -ne 1) { - Write-Host "Something went wrong disabling Defender." -ForegroundColor Red - Write-Host "See the documentation: https://docs.atlasos.net/troubleshooting-and-faq/failed-component-removal" - PauseNul; exit $exitcode - } - PauseNul - } - # Enable Defender - 2 { - if ($DefenderEnabled) {Menu} - Clear-Host; Write-Host "Enabling Defender..." -ForegroundColor Yellow - foreach ($package in $packages) { - try { - Remove-WindowsPackage -Online -PackageName $package -NoRestart -LogLevel 1 *>$null - } catch { - Write-Host "Something went wrong removing the package: $package" -ForegroundColor Red - Write-Host "$_`n" -ForegroundColor Red - PauseNul; exit 1 - } - } - - $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries - $trigger = New-ScheduledTaskTrigger -AtLogon - $taskArgs = @{ - 'Trigger' = $trigger - 'Settings' = $settings - 'User' = (Get-CimInstance -ClassName Win32_ComputerSystem).UserName -replace ".*\\" - 'RunLevel' = 'Highest' - 'Force' = $true - } - - $arguments = '/c title Finalizing installation - Atlas & echo Do not close this window. & schtasks /delete /tn "AtlasDefenderConfigurationPrompt" /f > nul & ' ` - + 'PowerShell -NoP -EP Bypass -WindowStyle Hidden -C "& $(Join-Path $env:windir ''\AtlasDesktop\5. Security\Defender\Toggle Defender.cmd'') -NextStartup ' - $action = New-ScheduledTaskAction -Execute 'cmd' -Argument $arguments - Register-ScheduledTask -TaskName 'AtlasDefenderConfigurationPrompt' -Action $action @taskArgs | Out-Null - - Write-Host "`nCompleted!" -ForegroundColor Green - choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " - if ($lastexitcode -eq 1) { - Restart-Computer - } else { - Write-Host "`nChanges will apply after next restart." -ForegroundColor Yellow - Start-Sleep 2; exit - } - exit - } - default { - # Do nothing - Menu - } - } -} - -Menu \ No newline at end of file +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd index ea85ea8624..1d8a513537 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd @@ -4,10 +4,10 @@ setlocal EnableDelayedExpansion if "%~1"=="/main" goto main echo WARNING: This will force enable all security mitigiations for improved security. -echo This will slow down performance (especially on older CPUs). -echo It is recommended to use 'Set Windows Default Mitigations.cmd' instead. +echo This will slow down performance, and worsen compatibility. It is +echo recommended to use 'Set Windows Default Mitigations.cmd' instead. echo] -timeout /nobreak /t 1 > nul +ping 127.0.0.1 -n 2 > nul echo Press any key to continue anyways... pause > nul cls diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Security Documentation.url b/src/playbook/Executables/AtlasDesktop/7. Security/Security Documentation.url new file mode 100644 index 0000000000..91b1ba4d67 --- /dev/null +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Security Documentation.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/ diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Fix Errors 2502 and 2503.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Fix Errors 2502 and 2503.cmd index 0243ac131d..53856ecdd6 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Fix Errors 2502 and 2503.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Fix Errors 2502 and 2503.cmd @@ -13,38 +13,27 @@ echo This script will fix errors 2502 and 2503 with Windows installers by resett echo This issue is not related to Atlas. echo] pause -cls +echo] echo Taking ownership of TEMP folder as SYSTEM... -echo ------------------------------------- takeown /f "%folder%" /r /d y > nul -echo Done. -echo] echo Clearing all current permissions... -echo ------------------------------------- icacls "%folder%" /inheritance:e > nul icacls "%folder%" /reset > nul icacls "%folder%" /inheritance:r > nul -echo Done. -echo] echo Setting default permissions... -echo ------------------------------------- :: (OI)(CI) - applies recursively :: F - full control :: AD - create folders / append data :: X - traverse folder / execute file :: WD - create files / write data icacls "%windir%\Temp" /grant:r "*S-1-5-32-545:(OI)(CI)F" /grant:r "*S-1-5-18:(OI)(CI)F" /grant:r "*S-1-3-0:(OI)(CI)F" /grant:r "*S-1-5-11:(OI)(CI)(X,AD,WD)" /t > nul -echo Done. -echo] echo Clearing Windows temporary files... -echo ------------------------------------- :: no error checking as some files and folders will be in use del /s /f /q "%folder%\*.*" > nul 2>&1 -echo Done. echo] echo Completed. diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd index cb119b7f8f..cf0d8a5a60 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd @@ -5,26 +5,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -echo Applying changes... - -:: Disable Nagle's Algorithm -:: https://en.wikipedia.org/wiki/Nagle%27s_algorithm -for /f %%a in ('wmic path win32_networkadapter get GUID ^| findstr "{"') do ( - reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\%%a" /v "TcpAckFrequency" /t REG_DWORD /d "1" /f > nul - reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\%%a" /v "TcpDelAckTicks" /t REG_DWORD /d "0" /f > nul - reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\%%a" /v "TCPNoDelay" /t REG_DWORD /d "1" /f > nul -) - -:: https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.QualityofService::QosNonBestEffortLimit -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Psched" /v "NonBestEffortLimit" /t REG_DWORD /d "0" /f > nul -:: https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.QualityofService::QosTimerResolution -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Psched" /v "TimerResolution" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\QoS" /v "Do not use NLA" /t REG_DWORD /d "1" /f > nul -:: reg add "HKLM\SYSTEM\CurrentControlSet\Services\AFD\Parameters" /v "DoNotHoldNicBuffers" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v "EnableMulticast" /t REG_DWORD /d "0" /f > nul - -:: Set default power saving mode for all network cards to disabled -reg add "HKLM\SYSTEM\CurrentControlSet\Services\NDIS\Parameters" /v "DefaultPnPCapabilities" /t REG_DWORD /d "24" /f > nul +echo Setting network settings to Atlas defaults... :: Set network adapter driver registry key for /f %%a in ('wmic path Win32_NetworkAdapter get PNPDeviceID^| findstr /L "PCI\VEN_"') do ( @@ -33,76 +14,53 @@ for /f %%a in ('wmic path Win32_NetworkAdapter get PNPDeviceID^| findstr /L "PCI ) > nul 2>&1 ) -:: Configure internet adapter settings -:: Dump of all possible settings found -:: TO DO: revise and document each setting +:: Configure network adapter settings + +rem -------------------------- +rem Unknown benefit +rem -------------------------- +rem "LargeSendOffload" +rem "LargeSendOffloadJumboCombo" +rem "LsoV1IPv4" +rem "LsoV2IPv4" +rem "LsoV2IPv6" +rem "LogLevelWarn" +rem "AlternateSemaphoreDelay" +rem "DeviceSleepOnDisconnect" +rem "EnableModernStandby" +rem "PriorityVLANTag" +rem "Node" +rem "MPC" +rem "PowerDownPll" +rem "PMWiFiRekeyOffload" +rem "ARPOffloadEnable" +rem "bAdvancedLPs" +rem "NSOffloadEnable" +rem "GTKOffloadEnable" +rem "Enable9KJFTpt" +rem "EnableEDT" +rem "GPPSW" +rem "MasterSlave" +rem "PacketCoalescing" +rem Could cause dropped network frames +rem "FlowControl" +rem "FlowControlCap" + for %%a in ( - "AdvancedEEE" - "AlternateSemaphoreDelay" - "ApCompatMode" - "ARPOffloadEnable" + rem Don't disable gigabit "AutoDisableGigabit" - "AutoPowerSaveModeEnabled" - "bAdvancedLPs" - "bLeisurePs" - "bLowPowerEnable" - "DeviceSleepOnDisconnect" - "DMACoalescing" - "EEE" - "EEELinkAdvertisement" - "EeePhyEnable" - "Enable9KJFTpt" - "EnableConnectedPowerGating" - "EnableDynamicPowerGating" - "EnableEDT" - "EnableGreenEthernet" - "EnableModernStandby" - "EnablePME" - "EnablePowerManagement" - "EnableSavePowerNow" - "EnableWakeOnLan" - "FlowControl" - "FlowControlCap" - "GigaLite" - "GPPSW" - "GTKOffloadEnable" - "InactivePs" - "LargeSendOffload" - "LargeSendOffloadJumboCombo" - "LogLevelWarn" - "LsoV1IPv4" - "LsoV2IPv4" - "LsoV2IPv6" - "MasterSlave" - "ModernStandbyWoLMagicPacket" - "MPC" - "NicAutoPowerSaver" - "Node" - "NSOffloadEnable" - "PacketCoalescing" - rem Offload "PMARPOffload" - rem Offload "PMNSOffload" - "PMWiFiRekeyOffload" - "PowerDownPll" - "PowerSaveMode" - "PowerSavingMode" - "PriorityVLANTag" - "ReduceSpeedOnPowerDown" - "S5WakeOnLan" - "SavePowerNowEnabled" - "SelectiveSuspend" + + rem Access Point Compatibility Mode + rem Zero is 'High Performance' + "ApCompatMode" + + rem About reducing link speed "SipsEnabled" - "uAPSDSupport" - "ULPMode" - "WaitAutoNegComplete" - "WakeOnDisconnect" - "WakeOnLink" - "WakeOnMagicPacket" - "WakeOnPattern" - "WakeOnSlot" - "WakeUpModeCap" - "WoWLANLPSLevel" - "WoWLANS5Support" + "ReduceSpeedOnPowerDown" + + rem 'may increase latency' + rem https://www.intel.com/content/www/us/en/support/articles/000007456/ethernet-products.html + "DMACoalescing" ) do ( rem Check without '*' for /f %%b in ('reg query "%netKey%" /v "%%~a" ^| findstr "HKEY"') do ( @@ -114,10 +72,7 @@ for %%a in ( ) ) > nul 2>&1 -:: Configure netsh settings -netsh int tcp set supplemental Internet congestionprovider=ctcp > nul -netsh interface Teredo set state type=enterpriseclient > nul -netsh interface Teredo set state servername=default > nul +if "%~1"=="/silent" exit /b echo Finished, please reboot your device for changes to apply. pause diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd index 0d1b2dcfb5..68d21f1d86 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Windows Default.cmd @@ -5,12 +5,18 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( exit /b ) -echo Applying changes... +echo Resetting network settings to Windows defaults... -netsh int ip reset > nul -netsh winsock reset > nul +( + netsh int ip reset + netsh interface ipv4 reset + netsh interface ipv6 reset + netsh interface tcp reset + netsh winsock reset +) > nul -PowerShell -NoP -C "foreach ($dev in Get-PnpDevice -Class Net -Status 'OK') {pnputil /remove-device $dev.InstanceId | Out-Null }; pnputil /scan-devices | Out-Null" +PowerShell -NoP -C "foreach ($dev in Get-PnpDevice -Class Net -Status 'OK') { pnputil /remove-device $dev.InstanceId }" > nul +pnputil /scan-devices > nul echo Finished, please reboot your device for changes to apply. pause diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Telemetry Components.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Telemetry Components.cmd index 3ab6d97f82..487fe5fe29 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Telemetry Components.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Telemetry Components.cmd @@ -1,91 +1,21 @@ -<# : batch portion @echo off +set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\TelemetryComponents.ps1" +if not exist "%script%" ( + echo Script not found. + echo "%script%" + pause + exit /b 1 +) -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* +set "___args="%~f0" %*" +fltmc > nul 2>&1 || ( + echo Administrator privileges are required. + powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( + echo You must run this script as admin. + if "%*"=="" pause + exit /b 1 + ) exit /b ) -set args= & set "args1=%*" -if defined args1 set "args=%args1:"='%" -PowerShell -NoP "& ([Scriptblock]::Create((Get-Content '%~f0' -Raw))) %args%" -exit /b %ERRORLEVEL% -: end batch / begin PowerShell #> - -$ProgressPreference = 'SilentlyContinue' -function PauseNul ($message = "Press any key to exit... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null -} - -$packages = (Get-WindowsPackage -online | Where-Object { $_.PackageName -like "*NoTelemetry*" }).PackageName -if (!$?) { - Write-Host "Failed to get packages!" -ForegroundColor Red - PauseNul; exit 1 -} -if ($null -eq $packages) {$TelemetryEnabled = '(current)'} else {$TelemetryDisabled = '(current)'} - -function Menu { - Clear-Host - $ColourDisable = 'White'; $ColourEnable = $ColourDisable - if ($TelemetryDisabled) {$ColourDisable = 'Gray'} else {$ColourEnable = 'Gray'} - - Write-Host @" -This script will remove or add the package that removes telemetry components in Windows. -Enabling telemetry will damage user privacy, but also is a more supported configuration of Windows. - -Your computer will auto-restart if you disable it.`n -"@ -ForegroundColor Blue - - Write-Host "1) Disable telemetry components $TelemetryDisabled" -ForegroundColor $ColourDisable - Write-Host "2) Enable telemetry components $TelemetryEnabled`n" -ForegroundColor $ColourEnable - - Write-Host "Choose 1 or 2: " -NoNewline -ForegroundColor Yellow - $pageInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') - - switch ($pageInput.Character) { - # Disable Defender - 1 { - if ($TelemetryDisabled) {Menu} - Clear-Host; Write-Host "Disabling telemetry... Your computer will auto-restart.`n" -ForegroundColor Green - & "$env:windir\AtlasModules\PackagesEnvironment\centralScript.ps1" -EverythingButDefender - if ($lastexitcode -ne 1) { - Write-Host "Something went wrong disabling telemetry." -ForegroundColor Red - Write-Host "See the documentation: https://docs.atlasos.net/troubleshooting-and-faq/failed-component-removal" - PauseNul; exit $exitcode - } - PauseNul - } - # Enable Defender - 2 { - if ($TelemetryEnabled) {Menu} - Clear-Host - Write-Host "Enabling telemetry..." -ForegroundColor Yellow - foreach ($package in $packages) { - try { - Remove-WindowsPackage -Online -PackageName $package -NoRestart -LogLevel 1 *>$null - } catch { - Write-Host "Something went wrong removing the package: $package" -ForegroundColor Red - Write-Host "$_`n" -ForegroundColor Red - PauseNul; exit 1 - } - } - - Write-Host "`nCompleted!" -ForegroundColor Green - choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " - if ($lastexitcode -eq 1) { - Restart-Computer - } else { - Write-Host "`nChanges will apply after next restart." -ForegroundColor Yellow - Start-Sleep 2; exit - } - exit - } - default { - # Do nothing - Menu - } - } -} - -Menu \ No newline at end of file +powershell -EP Bypass -NoP ^& """$env:script""" %* \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd643.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd643.0.0.0.cab deleted file mode 100644 index 5c413d8943..0000000000 Binary files a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd643.0.0.0.cab and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd644.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd644.0.0.0.cab new file mode 100644 index 0000000000..fce6ea003f Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35amd644.0.0.0.cab differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm643.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm643.0.0.0.cab deleted file mode 100644 index 1690cc630e..0000000000 Binary files a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm643.0.0.0.cab and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm644.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm644.0.0.0.cab new file mode 100644 index 0000000000..a354959cb4 Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoDefender-Package31bf3856ad364e35arm644.0.0.0.cab differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd643.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd643.0.0.0.cab deleted file mode 100644 index cac4dd10ca..0000000000 Binary files a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd643.0.0.0.cab and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd644.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd644.0.0.0.cab new file mode 100644 index 0000000000..48763e0c4d Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35amd644.0.0.0.cab differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm643.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm643.0.0.0.cab deleted file mode 100644 index b362b1b8be..0000000000 Binary files a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm643.0.0.0.cab and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm644.0.0.0.cab b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm644.0.0.0.cab new file mode 100644 index 0000000000..ba937a2b9c Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Packages/Z-Atlas-NoTelemetry-Package31bf3856ad364e35arm644.0.0.0.cab differ diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/centralScript.ps1 b/src/playbook/Executables/AtlasModules/PackagesEnvironment/centralScript.ps1 deleted file mode 100644 index dca7a11b56..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/centralScript.ps1 +++ /dev/null @@ -1,236 +0,0 @@ -#Requires -RunAsAdministrator - -param ( - [switch]$DefenderOnly, - [switch]$EverythingButDefender, - [switch]$PlaybookInstall, - [switch]$Verbose, - [switch]$WinRE -) - -$ProgressPreference = 'SilentlyContinue' -if ($PlaybookInstall) { $Verbose = $true } - -# ======================================================================================================================= # -# FUNCTIONS # -# ======================================================================================================================= # -function PauseNul ($message = "Press any key to exit... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null -} - -function SafeMode { - param ( - [switch]$Enable - ) - - if ($Enable) { - $bcdeditArgs = '/set {current} safeboot minimal' - $shellValue = "PowerShell -NoP -EP Bypass -File `"$envPath\centralScript.ps1`" $arguments" - } else { - $bcdeditArgs = '/deletevalue {current} safeboot' - $shellValue = 'explorer.exe' - } - - Start-Process -File 'bcdedit' -ArgumentList $bcdeditArgs -WindowStyle Hidden - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name Shell -Value $shellValue -Force -} - -function Restart { - shutdown /f /r /t 0 *>$null - Start-Sleep 2 - Restart-Computer - Start-Sleep 2 - Write-Host "Something seems to have went wrong restarting automatically, restart manually." -ForegroundColor Red - PauseNul - exit -} - -function Write-Log { - $args | Out-File "$sessionLogDirectory\onlineSxsLog.log" -Append -Force -} - -function Write-Info { - param ( - [string]$Text, - [switch]$NewLine, - [switch]$UseError, - [switch]$DisplayAlways - ) - - if ($Verbose -or $DisplayAlways) { - if ($UseError) { - Write-Host "ERROR: " -NoNewLine -ForegroundColor Red - } else { - Write-Host "INFO: " -NoNewLine -ForegroundColor Blue - } - Write-Host "$Text" - } - - if ($NewLine) { Write-Host "" } - Write-Log "$Text" -} - -# ======================================================================================================================= # -# VARIABLES # -# ======================================================================================================================= # -$arm = ((Get-WmiObject -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') -$modules = "$env:windir\AtlasModules" - -# Create log folder -$atlasLogDirectory = "$modules\Logs" -if (!(Test-Path $atlasLogDirectory)) { New-Item -Path $atlasLogDirectory -Force -ItemType Directory | Out-Null } -do { - $sessionLogDirectory = "$atlasLogDirectory\$($num++; $num)-AtlasOnlinePackageInstall-$((Get-Date).ToString('dd-MM-yyyy'))" -} until (!(Test-Path $sessionLogDirectory)) -New-Item -Path $sessionLogDirectory -Force -ItemType Directory | Out-Null - -$envPath = "$modules\PackagesEnvironment" -$useWinreIndicator = "$envPath\AtlasUseWindowsRecovery" -$safeModePackageList = "$modules\safeModePackagesToInstall" -$winrePackageList = "$modules\winrePackagesToInstall" -$safeMode = (Get-WmiObject Win32_ComputerSystem).BootupState -ne 'Normal boot' -$safeModeWithList = $safeMode -and (Test-Path $safeModePackageList) -if ($safeModeWithList) { SafeMode } - -# ======================================================================================================================= # -# PACKAGE LIST # -# ======================================================================================================================= # -if (!$safeModeWithList) { - $packageList = (Get-ChildItem "$env:windir\AtlasModules\Packages\*.cab").FullName | Where-Object {$_ -like "*$(if ($arm) {'arm64'} else {'amd64'})*"} - - if ($DefenderOnly) { - $packageList = $packageList | Where-Object { $_ -like '*NoDefender*' } - } elseif ($EverythingButDefender) { - $packageList = $packageList | Where-Object { $_ -notlike '*NoDefender*' } - } -} else { - $packageList = Get-Content $safeModePackageList -} - -foreach ($a in $packageList) { - Write-Info -Text "Package $($num1++; $num1) - `"$a`"" -}; Write-Log " " - -if ($Verbose) { Write-Host "" } - -# ======================================================================================================================= # -# Fallbacks # -# ======================================================================================================================= # -if ($WinRE) { - if (Test-Path $useWinreIndicator) { - Remove-Item $useWinreIndicator -Force - } else { - exit - } - - Write-Host '' - & "$envPath\winrePackages.ps1" -LogPath "$sessionLogDirectory\winreSetup.log" - Restart -} - -if ($SafeMode) { - Write-Info "Installing component removal packages that failed previously in normal boot..." -DisplayAlways -NewLine -} - -# ======================================================================================================================= # -# online-sxs # -# ======================================================================================================================= # -$failedPackages = @() -foreach ($package in $packageList) { - $packageName = (Get-Item $package).Basename - Write-Info -Text "Installing $packageName with online-sxs..." - $onlineSxsOutput = & "$envPath\onlineSxs.ps1" "$package" *>&1 - if (!$?) { - $failedPackages += $package - if (!$safeModeWithList) { - Write-Info "Failed to install $packageName, will try safe mode after completion..." -UseError - } else { - Write-Info "Failed to install $packageName, will try in WinRE..." -UseError - } - } else { - Write-Info "Installed $packageName..." - } - - if ($Verbose) { - foreach ($a in $onlineSxsOutput) {Write-Host $a -ForegroundColor Cyan} - } - Write-Log $onlineSxsOutput -} - -if ($failedPackages.Count -ne 0) { - if (!$safeMode) { - SafeMode -Enable - $failedPackages | Out-File $safeModePackageList - - $safeModeStartupTitle = 'AtlasSafeModeComponentCheck' - $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries; $trigger = New-ScheduledTaskTrigger -AtLogon - $taskArgs = @{ - 'Trigger' = $trigger - 'Settings' = $settings - 'User' = $((Get-CimInstance -ClassName Win32_ComputerSystem).UserName -replace ".*\\") - 'RunLevel' = 'Highest' - 'Force' = $true - } - $arguments = "/c title Finalizing installation - Atlas & echo Do not close this window. & echo Atlas is setting up component removal in Windows Recovery... & echo Your computer will automatically restart. & echo] & schtasks /delete /tn `"$safeModeStartupTitle`" /f > nul & " ` - + "PowerShell -NoP -EP Bypass -C `"& '$envPath\centralScript.ps1' -WinRE`" & pause" - $action = New-ScheduledTaskAction -Execute 'cmd' -Argument $arguments - Register-ScheduledTask -TaskName $safeModeStartupTitle -Action $action @taskArgs | Out-Null - } - - # Failure in Safe Mode - if ($safeMode -and !$PlaybookInstall) { - if ($failedPackages.GetType().IsArray) { - $failedPackages += 'dismCleanup' - } else { - $failedPackages = @($failedPackages, 'dismCleanup') - } - - [IO.File]::WriteAllLines($winrePackageList, $($failedPackages -replace "$env:systemdrive\\", '')) - New-Item $useWinreIndicator -Force | Out-Null - - Write-Info -Text "Failed disabling Defender in Safe Mode, using Windows Recovery next boot..." -NewLine - 4..1 | ForEach-Object { - Clear-Host - Write-Host "Some packages failed to install. " -ForegroundColor Yellow -NoNewline - Write-Host "Again, this is no issue." -ForegroundColor Green - Write-Host "Your computer will automatically restart twice into Windows Recovery to remove components.`n" - Write-Host "Restarting in $_ seconds... " -NoNewline -ForegroundColor Gray - Start-Sleep 1 - } - Restart - } elseif ($safeMode) { - Write-Info -Text "Some packages didn't install sucessfully; WinRE will be set after next boot, exiting..." -NewLine - exit - } - - # Failure in normal boot - if (!$PlaybookInstall) { - 10..1 | ForEach-Object { - Clear-Host - Write-Host "Some packages failed to install. " -ForegroundColor Yellow -NoNewline - Write-Host "This is no issue." -ForegroundColor Green - Write-Host "Your computer will automatically restart into safe mode to remove components.`n" - Write-Host "Restarting in $_ seconds... " -NoNewline -ForegroundColor Gray - Start-Sleep 1 - } - Restart - } else { - Write-Info -Text "Some packages didn't install sucessfully; Safe Mode is set next boot, exiting..." -NewLine - exit - } -} else { - if (!$PlaybookInstall) { - 10..1 | ForEach-Object { - Clear-Host - Write-Host "Completed! " -ForegroundColor Green -NoNewline - Write-Host "Your computer will automatically restart to apply the changes.`n" -ForegroundColor Yellow - Write-Host "Restarting in $_ seconds... " -NoNewline -ForegroundColor Gray - Start-Sleep 1 - } - Restart - } else { - Write-Info -Text "All packages installed sucessfully, exiting..." -NewLine - exit - } -} \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/onlineSxs.ps1 b/src/playbook/Executables/AtlasModules/PackagesEnvironment/onlineSxs.ps1 deleted file mode 100644 index 7039be786a..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/onlineSxs.ps1 +++ /dev/null @@ -1,110 +0,0 @@ -#Requires -RunAsAdministrator - -# GPL-3.0-only license -# he3als 2023 -# https://github.com/he3als/online-sxs - -param ( - [array]$CabPaths, - [switch]$Silent -) - -# You can automate this script with variables as well: -# $CabPaths = "C:\Package.cab" -# Note: only works if $cabPath is defined -# $Silent = $true - -if ($CabPaths) { - $cabArg = $true - - if (!(Test-Path $CabPaths -PathType Leaf)) { - Write-Host "The specified files do not exist or aren't files." -ForegroundColor Red - exit 1 - } - - if (!((Get-Item $CabPaths).Extension -eq '.cab')) { - Write-Host "The specified files are not .cab files." -ForegroundColor Red - exit 1 - } -} else {$Silent = $false} - -$certRegPath = "HKLM:\Software\Microsoft\SystemCertificates\ROOT\Certificates" - -function PauseNul ($message = "Press any key to exit... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null -} - -if ($silent) {$ProgressPreference = 'SilentlyContinue'} - -if (!($cabArg)) { - Write-Host "This will install specified CBS packages online, meaning live on your current install of Windows." -ForegroundColor Yellow - Start-Sleep 1 - PauseNul "Press any key to continue... " - Write-Host "`n" - - Write-Warning "Opening file dialog to select CBS package CAB..." - Add-Type -AssemblyName System.Windows.Forms - $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog - $openFileDialog.Multiselect = $true - $openFileDialog.Filter = "CBS Package Files (*.cab)|*.cab" - $openFileDialog.Title = "Select a CBS Package File" - if ($openFileDialog.ShowDialog() -eq 'OK') { - Clear-Host - } else {exit} -} - -function ProcessCab($cabPath) { - try { - if (!($Silent)) { - $filePath = Split-Path $cabPath -Leaf - Write-Host "`nInstalling $filePath..." -ForegroundColor Green - Write-Host "----------------------------------------------------------------------------------------" -ForegroundColor Blue - } - - if (!($silent)) {Write-Warning "Importing and checking certificate..."} - try { - $cert = (Get-AuthenticodeSignature $cabPath).SignerCertificate - foreach ($usage in $cert.Extensions.EnhancedKeyUsages) { if ($usage.Value -eq "1.3.6.1.4.1.311.10.3.6") { $correctUsage = $true } } - if (!($correctUsage)) { - Write-Host 'The certificate inside of the CAB selected does not have the "Windows System Component Verification" enhanced key usage.' -ForegroundColor Red - if (!($cabArg)) {PauseNul}; exit 1 - } - $certPath = [System.IO.Path]::GetTempFileName() - [System.IO.File]::WriteAllBytes($certPath, $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)) - Import-Certificate $certPath -CertStoreLocation "Cert:\LocalMachine\Root" | Out-Null - Copy-Item -Path "$certRegPath\$($cert.Thumbprint)" "$certRegPath\8A334AA8052DD244A647306A76B8178FA215F344" -Force | Out-Null - } catch { - Write-Host "`nSomething went wrong importing and checking the certificate of: $cabPath" -ForegroundColor Red - Write-Host "$_`n" -ForegroundColor Red - if (!($cabArg)) {PauseNul}; exit 1 - } - - if (!($silent)) {Write-Warning "Adding package..."} - try { - Add-WindowsPackage -Online -PackagePath $cabPath -NoRestart -IgnoreCheck -LogLevel 1 *>$null - } catch { - Write-Host "Something went wrong adding the package: $cabPath" -ForegroundColor Red - Write-Host "$_`n" -ForegroundColor Red - if (!($cabArg)) {PauseNul}; exit 1 - } - } finally { - if (!($silent)) {Write-Warning "Cleaning up certificates..."} - Get-ChildItem "Cert:\LocalMachine\Root\$($cert.Thumbprint)" | Remove-Item -Force | Out-Null - Remove-Item "$certRegPath\8A334AA8052DD244A647306A76B8178FA215F344" -Force -Recurse | Out-Null - } -} - -if ($cabArg) { - foreach ($cabPath in $CabPaths) {ProcessCab $cabPath} -} else { - foreach ($cabPath in $openFileDialog.FileNames) {ProcessCab $cabPath} -} - -if (!($cabArg)) { Write-Host "" } -if (!($silent)) { Write-Host "Completed!" -ForegroundColor Green } -if (!($cabArg)) { - choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " - if ($lastexitcode -eq 1) {Restart-Computer} -} -if ($cabArg) { Write-Host "" } \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/README.txt b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/README.txt deleted file mode 100644 index 52213c9223..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -! DO NOT DELETE ! - -This is the Atlas Package Installation Environment based upon Windows Recovery. It is a component to Atlas used for disabling Defender and more. Without this, disabling Defender and other components will be unreliable and likely not work. \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/FocusMSHTA b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/FocusMSHTA deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/debug.cmd b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/debug.cmd deleted file mode 100644 index 707526e17e..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/debug.cmd +++ /dev/null @@ -1,8 +0,0 @@ -@echo off -set "log=notepad "%~1"" -set "nr=echo] > "%~2"" -set "s=del /f /q "%~3"" - -cls & echo Type %%log%% to open the log. -echo Type %%nr%% to disable automatic restart. -echo Type %%s%% to stop auto-focus of MSHTA. \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/atlas.svg b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/atlas.svg deleted file mode 100644 index 62d0077774..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/atlas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/background.jpg b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/background.jpg deleted file mode 100644 index 3c6d412d02..0000000000 Binary files a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/background.jpg and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/data.css b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/data.css deleted file mode 100644 index 50cee08529..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/data.css +++ /dev/null @@ -1 +0,0 @@ -.dataButton::after{content:"INFO;Getting ready;1"} \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/hta.html b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/hta.html deleted file mode 100644 index c96fbc3ead..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/hta.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/index.html b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/index.html deleted file mode 100644 index e075bd91d6..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/index.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - Atlas Component Removal - - - - - -
- - - - - - -
-
-
-
-
- -
-
-
-
-
- - - - -

An error has occurred.

-

Updating components...

-

Factual information!

-
-
-
-
-
-
-
- - - - - - diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/style.css b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/style.css deleted file mode 100644 index fe5faf8183..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/hta/style.css +++ /dev/null @@ -1,282 +0,0 @@ -body, -html { - margin: 0; - color: #fff; - overflow: hidden; - user-select: none -} - -.container { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 90%; - height: calc(100% - 104px); - max-width: 1200px; - max-height: 760px -} - -/* .fadeIn { - animation: ContentFadeIn .6s linear -} */ - -.content { - width: 100%; - margin-bottom: 4px; - height: 100%; - background: rgba(27, 27, 27, .8); - display: flex; - flex-flow: row; - border-radius: 8px; - box-shadow: 0 7.2px 21.6px rgba(0, 0, 0, .09), 0 38.4px 86.4px rgba(0, 0, 0, .11) -} - -.halfSection { - width: calc(50% - 1px); - height: 100%; - position: relative; - display: inline-block; - margin: 0 -} - -.graphic { - display: flex -} - -.graphic>div { - align-content: center; - align-items: center; - width: 100%; - height: 100%; - margin: 0 4% -} - -@media only screen and (max-width:1440px) and (orientation:landscape) { - .container { - max-width: 1048px; - max-height: 664px - } -} - -@media only screen and (min-width:2560px) and (orientation:landscape) { - .container { - max-width: 1600px; - max-height: 1024px - } -} - -@media only screen and (min-width:2560px) and (min-height:1354px) and (orientation:landscape) { - .container { - max-width: 1600px; - max-height: 1024px; - transform: translate(-50%, -50%) scale(1.2) - } -} - -@media only screen and (min-width:1921px) and (max-width:2559px) and (orientation:landscape) { - .container { - max-width: 1440px; - max-height: 912px - } -} - -@media only screen and (orientation:portrait) { - .halfSection { - width: 100% - } - - .halfSection.graphic { - height: 35% - } - - .halfSection.controls { - height: 65%; - padding: 6% 10% - } - - .halfSection:nth-child(1) { - margin-top: -4px - } - - .container { - max-height: 1440px; - max-width: 912px - } - - .content { - flex-flow: column - } -} - -@keyframes ContentFadeIn { - 0% { - opacity: 0 - } - - 66% { - opacity: 0 - } - - 100% { - opacity: 1 - } -} - -.control-app { - min-height: 100vh; - background: 0 0 -} - -.control-app .app-content { - height: 100%; - z-index: 1; - display: flex; - justify-content: center; - margin: auto -} - -.control-app .app-content>div { - width: 100% -} - -.container-content { - padding: 0 24px 24px 24px -} - -.container-content { - display: flex; - flex: 1; - flex-direction: column; - justify-content: flex-start; - overflow-y: auto; - overflow-x: hidden -} - -#_progressControl { - transform: rotate(270deg) -} - -.radialSize { - width: 64px; - height: 64px -} - -.radial { - fill: none; - stroke: #0067c0; - stroke-width: 2px; - stroke-linecap: round; - transform-origin: 50% 50%; - transform: rotate(-90deg) -} - -.radial-bg { - fill: none; - stroke: rgba(172, 172, 172, .18); - stroke-width: 2px; - stroke-linecap: round -} - -.control-app { - height: 100% -} - -.control-progress { - top: calc(50% + 2.25rem); - left: 50%; - position: absolute; - transform: translate(-50%, -50%); - align-self: center; - text-align: center; - width: 80% -} - -#_progressText, -.control-progress h4 { - height: 1.5rem; - font-size: 1.25rem; - line-height: 1.5rem; - margin: 1.5rem 0; - font-weight: 400 -} - -.errorText { - color: #ff5151; - display: none; - line-height: 1px -} - -.invisible { - opacity: 0 !important; -} - -.facts { - color: rgb(165, 165, 165); - font-size: 1rem !important; - width: 17rem; - display: inline-block; - margin: 0 !important; - /* transition: opacity 0.5s; */ - opacity: 1; -} - -body { - font-family: "Segoe UI Variable", "Segoe UI", Selawik, Tahoma, Verdana, Arial, sans-serif; - font-size: 87.5%; - background: 0 0 -} - -.background-image-container { - position: absolute; - overflow: hidden; - width: 100vw; - height: 100vh -} - -.background-image-container::after { - content: ""; - width: 100%; - height: 100vh; - position: absolute; - background-color: #000; - opacity: .4 -} - -.SVGBackdropImage { - height: 100vh; - width: 100vw; - position: absolute; - z-index: -1; - top: 0; - left: 0; - transform: scale(1.6) -} - -@media only screen and (orientation:portrait) { - .SVGBackdropImage { - width: 150vh; - transform: translate3d(-25vh, 0, 0) scale(1.2) - } -} - -@media only screen and (max-aspect-ratio:4 / 3) and (orientation:landscape) { - .SVGBackdropImage { - width: 150vw; - transform: translate3d(-25vw, 0, 0) scale(1.2) - } -} - -@media only screen and (min-aspect-ratio:1601 / 900) and (max-aspect-ratio:2200 / 1000) and (orientation:landscape) { - .SVGBackdropImage { - height: 150vh; - transform: translate3d(0, -25vh, 0) scale(1.2) - } -} - -@media only screen and (min-aspect-ratio:2201 / 1000) and (orientation:landscape) { - .SVGBackdropImage { - height: 200vh; - transform: translate3d(0, -50vh, 0) scale(1.2) - } -} \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/packages.cmd b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/packages.cmd deleted file mode 100644 index 848db79e2a..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/packages.cmd +++ /dev/null @@ -1,213 +0,0 @@ -@echo off -set "currentDirectory=%~dp0" -cd /d "%currentDirectory%" -for %%a in ( - log - setInfo - wait - addPackage -) do ( - set %%a=call :%%a -) -:: Set to 'High Performance' power plan -powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c - -:: ======================================================================================================================= :: -:: VARIABLES :: -:: ======================================================================================================================= :: - - echo INFO: Setting variables... - - set "sourceDriveCommand=reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "SourceDrive"" - set "associatedOSDriveLetterCommand=reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "AssociatedOSDriveLetter"" - - :: Make Windows Recovery Registry key for variables - :: Also would mount the WinRE partition - start /min %SystemDrive%\sources\recovery\RecEnv.exe - :recEnvGetKey - %sourceDriveCommand% > nul 2>&1 || goto recEnvGetKey - %associatedOSDriveLetterCommand% > nul 2>&1 || goto recEnvGetKey - :: Set drive letters - for /f "usebackq tokens=3 delims=\ " %%a in (`%sourceDriveCommand%`) do ( - set "recoveryDrive=%%a" - ) - for /f "usebackq tokens=3 delims=\ " %%a in (`%associatedOSDriveLetterCommand%`) do ( - set "targetDrive=%%a" - ) - :: Notify VBS on what to do - set "focusPath=%currentDirectory%\FocusMSHTA" - if exist "%recoveryDrive%\AtlasComponentPackageInstallation" ( - echo] > "%systemdrive%\AtlasComponentPackageInstallation" - del /f /q "%recoveryDrive%\AtlasComponentPackageInstallation" - ) else ( - echo] > "%systemdrive%\AtlasNormalWindowsRecovery" - call :deleteBitlockerInfo - exit - ) - :: Allow enough time for RecEnv to properly initialize - %wait% 7000 - del /f /q "%focusPath%" - echo INFO: Killing RecEnv... - wmic process where "name='RecEnv.exe'" call terminate > nul - - :: BitLocker - if exist "%targetDrive%\Windows" goto afterBitLocker - if not exist "%bitlockerKeyPath%" goto :setError "BitLocker" "error 1" - for /f "tokens=*" %%a in (%bitlockerKeyPath%) do (set "bitlockerKey=%%a") - manage-bde -unlock %targetDrive% -RecoveryPassword %bitlockerKey% - if not exist "%targetDrive%\Windows" goto :setError "BitLocker" "error 2" - - :afterBitLocker - :: Delete BitLocker key - call :deleteBitlockerInfo - - :: HTA - set "htaFolderPath=%cd%\hta" - set "htaPath=%htaFolderPath%\hta.html" - set "dataPath=%htaFolderPath%\data.css" - - :: Target disk variables - set "packagesList=%targetDrive%\Windows\AtlasModules\winrePackagesToInstall" - set "atlasLogDirectory=%targetDrive%\Windows\AtlasModules\Logs" - - :: Other variables - set "percentage=1" - set "dontRestartPath=%systemdrive%\AtlasDontRestart" - - :: Set log file - echo INFO: Setting log file... - if not exist "%atlasLogDirectory%" mkdir "%atlasLogDirectory%" & echo INFO: Made Atlas log directory... - for /f "skip=1" %%a in ('wmic os get localdatetime') do if not defined unformattedDate set unformattedDate=%%a - set formattedDate=%unformattedDate:~6,2%-%unformattedDate:~4,2%-%unformattedDate:~0,4% - :makeLogDirectoryAndFile - set /a logNum += 1 - set "logDirPath=%atlasLogDirectory%\%logNum%-AtlasWinRE-PackageInstall-%formattedDate%" - if exist "%logDirPath%" (goto makeLogDirectoryAndFile) else ( - mkdir "%logDirPath%" - set "logPath=%logDirPath%\dism.log" - ) - - echo INFO: Starting debug console... - start /i /d "%targetDrive%\Windows" /min "Atlas Debug Console" cmd /k %currentDirectory%debug.cmd "%logPath%" "%dontRestartPath%" "%focusPath%" - -:: -------------------------------------------------------------------------------------------------------- :: -:: Start looping through packages :: -:: -------------------------------------------------------------------------------------------------------- :: - - for /f "usebackq" %%a in (`type "%packagesList%" ^| find "" /v /c`) do set totalCount=%%a - for /f "usebackq" %%a in (`type "%packagesList%" ^| find ".cab" ^| find "" /v /c`) do set packageCount=%%a - for /f "usebackq" %%a in (`type "%packagesList%" ^| find "disableFeature" ^| find "" /v /c`) do set disableFeatureCount=%%a - %log% "INFO: Installing %totalCount% packages from %packagesList%..." - set /a percentageSteps=100/%totalCount% - for /f "tokens=* delims=" %%a in (%packagesList%) do ( - %addPackage% "%%a" - ) - -:: -------------------------------------------------------------------------------------------------------- :: -:: Finsh up :: -:: -------------------------------------------------------------------------------------------------------- :: - - echo INFO: Finishing up - %setInfo% "Restarting" "100" - - if defined error echo "%logPath%" "%error%" > "%targetDrive%\Windows\System32\AtlasPackagesFailure" - copy /y "%packagesList%" "%logDirPath%" - del /f /q "%packagesList%" - - %wait% 6000 - if not exist "%dontRestartPath%" wpeutil reboot - :infinitePause - pause & goto infinitePause - -:: ======================================================================================================================= :: -:: FUNCTIONS :: -:: ======================================================================================================================= :: - exit /b - - :addPackage [packagePath] - echo] - set /a halfWayPercentage = %percentage% + ( %percentageSteps% / 2 ) - set "dismCurrentLog=%systemDrive%\dismTemp%random%.txt" - - :: check if it's a disabled feature - echo "%~1" | find "disableFeature" || goto makePackageCommand - set /a disableFeatureNum += 1 - set "currentLine=%~1" - set "featureName=%currentLine:disableFeature =%" - set "dismCommand=dism /image:%targetDrive%\ /disable-feature /featurename:%featureName% /logpath:"%dismCurrentLog%"" - set "message=Configuring feature %disableFeatureNum%" - goto runDismCommand - - :makePackageCommand - :: check for either DISM cleanup or package addition - set /a packageNum += 1 - if "%~1"=="dismCleanup" ( - set "dismCommand=dism /image:%targetDrive%\ /cleanup-image /startcomponentcleanup /logpath:"%dismCurrentLog%"" - set "message=Cleaning up" - ) else ( - set "dismCommand=dism /image:%targetDrive%\ /add-package:"%targetDrive%\%~1" /logpath:"%dismCurrentLog%"" - set "message=Adding package %packageNum%" - ) - - :runDismCommand - %setInfo% "%message%" "%halfWayPercentage%" - %log% "%dismCommand%" - - %dismCommand% - set dismErrorlevel=%errorlevel% - if %dismErrorlevel%==0 ( - %log% "SUCCESS: Successfully deployed %~1..." - ) else ( - %log% "ERROR: Failed to deploy %~1. Exit code %dismErrorLevel%." - set error=%dismErrorlevel% - ) - type "%dismCurrentLog%" >> "%logPath%" - del /f /q "%dismCurrentLog%" - - set /a percentage=%percentage% + %percentageSteps% - %setInfo% "%message%" "%percentage%" - exit /b - - :log [text] - ( - echo] - echo ================================================================================================================================== - echo %~1 - echo ================================================================================================================================== - echo] - ) >> "%logPath%" - echo %~1 - exit /b - - :setInfo [message] [percentage] - echo .dataButton::after{content:"INFO;%~1;%~2"} > "%dataPath%" - exit /b - - :setError [message] [error] - echo .dataButton::after{content:"ERROR;%~2"} > "%dataPath%" - call :deleteBitlockerInfo - %wait% 8000 - if not exist "%dontRestartPath%" wpeutil reboot - exit /b - - :wait [seconds] - cscript %cd%\sleep.vbs %~1 //B - exit /b - - :deleteBitlockerInfo - set "bitlockerKey=nu-uh" - del /f /q "%recoveryDrive%\bitlockerAtlas.txt" > nul 2>&1 - exit /b - - :strlen [strVar] [rtnVar] - setlocal EnableDelayedExpansion - set "s=#!%~1!" - set "len=0" - for %%N in (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) do ( - if "!s:~%%N,1!" neq "" ( - set /a "len+=%%N" - set "s=!s:~%%N!" - ) - ) - endlocal&if "%~2" neq "" (set %~2=%len%) else echo %len% - exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/sleep.vbs b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/sleep.vbs deleted file mode 100644 index e334297bd4..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/sleep.vbs +++ /dev/null @@ -1 +0,0 @@ -WScript.Sleep WScript.Arguments(0) \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/startup.vbs b/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/startup.vbs deleted file mode 100644 index 31858842d7..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/recovery/atlas/startup.vbs +++ /dev/null @@ -1,61 +0,0 @@ -On Error Resume Next - -Dim objProcess, strHTAPath, bHTARunning -Set objFSO = CreateObject("Scripting.FileSystemObject") -Set objShell = CreateObject("WScript.Shell") -systemDrive = objShell.ExpandEnvironmentStrings("%SystemDrive%") -arm64 = objShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") = "ARM64" - -launchOpen = 0 -If arm64 Then - launchOpen = 1 -End If - -strHTAPath = systemDrive & "\atlas\hta\hta.html" -objShell.Run systemDrive & "\atlas\packages.cmd", launchOpen, False - -Function InfiniteLoop() - Do - WScript.Sleep 9999999 - Loop -End Function - -Do - If arm64 Then - InfiniteLoop() - End If - - If objFSO.FileExists(systemDrive & "\AtlasComponentPackageInstallation") Then - Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") - Do - bHTARunning = False - For Each objProcess in objWMIService.ExecQuery("Select * from Win32_Process") - If LCase(objProcess.Name) = "mshta.exe" Then - If InStr(1, objProcess.CommandLine, strHTAPath, vbTextCompare) > 0 Then - bHTARunning = True - Exit For - End If - End If - Next - - If Not bHTARunning Then - objShell.Run "mshta " & strHTAPath - End If - - If objFSO.FileExists(systemDrive & "\atlas\FocusMSHTA") Then - objShell.AppActivate("Atlas Component Removal") - WScript.Sleep 500 - Else - WScript.Sleep 3000 - End If - Loop - ElseIf objFSO.FileExists(systemDrive & "\AtlasNormalWindowsRecovery") Then - InfiniteLoop() - End If - - WScript.Sleep 1000 - packagesCheck = packagesCheck + 1 - If packagesCheck >= 8 Then - InfiniteLoop() - End If -Loop \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/PackagesEnvironment/winrePackages.ps1 b/src/playbook/Executables/AtlasModules/PackagesEnvironment/winrePackages.ps1 deleted file mode 100644 index 819a976bb3..0000000000 --- a/src/playbook/Executables/AtlasModules/PackagesEnvironment/winrePackages.ps1 +++ /dev/null @@ -1,342 +0,0 @@ -#Requires -RunAsAdministrator - -param ( - [string]$LogPath, - [switch]$NextStartup, - [switch]$DeleteBitLockerPassword -) - -# Task Scheduler is needed for this script to function correctly -if ((Get-Service -Name 'Schedule' -EA SilentlyContinue).Status -ne 'Running') { - Set-Service -Name 'Schedule' -StartupType Automatic - Start-Service -Name 'Schedule' -} - -function Test-PathOrCommand { - param ( - [string]$Path, - [string]$Message, - [string]$ExitCode - ) - - function WriteError { - Write-Host "Error: " -NoNewLine -ForegroundColor Red - Write-Host "$message" - exit $ExitCode - } - - if ($Path -like "*\*") { - if (!(Test-Path $Path)) { WriteError } - } else { - if (!(Get-Command $Path -EA SilentlyContinue)) { WriteError } - } -} - -function Write-Log { - $args | Out-File "$LogPath" -Append -Force -} - -function Write-Info { - param ( - [string]$Text, - [switch]$NewLine, - [switch]$UseError - ) - - if ($UseError) { - Write-Host "ERROR: " -NoNewLine -ForegroundColor Red - } else { - Write-Host "INFO: " -NoNewLine -ForegroundColor Blue - } - Write-Host "$Text" - - if ($NewLine) { Write-Host "" } - if ($LogPath) { - Write-Log "$Text" - } -} - -# ======================================================================================================================= # -# VARIABLES # -# ======================================================================================================================= # - -Write-Info -Text "Setting variables..." - -# Required paths -$requiredPaths = @{ - recoveryXML = "$env:windir\System32\Recovery\ReAgent.xml" - modules = "$env:windir\AtlasModules" - atlasEnvironmentItems = "$env:windir\AtlasModules\PackagesEnvironment\recovery" - atlasWinrePackages = "$env:windir\AtlasModules\winrePackagesToInstall" - reagentc = 'reagentc.exe' -} -foreach ($path in $requiredPaths.Keys) { - Test-PathOrCommand -Path $($requiredPaths.$path) -Message "$($requiredPaths.$path) not found." -ExitCode 1 - New-Variable -Name $path -Value $requiredPaths.$path -} - -# Scheduled Tasks -$user = (Get-CimInstance -ClassName Win32_ComputerSystem).UserName -replace ".*\\" -$bitlockerTaskName = 'AtlasBitlockerRemovalTask' -$failCheck = 'RecoveryFailureCheck' -$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -$trigger = New-ScheduledTaskTrigger -AtLogon -$taskArgs = @{ - 'Trigger' = $trigger - 'Settings' = $settings - 'User' = $user - 'RunLevel' = 'Highest' - 'Force' = $true -} - -# Misc -$failurePath = "$env:windir\System32\AtlasPackagesFailure" -# https://ss64.com/vb/popup.html -$sh = New-Object -ComObject "Wscript.Shell" - -# Messages -$atlasTeamOnGit = 'Report this to the Atlas team on GitHub.' -$genericRecoveryFailure = @" -Something went wrong while trying to use Windows Recovery to remove components. - -$atlasTeamOnGit -"@ - -# ======================================================================================================================= # -# FUNCTIONS # -# ======================================================================================================================= # - -function PauseNul ($message = "Press any key to exit... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null -} - -function FatalError ($recoveryError) { - $null = $sh.Popup($recoveryError,20,'Components Error - Atlas',0+48) -} - -function NoDiskSpaceError ($space) { - FatalError @" -You need more than $space GB of free disk space for Atlas' component removals to work. - -Without this, you won't be able to use disable Defender, remove telemetry and have Atlas do other removals. - -This is an unsupported state. - -$atlasTeamOnGit -"@ - exit 1 -} - -function StartupTask { - $arguments = '/c title Finalizing installation - Atlas & echo Do not close this window. & schtasks /delete /tn "RecoveryFailureCheck" /f > nul & ' ` - + 'PowerShell -NoP -EP Bypass -WindowStyle Hidden -C "& $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -NextStartup"' - $action = New-ScheduledTaskAction -Execute 'cmd' -Argument $arguments - Register-ScheduledTask -TaskName $failCheck -Action $action @taskArgs | Out-Null -} - -# ======================================================================================================================= # -# Next startup error # -# ======================================================================================================================= # -if ($NextStartup -and (Test-Path $failurePath)) { - $WindowTitle = 'Failed removing components - Atlas' - - Write-Info -Text "Running specific Windows Recovery failure message..." -UseError - Unregister-ScheduledTask -TaskName $failCheck -Confirm:$false | Out-Null - $AtlasPackagesFailure = Get-Content $failurePath - $logPath = ($AtlasPackagesFailure -split '"')[1] -replace [regex]::Escape($env:windir), '%windir%' - $errorLevel = ($AtlasPackagesFailure -split '"')[3] - - Remove-Item $failurePath -Force - - $Message = @" -Something went wrong while removing components using Windows Recovery. - -Log: $logPath -Exit code: $errorLevel - -$atlasTeamOnGit -"@ - - $sh.Popup($Message,0,$WindowTitle,0+48) - exit 1 -} elseif ($NextStartup) { exit } - -# ======================================================================================================================= # -# Windows Recovery modification # -# ======================================================================================================================= # - -try { - # Initial BCD values - Write-Info -Text 'Initial Windows Recovery variables...' - $recoveryBCD = $([xml]$(Get-Content -Path $recoveryXML)).WindowsRE.WinreBCD.id - $bcdeditRecoveryOutput = bcdedit /enum "$recoveryBCD" | Select-String 'device' | Select-Object -First 1 - $deviceDrive = ($bcdeditRecoveryOutput -split '\]' -split '\[')[1] - $winrePath = ($bcdeditRecoveryOutput -split '\]' -split ',')[1] - - # Enable Windows Recovery - # Does nothing if it's already enabled - Write-Info -Text 'Enabling WinRE...' - reagentc /enable | Out-Null - if (!$?) { - Write-Info -Text 'Failed enabling WinRE, displaying error...' -UseError - FatalError @" -Something went wrong while trying to enable Windows Recovery for component removal. - -$atlasTeamOnGit -"@ - - exit 1 - } - - # If WinRE is on Recovery partition, mount it - if ($deviceDrive -notlike '*:*') { - Write-Info -Text 'Detected Windows Recovery partition...' - $recoveryPartition = $true - - Write-Info -Text 'Getting WinRE partition ID...' - $Kernel32 = Add-Type -Name 'Kernel32' -Namespace '' -PassThru -MemberDefinition @" - [DllImport("kernel32")] - public static extern int QueryDosDevice(string name, System.Text.StringBuilder path, int pathMaxLength); -"@; $DevicePath = [System.Text.StringBuilder]::new(255) - $recoveryID = Get-Volume | ForEach-Object { - $UniqueId = $_.UniqueId.TrimStart('\\?\').TrimEnd('\') - $Kernel32::QueryDosDevice($UniqueId, $DevicePath, $DevicePath.Capacity) | Out-Null - [PSCustomObject]@{ - DevicePath = $DevicePath.ToString() - UniqueId = $_.UniqueId - } - } | Where-Object { $_.DevicePath -eq $deviceDrive } | Select-Object -ExpandProperty UniqueId - - # Create mount point - Write-Info -Text 'Creating mount point...' - do { - $mountPoint = Join-Path -Path $env:WinDir -ChildPath ("atlasRecovery." + $([System.IO.Path]::GetRandomFileName())) - } until (!(Test-Path $mountPoint)) - if (-Not (Test-Path $mountPoint)) { New-Item -Path $mountPoint -Type Directory -Force | Out-Null } - mountvol $mountPoint $recoveryID | Out-Null - if (!$?) { - Write-Info -Text 'Failed mounting WinRE partition, displaying mesage...' -UseError - $null = $sh.Popup($genericRecoveryFailure,0,$WindowTitle,0+16) - exit - } - $deviceDrive = $mountPoint - } - - $fullWimPath = "$deviceDrive\$winrePath" - $bitlockerRecoveryKeyTxt = "$mountPoint\bitlockerAtlas.txt" - $componentInstallationIndicator = "$deviceDrive\AtlasComponentPackageInstallation" - - if ($DeleteBitLockerPassword) { - Write-Info -Text "Deleting BitLocker password..." - $ErrorActionPreference = 'SilentlyContinue' - Remove-Item $bitlockerRecoveryKeyTxt -Force - Remove-Item $componentInstallationIndicator -Force - $ErrorActionPreference = 'Continue' - Unregister-ScheduledTask -TaskName $bitlockerTaskName -Confirm:$false | Out-Null - exit - } - - # Storage space check - $wimSize = (Get-WindowsImage -ImagePath $fullWimPath -Index 1).ImageSize - if ($wimSize -gt (Get-PSDrive ($env:systemdrive -replace ':','') | Select-Object -ExpandProperty Free)) { - $spaceNeeded = $([math]::round($wimSize /1Gb, 3) * 2) - Write-Info -Text 'Not enough storage space, displaying mesage...' -UseError - NoDiskSpaceError $spaceNeeded - exit 1 - } - - # Save BitLocker password for use in WinRE - # It's deleted next reboot - $bitlockerVolume = Get-BitLockerVolume -MountPoint $env:systemdrive - if ($bitlockerVolume.ProtectionStatus -eq 'On') { - Write-Info -Text 'BitLocker detected...' - $bitlockerRecoveryKey = ($bitlockerVolume.KeyProtector | Where-Object { $_.KeyProtectorType -eq 'RecoveryPassword' }).RecoveryPassword - - if ($recoveryPartition) { - Write-Info -Text 'Writing BitLocker key to WinRE partition...' - [IO.File]::WriteAllLines($bitlockerRecoveryKeyTxt, $bitlockerRecoveryKey) - $action = New-ScheduledTaskAction -Execute 'cmd' ` - -Argument '/c schtasks /delete /tn "AtlasBitlockerRemovalTask" /f > nul & PowerShell -NoP -EP Bypass -WindowStyle Hidden & $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -DeleteBitLockerPassword' - Register-ScheduledTask -TaskName $bitlockerTaskName -Action $action @taskArgs | Out-Null - } else { - if (!$?) { - $bitlockerLink = 'https://docs.atlasos.net/faq-and-troubleshooting/common-questions/decryptying-using-bitlocker/' - Write-Info -Text 'No WinRE partition with BitLocker, displaying message...' -UseError - $null = $sh.Popup(@" -A BitLocker install with Windows Recovery on the system drive was detected. - -You need to decrypt your drive. - -$bitlockerLink -"@,0,$WindowTitle,0+16) - Start-Process $bitlockerLink - exit 1 - } - } - } - - # Mount the Recovery WIM - Write-Info -Text 'Mounting WinRE WIM...' - do { - $atlasWinreWim = Join-Path -Path $env:WinDir -ChildPath ("atlasWinreWim." + $([System.IO.Path]::GetRandomFileName())) - } until (!(Test-Path $atlasWinreWim)) - New-Item -Path $atlasWinreWim -Type Directory -Force | Out-Null - Mount-WindowsImage -ImagePath $fullWimPath -Index 1 -Path $atlasWinreWim | Out-Null - if (!$?) { - Write-Info -Text 'Something went wrong mounting the WinRE image, displaying message...' -UseError - $null = $sh.Popup(@" -Something went wrong while mounting the WinRE image. - -$atlasTeamOnGit -"@,0,$WindowTitle,0+16) - exit 1 - } - - # Set startup application - # https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpeshlini-reference-launching-an-app-when-winpe-starts - Write-Info -Text 'Setting startup application...' - [IO.File]::WriteAllLines("$atlasWinreWim\Windows\System32\winpeshl.ini", @" -[LaunchApps] -%WINDIR%\System32\wscript.exe, %SYSTEMDRIVE%\atlas\startup.vbs //B -"@) - # [IO.File]::WriteAllLines("$atlasWinreWim\Windows\System32\winpeshl.ini", @" -# [LaunchApps] -# %WINDIR%\System32\cmd.exe -# "@) - - # Copy Atlas Package Installation Environment items - Write-Info -Text 'Copying files...' - Copy-Item "$atlasEnvironmentItems\*" -Destination "$atlasWinreWim\atlas" -Recurse -Force - - # Notify WinRE that it's package install next boot - New-Item $componentInstallationIndicator -Force | Out-Null - - # Set startup task - StartupTask - - # Boot into Windows Recovery - reagentc /boottore | Out-Null -} finally { - Write-Info -Text 'Cleaning up...' - if ((Test-Path "$atlasWinreWim\Windows") -and $atlasWinreWim) { - Dismount-WindowsImage -Path $atlasWinreWim -Save | Out-Null - if (!$?) { - Write-Info -Text 'Failed to save WinRE image, displaying message...' -UseError - $null = $sh.Popup(@" -Failed to save the Windows Recovery image. - -$atlasTeamOnGit -"@,0,'Component failure - Atlas',0+16) - exit 1 - } - Remove-Item $atlasWinreWim -Force - } - if ($mountPoint) { - mountvol "$mountPoint" /D - if ($?) { Remove-Item $mountPoint -Force } - } -} - -Write-Info -Text 'Restarting...' -Restart-Computer \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/README.md b/src/playbook/Executables/AtlasModules/README.md index dc96a0cbeb..c17213d269 100644 --- a/src/playbook/Executables/AtlasModules/README.md +++ b/src/playbook/Executables/AtlasModules/README.md @@ -1,17 +1,8 @@ # Sources -To verify the legitimacy of these binaries (executables), there is information provided here for each binary for hashes, sources and when each was last verified/checked with the SHA256 hash. Verified using `Get-FileHash` in PowerShell. +Some of the Playbook contains binary executables. This file provides some verification for those files, by listing the SHA256 hashes, sources, and when each was last verified/checked. Hashes were collected using `Get-FileHash` in PowerShell. The root of the file paths listed here starts in `src\playbook\Executables`. -### File Picker -- Path: `\AtlasModules\Tools\filepicker.exe` -- SHA256 Hash: `10A9AB81DE68A6ACEBD6E0D393ECC8869A4DAE852F78CF9093740AD8752DA0DE` -- Source: https://github.com/Atlas-OS/Atlas-Utilities/releases/download/filepicker-rs-v0.1/filepicker.exe -- Repository: https://github.com/Atlas-OS/Atlas-Utilities -- Version: v0.1 -- License: [GNU General Public License v3.0](https://github.com/Atlas-OS/utilities/blob/main/LICENSE) -- Last Verified: 8/9/2023 by Xyueta - ### Multi-Choice - Path: `\AtlasModules\Tools\multichoice.exe` - SHA256 Hash: `6AB2FF0163AFE0FAC4E7506F9A63293421A1880076944339700A59A06578927D` @@ -27,7 +18,7 @@ The root of the file paths listed here starts in `src\playbook\Executables`. - SHA256 Hash: `FE3CDBE2E332E48921FFA2A9697A66F71472D878154BA331D12ADC7E7C767A2B` - Source: https://github.com/amitxv/TimerResolution/releases/download/SetTimerResolution-v0.1.3/SetTimerResolution.exe - Version: v0.1.3 -- Path: `\AtlasDesktop\3. Configuration\Power\Timer Resolution\MeasureSleep.exe` +- Path: `\AtlasDesktop\3. General Configuration\Power\Timer Resolution\MeasureSleep.exe` - SHA256 Hash: `055425A39CE8E766055EE2DE3F4CEE1714BCA31F274BF0C9F658009F551E9E73` - Source: https://github.com/amitxv/TimerResolution/releases/download/MeasureSleep-v0.1.6/MeasureSleep.exe - Version: v0.1.6 diff --git a/src/playbook/Executables/AtlasModules/Scripts/Modules/Uninstall-MsiexecAppByName/Uninstall-MsiexecAppByName.psm1 b/src/playbook/Executables/AtlasModules/Scripts/Modules/Uninstall-MsiexecAppByName/Uninstall-MsiexecAppByName.psm1 deleted file mode 100644 index 68a2454290..0000000000 --- a/src/playbook/Executables/AtlasModules/Scripts/Modules/Uninstall-MsiexecAppByName/Uninstall-MsiexecAppByName.psm1 +++ /dev/null @@ -1,50 +0,0 @@ -<# - .Synopsis - Uninstalls MSIExec uninstaller applications by name. - - .Description - Uninstalls applications that use MSIExec uninstallers recursively based on a - wildcarded display name (DisplayName in Registry). - - .Parameter Name - The display name of the MSIExec uninstaller application(s) to wildcard - and uninstall. - - .Example - # Uninstalls any apps matching "Microsoft Update Health Tools" - Uninstall-MsiexecAppByName -Name "Microsoft Update Health Tools" -#> - -function Uninstall-MsiexecAppByName { - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$Name - ) - - if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) { - throw "Uninstall-MsiexecAppByName: Not running as an administrator!" - } - - $uninstallKeyPath = "Microsoft\Windows\CurrentVersion\Uninstall" - $uninstallKeys = (Get-ChildItem -Path @( - "HKLM:\SOFTWARE\$uninstallKeyPath", - "HKLM:\SOFTWARE\WOW6432Node\$uninstallKeyPath", - "HKCU:\SOFTWARE\$uninstallKeyPath", - "HKCU:\SOFTWARE\WOW6432Node\$uninstallKeyPath" - ) -EA SilentlyContinue) -match "\{\b[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}\b\}" - - foreach ($key in $uninstallKeys.PSPath) { - $displayName = (Get-ItemProperty -Path $key).DisplayName - if (($displayName -like "*$Name*") -and ((Get-ItemProperty -Path $key).UninstallString -like "*MsiExec.exe*")) { - Write-Output "Uninstalling $displayName..." - Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /X$(Split-Path -Path $key -Leaf) REBOOT=ReallySuppress /norestart" 2>&1 | Out-Null - } - } - - if ($null -eq $foundKey) { - throw "Uninstall-MsiexecAppByName: No app found with an MSIExec uninstaller with the display name containing '$Name'." - } -} - -Export-ModuleMember -Function Uninstall-MsiexecAppByName diff --git a/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd b/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd index b5a768a4c0..6a1ab28964 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd @@ -29,7 +29,7 @@ if "%~1" == "" ( set /P program_path="Enter the valid path of the program or drag it here: " if "!program_path!" == "" ( echo error: no input - timeout /t 1 > nul + ping 127.0.0.1 -n 2 > nul cls goto RunAsTI-Elevate ) diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ConfigVBS.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ConfigVBS.ps1 index cb47fab256..3accc06c36 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ConfigVBS.ps1 +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ConfigVBS.ps1 @@ -173,11 +173,11 @@ $pages = @( } }, @{ - Title = "VBS Security Properties Avaliable" + Title = "VBS Security Properties Available" Commands = { $AvailableSecurityProperties = (Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard).AvailableSecurityProperties - $VirtualizationBasedSecurityAvaliableSecurity = @( + $VirtualizationBasedSecurityAvailableSecurity = @( "None", "Hypervisor support", "Secure Boot", @@ -190,23 +190,23 @@ $pages = @( ) if ($AvailableSecurityProperties -contains '0') { - Write-Host "No security features are avaliable for Virtualization Based Security.`n" -ForegroundColor Green + Write-Host "No security features are available for Virtualization Based Security.`n" -ForegroundColor Green } else { - Write-Host "Security features avaliable for Virtualization Based Security:`n" -ForegroundColor Yellow + Write-Host "Security features available for Virtualization Based Security:`n" -ForegroundColor Yellow } - foreach ($feature in $VirtualizationBasedSecurityAvaliableSecurity) { + foreach ($feature in $VirtualizationBasedSecurityAvailableSecurity) { if ($feature -eq "None") { continue } Write-Host " - " -NoNewLine - if ($AvailableSecurityProperties -contains $VirtualizationBasedSecurityAvaliableSecurity.IndexOf($feature)) { - Write-Host "$feature is avaliable" -ForegroundColor Green + if ($AvailableSecurityProperties -contains $VirtualizationBasedSecurityAvailableSecurity.IndexOf($feature)) { + Write-Host "$feature is available" -ForegroundColor Green } else { - # $($VirtualizationBasedSecurityAvaliableSecurity.IndexOf($feature)). - Write-Host "$feature is not avaliable" -ForegroundColor Red + # $($VirtualizationBasedSecurityAvailableSecurity.IndexOf($feature)). + Write-Host "$feature is not available" -ForegroundColor Red } } } @@ -254,4 +254,4 @@ function Show-Page { Wait-Key } -Show-Page \ No newline at end of file +Show-Page diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DebloatSendToContextMenu.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DebloatSendToContextMenu.ps1 new file mode 100644 index 0000000000..f5465d6fd6 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DebloatSendToContextMenu.ps1 @@ -0,0 +1,114 @@ +param ( + [array]$Disable, + [array]$Enable +) + +$removableDrivePath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" +$removableDriveValue = "NoDrivesInSendToMenu" +# First value in an array is the disable, second is enable +$items = @{ + "Removable Drives" = @( + { New-ItemProperty -Path $removableDrivePath -Name $removableDriveValue -Value 1 -PropertyType DWORD -Force }, + { Remove-ItemProperty -Path $removableDrivePath -Name $removableDriveValue -Force -EA 0 } + ) +} +$sendTo = Get-ChildItem ([Environment]::GetFolderPath('SendTo')) -Force +$sys32 = [Environment]::GetFolderPath('System') +$shell = New-Object -Com WScript.Shell + +# Get Bluetooth path +foreach ($lnk in (($sendTo | Where-Object { $_.Extension -eq ".lnk" }).FullName)) { + $target = $shell.CreateShortcut($lnk).TargetPath + if ($target -eq "$sys32\fsquirt.exe") { + $items["Bluetooth"] = $lnk + $blueFound = $true + } elseif ($target -eq "$sys32\WFS.exe") { + $items["Fax recipient"] = $lnk + $faxFound = $true + } + + if ($faxFound -and $blueFound) { + break + } +} + +# Items with specific extensions +foreach ($ext in @{ + "Compressed (zipped) folder" = "ZFSendToTarget" + "Desktop (create shortcut)" = "DeskLink" + "Mail recipient" = "MAPIMail" + "Documents" = "mydocs" +}.GetEnumerator()) { + $path = $sendTo | Where-Object { $_.Extension -eq ".$($ext.Value)" } | Select-Object -First 1 + if ($path) { $items[$ext.Key] = $path.FullName } +} + +# Enable/disable functions +function EnableSendTo($value) { + if ($value -is [string]) { + $item = Get-Item -LiteralPath $value -Force + $item.Attributes = $item.Attributes -band -bnot [System.IO.FileAttributes]::Hidden + } elseif ($value -is [array]) { + & $value[1] | Out-Null + } +} +function DisableSendTo($value) { + if ($value -is [string]) { + $item = Get-Item -LiteralPath $value -Force + $item.Attributes = $item.Attributes -bor [System.IO.FileAttributes]::Hidden + } elseif ($value -is [array]) { + & $value[0] | Out-Null + } +} + +# Args +if ($Enable) { + foreach ($item in $items.GetEnumerator()) { + foreach ($itemToEnable in $Enable) { + if ($item.Key -like "$itemToEnable") { + EnableSendTo $item.Value + } + } + } + exit +} elseif ($Disable) { + foreach ($item in $items.GetEnumerator()) { + foreach ($itemToDisable in $Disable) { + if ($item.Key -like "$itemToDisable") { + DisableSendTo $item.Value + } + } + } + exit +} + +# Prompt user +$choices = (multichoice.exe "Send To Debloat" ` + "Tick the 'Send To' context menu items that you want to enable here (un-checked items are disabled)" ` + "$($items.Keys -join ';')") -split ';' + +# Loop through choices +foreach ($item in $items.GetEnumerator()) { + $value = $item.Value + # If it's in the choices, enable + if ($item.Key -in $choices) { + EnableSendTo $value + continue + } + # If it's in the choices, disable + if ($item.Key -notin $choices) { + DisableSendTo $value + continue + } +} + +# Restart Explorer prompt +Add-Type -AssemblyName System.Windows.Forms +if (([System.Windows.Forms.MessageBox]::Show( + "Would you like to restart Windows Explorer now? This will finalise the changes.", + "Atlas - Send To Debloat", + [System.Windows.Forms.MessageBoxButtons]::YesNo, + [System.Windows.Forms.MessageBoxIcon]::Information +)) -eq [System.Windows.Forms.DialogResult]::Yes) { + Stop-Process -Name explorer -Force +} \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DefaultPowerSaving.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DefaultPowerSaving.ps1 new file mode 100644 index 0000000000..d1816982e0 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DefaultPowerSaving.ps1 @@ -0,0 +1,82 @@ +#Requires -RunAsAdministrator + +Write-Host "`nRestoring default power schemes..." -ForegroundColor Yellow +# This should set the power plan to 'Balanced' by default +powercfg /restoredefaultschemes | Out-Null + +Write-Host "Enabling power-saving ACPI devices..." -ForegroundColor Yellow +& toggleDev.cmd -Enable '@("ACPI Processor Aggregator", "Microsoft Windows Management Interface for ACPI")' | Out-Null + +Write-Host "Enabling device power-saving..." -ForegroundColor Yellow +$keys = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Enum" -Recurse -EA 0 +foreach ($value in @( + "AllowIdleIrpInD3", + "D3ColdSupported", + "DeviceSelectiveSuspended", + "EnableIdlePowerManagement", + "EnableSelectiveSuspend", + "EnhancedPowerManagementEnabled", + "IdleInWorkingState", + "SelectiveSuspendEnabled", + "SelectiveSuspendOn", + "WaitWakeEnabled", + "WakeEnabled", + "WdfDirectedPowerTransitionEnable" +)) { + $oldValue = "$value-OLD" + $keys | Where-Object { $_.GetValueNames() -contains $oldValue } | ForEach-Object { + $keyPath = $_.PSPath + Remove-ItemProperty -Path $keyPath -Name $value + Rename-ItemProperty -Path $keyPath -Name $oldValue -NewName $value + } +} + +Write-Host "Enabling network adapter power saving..." -ForegroundColor Yellow +# Set power saving mode for all network cards to default +Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters" -Name "DefaultPnPCapabilities" -Value 0 +# Configure network adapter settings +$properties = Get-NetAdapter -Physical | Get-NetAdapterAdvancedProperty +foreach ($setting in @( + # Stands for Ultra Low Power + "ULPMode", + + # Energy Efficient Ethernet + "EEE", + "EEELinkAdvertisement", + "AdvancedEEE", + "EnableGreenEthernet", + "EeePhyEnable", + + # Wi-Fi capability that saves power consumption + "uAPSDSupport", + + # Self-explanatory + "EnablePowerManagement", + "EnableSavePowerNow", + "bLowPowerEnable", + "PowerSaveMode", + "PowerSavingMode", + "SavePowerNowEnabled", + "AutoPowerSaveModeEnabled", + "NicAutoPowerSaver", + "SelectiveSuspend" +)) { + $properties | Where-Object { $_.RegistryKeyword -eq "*$setting" -or $_.RegistryKeyword -eq $setting } | Reset-NetAdapterAdvancedProperty +} +Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root/WMI | Set-CimInstance -Property @{ Enable = $true } + +Write-Host "Enabling miscellaneous power-saving..." -ForegroundColor Yellow +# Disable D3 support on SATA/NVMEs while using Modern Standby +# Reference: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro#d3-support +Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Storage" -Name "StorageD3InModernStandby" -ErrorAction SilentlyContinue +# Disable IdlePowerMode for stornvme.sys (storage devices) - the device will never enter a low-power state +Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "IdlePowerMode" -ErrorAction SilentlyContinue +# Reset power throttling to default +# Reference: https://blogs.windows.com/windows-insider/2017/04/18/introducing-power-throttling +Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -ErrorAction SilentlyContinue +# Enable the kernel being tickless +# Reference: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#additional-settings +bcdedit /deletevalue disabledynamictick *> $null + +# Finish +$null = Read-Host "`nCompleted.`nPress Enter to exit" \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisableFileSharing.ps1 similarity index 64% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd rename to src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisableFileSharing.ps1 index 97993255cb..974554f8cf 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Disable File Sharing (default).cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisableFileSharing.ps1 @@ -1,19 +1,10 @@ -<# : batch portion -@echo off -if "%*" == "" ( - whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b - ) -) +#Requires -RunAsAdministrator -set args= & set "args1=%*" -if defined args1 set "args=%args1:"='%" -PowerShell -NoP "& ([Scriptblock]::Create((Get-Content '%~f0' -Raw))) %args%" -exit /b %ERRORLEVEL% -: end batch / begin PowerShell #> +param ( + [switch]$Silent +) -$networkDiscoveryConfigPath = "$env:windir\AtlasDesktop\3. Configuration\Network Discovery" +$networkDiscoveryConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\Network Discovery" # Disable network items Disable-NetAdapterBinding -Name "*" -ComponentID ms_msclient, ms_server, ms_lltdio, ms_rspndr | Out-Null @@ -24,8 +15,8 @@ foreach ($interface in $interfaces) { Set-ItemProperty -Path $interface.PSPath -Name "NetbiosOptions" -Value 2 | Out-Null } -# Disable Net Bios service -cmd /c "call setSvc.cmd NetBT 4" +# Disable NetBIOS service +sc.exe config NetBT start=disabled | Out-Null # Set network profile to 'Public Network' $profiles = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles" -Recurse | Where-Object { $_.GetValue("Category") -ne $null } @@ -39,9 +30,10 @@ Get-NetFirewallRule | Where-Object { $_.Profile -like "*Private*" } | Disable-NetFirewallRule -if ($LASTEXITCODE -eq 1) {reg import "$networkDiscoveryConfigPath\Network Navigation Pane\Disable Network Navigation Pane (default).reg" | Out-Null} +reg import "$networkDiscoveryConfigPath\Network Navigation Pane\Disable Network Navigation Pane (default).reg" | Out-Null + +if ($Silent) { exit } -Clear-Host Write-Host "Completed!" -ForegroundColor Green Write-Host "Press any key to exit... " -NoNewLine $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisablePowerSaving.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisablePowerSaving.ps1 new file mode 100644 index 0000000000..431a1e6013 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisablePowerSaving.ps1 @@ -0,0 +1,135 @@ +#Requires -RunAsAdministrator + +param ( + [switch]$Silent +) + +if (!$Silent) { + $isLaptop = (Get-CimInstance -Class Win32_ComputerSystem -Property PCSystemType).PCSystemType -eq 2 + if ($isLaptop) { + Write-Host @" +WARNING: You are on a laptop, disabling power saving will cause faster battery drainage and increased heat output. + If you use your laptop on battery, certain power saving features will enable, but not all. + Generally, it's NOT recommended to run this script on laptops.`n +"@ -ForegroundColor Yellow + Start-Sleep 2 + } + + Write-Host @" +This script will disable many power saving features in Windows for reduced latency and increased performance. +Ensure that you have adequate cooling.`n +"@ -ForegroundColor Cyan + Pause +} + +Write-Host "`nAdding power scheme..." -ForegroundColor Yellow +# Duplicate Ultimate Performance power scheme, customize it and make it the Atlas power scheme +if (!(powercfg /l | Select-String "GUID: 11111111-1111-1111-1111-111111111111" -Quiet)) { + powercfg /duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 11111111-1111-1111-1111-111111111111 > $null +} +powercfg /setactive 11111111-1111-1111-1111-111111111111 +powercfg /changename scheme_current "Atlas Power Scheme" "Power scheme optimized for optimal latency and performance." +## Secondary NVMe Idle Timeout - 0 miliseconds +powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 d3d55efd-c1ff-424e-9dc3-441be7833010 0 +## Primary NVMe Idle Timeout - 0 miliseconds +powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 d639518a-e56d-4345-8af2-b9f32fb26109 0 +## NVME NOPPME - Off +powercfg /setacvalueindex scheme_current 0012ee47-9041-4b5d-9b77-535fba8b1442 fc7372b6-ab2d-43ee-8797-15e9841f2cca 0 +## Slide show - Paused +powercfg /setacvalueindex scheme_current 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 1 +## Hub Selective Suspend Timeout - 0 miliseconds +powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 0853a681-27c8-4100-a2fd-82013e970683 0 +## USB selective suspend - Disabled +powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0 +## USB 3 Link Power Mangement - Off +powercfg /setacvalueindex scheme_current 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 0 +## Allow Throttle States - Off +powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb 0 +## Dim display after - 0 seconds +powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 17aaa29b-8b43-4b94-aafe-35f64daaf1ee 0 +## Turn off display after - 0 seconds +powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0 +## Processor performance time check interval - 200 miliseconds +## Reduces DPCs, can be set all the way to 5000ms for statically clocked systems +powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 200 +# Set the active scheme as the current scheme +powercfg /setactive scheme_current + +Write-Host "Disabling power-saving ACPI devices..." -ForegroundColor Yellow +& toggleDev.cmd -Disable '@("ACPI Processor Aggregator", "Microsoft Windows Management Interface for ACPI")' | Out-Null + +Write-Host "Disabling network adapter power-saving..." -ForegroundColor Yellow +$properties = Get-NetAdapter -Physical | Get-NetAdapterAdvancedProperty +foreach ($setting in @( + # Stands for Ultra Low Power + "ULPMode", + + # Energy Efficient Ethernet + "EEE", + "EEELinkAdvertisement", + "AdvancedEEE", + "EnableGreenEthernet", + "EeePhyEnable", + + # Wi-Fi capability that saves power consumption + "uAPSDSupport", + + # Self-explanatory + "EnablePowerManagement", + "EnableSavePowerNow", + "bLowPowerEnable", + "PowerSaveMode", + "PowerSavingMode", + "SavePowerNowEnabled", + "AutoPowerSaveModeEnabled", + "NicAutoPowerSaver", + "SelectiveSuspend" +)) { + $properties | Where-Object { $_.RegistryKeyword -eq "*$setting" -or $_.RegistryKeyword -eq $setting } | Set-NetAdapterAdvancedProperty -RegistryValue 0 +} + +Write-Host "Disabling device power-saving..." -ForegroundColor Yellow +$keys = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Enum" -Recurse -EA 0 +foreach ($value in @( + "AllowIdleIrpInD3", + "D3ColdSupported", + "DeviceSelectiveSuspended", + "EnableIdlePowerManagement", + "EnableSelectiveSuspend", + "EnhancedPowerManagementEnabled", + "IdleInWorkingState", + "SelectiveSuspendEnabled", + "SelectiveSuspendOn", + "WaitWakeEnabled", + "WakeEnabled", + "WdfDirectedPowerTransitionEnable" +)) { + $keys | Where-Object { $_.GetValueNames() -contains $value } | ForEach-Object { + $keyPath = $_.PSPath + $oldValue = "$value-OLD" + + if ($null -eq (Get-ItemProperty -Path $keyPath -Name $oldValue -EA 0)) { + Rename-ItemProperty -Path $keyPath -Name $value -NewName $oldValue -Force + } + + Set-ItemProperty -Path $KeyPath -Name $value -Value 0 -Type DWORD -Force + } +} +Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root/WMI | Set-CimInstance -Property @{ Enable = $false } + +Write-Host "Disabling miscellaneous power-saving..." -ForegroundColor Yellow +# Disable D3 support on SATA/NVMEs while using Modern Standby +New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Storage" -Name "StorageD3InModernStandby" -Value 0 -PropertyType DWORD -Force | Out-Null +# Disable IdlePowerMode for stornvme.sys (storage devices) - the device will never enter a low-power state +New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "IdlePowerMode" -Value 0 -PropertyType DWORD -Force | Out-Null +# Disable power throttling +$powerKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" +if (!(Test-Path $powerKey)) { New-Item $powerKey | Out-Null } +New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -Value 1 -PropertyType DWORD -Force | Out-Null +# Disable the kernel from being tickless +# It's power saving +# https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#additional-settings +bcdedit /set disabledynamictick yes | Out-Null + +if ($Silent) { exit } +$null = Read-Host "`nCompleted.`nPress Enter to exit" \ No newline at end of file diff --git a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/EnableFileSharing.ps1 similarity index 74% rename from src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd rename to src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/EnableFileSharing.ps1 index 7d495ac18f..8d65d7cb2d 100644 --- a/src/playbook/Executables/AtlasDesktop/3. Configuration/Network Discovery/File Sharing/Enable File Sharing.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/EnableFileSharing.ps1 @@ -1,19 +1,6 @@ -<# : batch portion -@echo off -if "%*" == "" ( - whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b - ) -) - -set args= & set "args1=%*" -if defined args1 set "args=%args1:"='%" -PowerShell -NoP "& ([Scriptblock]::Create((Get-Content '%~f0' -Raw))) %args%" -exit /b %ERRORLEVEL% -: end batch / begin PowerShell #> - -$networkDiscoveryConfigPath = "$env:windir\AtlasDesktop\3. Configuration\Network Discovery" +#Requires -RunAsAdministrator + +$networkDiscoveryConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\Network Discovery" # Enable network items Enable-NetAdapterBinding -Name "*" -ComponentID ms_msclient, ms_server, ms_lltdio, ms_rspndr | Out-Null @@ -27,8 +14,8 @@ foreach ($interface in $interfaces) { Set-ItemProperty -Path $interface.PSPath -Name "NetbiosOptions" -Value 2 | Out-Null } -# Enable Net Bios service -cmd /c "call setSvc.cmd NetBT 1" +# Enable NetBIOS service +sc.exe config NetBT start=system | Out-Null choice /c:yn /n /m "Would you like to change your network profile to 'Private'? [Y/N] " if ($LASTEXITCODE -eq 1) { @@ -50,9 +37,10 @@ if ($LASTEXITCODE -eq 1) { } choice /c:yn /n /m "Would you like to add the Network Navigation Pane to the Explorer sidebar? [Y/N] " -if ($LASTEXITCODE -eq 1) {reg import "$networkDiscoveryConfigPath\Network Navigation Pane\User Network Navigation Pane choice.reg" | Out-Null} +if ($LASTEXITCODE -eq 1) { + reg import "$networkDiscoveryConfigPath\Network Navigation Pane\User Network Navigation Pane choice.reg" | Out-Null +} -Clear-Host Write-Host "Completed!" -ForegroundColor Green Write-Host "Press any key to exit... " -NoNewLine $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/InstallSoftware.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/InstallSoftware.ps1 index 28e9cfdd12..1ca3979465 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/InstallSoftware.ps1 +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/InstallSoftware.ps1 @@ -1,6 +1,7 @@ -& "$env:windir\AtlasModules\Scripts\wingetCheck.cmd" -if ($LASTEXITCODE -ne '0') {exit 1} +& "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\wingetCheck.cmd" +if ($LASTEXITCODE -ne 0) { exit 1 } +Clear-Host $ErrorActionPreference = 'SilentlyContinue' [int] $global:column = 0 @@ -82,9 +83,6 @@ init_item "Brave Browser" "Brave.Brave" # https://winget.run/pkg/Google/Chrome init_item "Google Chrome" "Google.Chrome" -# https://winget.run/pkg/Microsoft/Edge -init_item "Microsoft Edge" "Microsoft.Edge" - # https://winget.run/pkg/LibreWolf/LibreWolf init_item "LibreWolf" "LibreWolf.LibreWolf" @@ -172,6 +170,20 @@ init_item "Lightshot" "Skillbrains.Lightshot" # https://winget.run/pkg/ShareX/ShareX init_item "ShareX" "ShareX.ShareX" +# https://www.microsoft.com/store/productId/9MZ95KL8MR0L?ocid=pdpshare +init_item "Snipping Tool" "9MZ95KL8MR0L" + +# https://winget.run/pkg/valinet/ExplorerPatcher +init_item "ExplorerPatcher" "valinet.ExplorerPatcher" + +if ([System.Environment]::OSVersion.Version.Build -ge 22000) { + # https://winget.run/pkg/StartIsBack/StartAllBack + init_item "StartAllBack" "StartIsBack.StartAllBack" +} else { + # https://winget.run/pkg/StartIsBack/StartAllBack + init_item "StartIsBack" "StartIsBack.StartIsBack" +} + $global:item_count = $global:items.Length # Getting the index for splitting into two columns diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/RemoveEdge.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/RemoveEdge.ps1 index cae7c4a3ed..addfa22f89 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/RemoveEdge.ps1 +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/RemoveEdge.ps1 @@ -1,52 +1,105 @@ +#Requires -Version 5.0 + <# .SYNOPSIS - Uninstalls Edge and Edge-related components. + Uninstalls or reinstalls Microsoft Edge and its related components. Made by @he3als. .Description - Uninstalls Edge and Edge-related components in a non-forceful manner, based upon the switches or user choices. - - .PARAMETER UninstallAll - Uninstalls everything, including WebView, Update, etc... without interaction, including Edge user data. + Uninstalls or reinstalls Microsoft Edge and its related components in a non-forceful manner, based upon switches or user choices in a TUI. .PARAMETER UninstallEdge - Uninstalls Edge-only, leaving the Edgeuser data, without interaction. + Uninstalls Edge, leaving the Edge user data. + + .PARAMETER InstallEdge + Installs Edge, leaving the previous Edge user data. - .PARAMETER Exit - When combined with other parameters, this exits the script (even if there's errors) on completion. + .PARAMETER InstallWebView + Installs Edge WebView2 using the Evergreen installer. + + .PARAMETER RemoveEdgeData + Removes all Edge user data. Compatible with -InstallEdge. .PARAMETER KeepAppX - Keeps the AppX, in case you want to use alternative AppX removal methods. + Doesn't check for and remove the AppX, in case you want to use alternative AppX removal methods. Doesn't work with UninstallEdge. - .LINK - https://github.com/he3als/EdgeRemover + .PARAMETER NonInteractive + When combined with other parameters, this does not prompt the user for anything. .LINK - https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6 + https://github.com/he3als/EdgeRemover #> param ( - [switch]$UninstallAll, [switch]$UninstallEdge, - [switch]$Exit, - [switch]$KeepAppX + [switch]$InstallEdge, + [switch]$InstallWebView, + [switch]$RemoveEdgeData, + [switch]$KeepAppX, + [switch]$NonInteractive ) -$version = '1.7' -$host.UI.RawUI.WindowTitle = "EdgeRemover $version | made by @he3als" - -# credit to ave9858 for Edge removal method: https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6 $ProgressPreference = "SilentlyContinue" -$user = $env:USERNAME -$SID = (New-Object System.Security.Principal.NTAccount($user)).Translate([Security.Principal.SecurityIdentifier]).Value -$EdgeRemoverReg = 'HKLM:\SOFTWARE\EdgeRemover' +$sys32 = [Environment]::GetFolderPath('System') +$env:path = "$([Environment]::GetFolderPath('Windows'));$sys32;$sys32\Wbem;$sys32\WindowsPowerShell\v1.0;" + $env:path + +if ($NonInteractive -and (!$UninstallEdge -and !$InstallEdge -and !$InstallWebView)) { + $NonInteractive = $false +} +if ($InstallEdge -and $UninstallEdge) { + throw "You can't use both -InstallEdge and -UninstallEdge as arguments." +} + +function Pause ($message = "Press Enter to exit") { + if (!$NonInteractive) { $null = Read-Host $message } +} + +enum LogLevel { + Success + Info + Warning + Error + Critical +} + +function Write-Status { + param ( + [Parameter(Mandatory=$true)] + [string]$Text, + [LogLevel]$Level = "Info", + [switch]$Exit, + [string]$ExitString = "Press Enter to exit", + [int]$ExitCode = 1 + ) -if ($Exit -and ((-not $UninstallAll) -and (-not $UninstallEdge))) { - $Exit = $false + $colour = @( + "Green", + "White", + "Yellow", + "Red", + "Red" + )[$([LogLevel].GetEnumValues().IndexOf([LogLevel]"$Level"))] + + $Text -split "`n" | ForEach-Object { + Write-Host "[$($Level.ToString().ToUpper())] $_" -ForegroundColor $colour + } + + if ($Exit) { + Write-Output "" + Pause $ExitString + exit $ExitCode + } } -function PauseNul ($message = "Press any key to continue... ") { - Write-Host $message -NoNewLine - $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null +function InternetCheck { + if ($(Test-Connection "microsoft.com" -Count 1 -EA 0; $?) -eq $false) { + Write-Status "Failed to ping Microsoft! You must have an internet connection to reinstall Edge and its components." -Level Critical -Exit + } +} + +function DeleteIfExist($Path) { + if (Test-Path $Path) { + Remove-Item -Path $Path -Force -Recurse -Confirm:$false + } } function Uninstall-MsiexecAppByName { @@ -66,128 +119,90 @@ function Uninstall-MsiexecAppByName { foreach ($key in $uninstallKeys.PSPath) { if (((Get-ItemProperty -Path $key).DisplayName -like "*$Name*") -and ((Get-ItemProperty -Path $key).UninstallString -like "*MsiExec.exe*")) { - Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /X$(Split-Path -Path $key -Leaf) REBOOT=ReallySuppress /norestart" 2>&1 | Out-Null + Write-Status "Uninstalling `"$name`" using Windows Installer..." + Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /X$(Split-Path -Path $key -Leaf) REBOOT=ReallySuppress /norestart" -Wait | Out-Null } } } -function BlockEdgeInstallandUpdates { - # lots of these will only apply when domain joined and such - # further research is needed generally - # https://learn.microsoft.com/en-us/deployedge/microsoft-edge-update-policies - - $EdgeInstallUID = '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}' - $WebViewInstallUID = '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' - $EdgeUpdatePolicyKey = 'HKLM:\SOFTWARE\Policies\Microsoft\EdgeUpdate' - - # clear key - Remove-Item -Path $EdgeUpdatePolicyKey -Recurse -Force -EA SilentlyContinue - New-Item -Path $EdgeUpdatePolicyKey -Force | Out-Null - - if ($removeEdge) { - # set misc options - Set-ItemProperty -Path $EdgeUpdatePolicyKey -Name 'CreateDesktopShortcutDefault' -Value 0 -Type Dword -Force - - # block Edge install/update - Set-ItemProperty -Path $EdgeUpdatePolicyKey -Name "Install$EdgeInstallUID" -Value 0 -Type Dword -Force - } - - $completeBlockPolicies = @{ - # block Edge updates - "Update$EdgeInstallUID" = 2 - - # block WebView install/update - "Install$WebViewInstallUID" = 0 - "Update$WebViewInstallUID" = 2 - - # block update checks - "AutoUpdateCheckPeriodMinutes" = 0 - "UpdatesSuppressedStartMin" = 0 - "UpdatesSuppressedStartHour" = 0 - "UpdatesSuppressedDurationMin" = 1440 - } - - $EdgeUpdateDisabled = "$EdgeRemoverReg\EdgeUpdateDisabled" - $EdgeUpdateOrchestrator = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\EdgeUpdate' - if ($blockEdge) { - New-Item -Path $EdgeRemoverReg -Force -EA SilentlyContinue | Out-Null - foreach ($a in $completeBlockPolicies.Keys) { - Set-ItemProperty -Path $EdgeUpdatePolicyKey -Name $a -Value $completeBlockPolicies.$a -Type Dword -Force - } - - if ((Test-Path $EdgeUpdateOrchestrator) -and (Test-Path $EdgeUpdateDisabled)) { - Remove-Item -Path $EdgeUpdateDisabled -Force - } - if (Test-Path $EdgeUpdateOrchestrator) { Move-Item -Path $EdgeUpdateOrchestrator -Destination $EdgeUpdateDisabled -Force } - } else { - if (!(Test-Path $EdgeUpdateOrchestrator) -and (Test-Path $EdgeUpdateDisabled)) { - Move-Item -Path $EdgeUpdateDisabled -Destination $EdgeUpdateOrchestrator -Force - } +function KillEdgeProcesses { + $ErrorActionPreference = 'SilentlyContinue' + foreach ($service in (Get-Service -Name "*edge*" | Where-Object {$_.DisplayName -like "*Microsoft Edge*"}).Name) { + Stop-Service -Name $service -Force } -} - -function DeleteEdgeUpdate { - # surpress errors as some Edge Update components may not exist - $global:ErrorActionPreference = 'SilentlyContinue' - - # remove scheduled tasks - Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -Force | Out-Null - Unregister-ScheduledTask -TaskName "MicrosoftEdgeUpdateTaskMachineCore" -Confirm:$false | Out-Null - Unregister-ScheduledTask -TaskName "MicrosoftEdgeUpdateTaskMachineUA" -Confirm:$false | Out-Null - - if ($removeWebView) { - # delete edge services - foreach ($service in $services) { - sc.exe delete $service - } - - # delete the edgeupdate folder - Remove-Item -Path "$env:SystemDrive\Program Files (x86)\Microsoft\EdgeUpdate" -Recurse -Force | Out-Null + foreach ( + $process in + (Get-Process | Where-Object {($_.Path -like "$([Environment]::GetFolderPath('ProgramFilesX86'))\Microsoft\*") -or ($_.Name -like "*msedge*")}).Id + ) { + Stop-Process -Id $process -Force } - - # revert error action preference - $global:ErrorActionPreference = 'Continue' + $ErrorActionPreference = 'Continue' } function RemoveEdgeChromium { $baseKey = "HKLM:\SOFTWARE\WOW6432Node\Microsoft" - $ErrorActionPreference = 'SilentlyContinue' - - # check for copilot - $copilot = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowCopilotButton" -EA 0)."ShowCopilotButton" -eq 1 - # terminate Edge processes - $services = (Get-Service -Name "*edge*" | Where-Object {$_.DisplayName -like "*Microsoft Edge*"}).Name - $processes = (Get-Process | Where-Object {($_.Path -like "$env:SystemDrive\Program Files (x86)\Microsoft\*") -or ($_.Name -like "*msedge*")}).Id - foreach ($process in $processes) { - Stop-Process -Id $process -Force - } - foreach ($service in $services) { - Stop-Service -Name $service -Force - } - - $ErrorActionPreference = 'Continue' + Write-Status "Terminating Microsoft Edge processes..." + KillEdgeProcesses # check if 'experiment_control_labels' value exists and delete it if found $keyPath = Join-Path -Path $baseKey -ChildPath "EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" $valueName = "experiment_control_labels" if (Test-Path $keyPath) { - $valueExists = Get-ItemProperty -Path $keyPath -Name $valueName -ErrorAction SilentlyContinue - if ($null -ne $valueExists) { + if ($null -ne (Get-ItemProperty -Path $keyPath -Name $valueName -ErrorAction 0)) { Remove-ItemProperty -Path $keyPath -Name $valueName -Force | Out-Null } } # allow Edge uninstall + # seems to no longer exist, kept anyways for legacy purposes + # replaced with modifying IntegratedServicesRegionPolicySet.json $devKeyPath = Join-Path -Path $baseKey -ChildPath "EdgeUpdateDev" - if (-not (Test-Path $devKeyPath)) { New-Item -Path $devKeyPath -ItemType "Key" -Force | Out-Null } + if (!(Test-Path $devKeyPath)) { New-Item -Path $devKeyPath -ItemType "Key" -Force | Out-Null } Set-ItemProperty -Path $devKeyPath -Name "AllowUninstall" -Value "" -Type String -Force | Out-Null + # modifies IntegratedServicesRegionPolicySet as that's now checked for Edge uninstall + # likely to be the most future proof method, although i'm not sure what could happen next + $integratedServicesPath = "$sys32\IntegratedServicesRegionPolicySet.json" + if (!(Test-Path $integratedServicesPath)) { + Write-Warning "'$integratedServicesPath' not found, uninstall might fail." + } else { + try { + $admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value + + # get perms (normally TrustedInstaller only) + $acl = Get-Acl -Path $integratedServicesPath + $backup = [System.Security.AccessControl.FileSecurity]::new() + $backup.SetSecurityDescriptorSddlForm($acl.Sddl) + # full control + $acl.SetOwner($admin) + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, "FullControl", "Allow") + $acl.AddAccessRule($rule) + # set modified ACL + Set-Acl -Path $integratedServicesPath -AclObject $acl + + # modify the stuff + $integratedServices = Get-Content $integratedServicesPath | ConvertFrom-Json + ($integratedServices.policies | Where-Object { ($_.'$comment' -like "*Edge*") -and ($_.'$comment' -like "*uninstall*") }).defaultState = 'enabled' + $modifiedJson = $integratedServices | ConvertTo-Json -Depth 100 + + $backupIntegratedServicesName = "IntegratedServicesRegionPolicySet.json.$([System.IO.Path]::GetRandomFileName())" + Rename-Item $integratedServicesPath -NewName $backupIntegratedServicesName -Force + Set-Content $integratedServicesPath -Value $modifiedJson -Force -Encoding UTF8 + } catch { + Write-Error "Failed to modify region policies. $_" + } + } + + # uninstall Edge with MsiExec (e.g. WinGet installs) + # has to be done before uninstalling with CLI args + Uninstall-MsiexecAppByName -Name "Microsoft Edge" + # uninstall Edge $uninstallKeyPath = Join-Path -Path $baseKey -ChildPath "Windows\CurrentVersion\Uninstall\Microsoft Edge" if (Test-Path $uninstallKeyPath) { $uninstallString = (Get-ItemProperty -Path $uninstallKeyPath).UninstallString + " --force-uninstall" - Start-Process cmd.exe "/c $uninstallString" -WindowStyle Hidden 2>&1 | Out-Null + Start-Process -Wait cmd.exe -ArgumentList "/c start /wait `"`" $uninstallString" -WindowStyle Hidden } else { $edges = @(); 'LocalApplicationData','ProgramFilesX86','ProgramFiles' | ForEach-Object { $folder = [Environment]::GetFolderPath($_) @@ -199,30 +214,30 @@ function RemoveEdgeChromium { } } - # uninstall Edge with MsiExec (e.g. WinGet installs) - Uninstall-MsiexecAppByName -Name "Microsoft Edge" - - # remove user data - if ($removeData) { - $path = "$env:LOCALAPPDATA\Microsoft\Edge" - if (Test-Path $path) {Remove-Item $path -Force -Recurse} + # revert IntegratedServicesRegionPolicySet modification + if ($backupIntegratedServicesName) { + Remove-Item $integratedServicesPath -Force + Rename-Item "$sys32\$backupIntegratedServicesName" -NewName $integratedServicesPath -Force + Set-Acl -Path $integratedServicesPath -AclObject $backup } - # remove Edge shortcut on desktop - # may exist for some people after a proper uninstallation - $shortcutPath = "$env:USERPROFILE\Desktop\Microsoft Edge.lnk" - if (Test-Path $shortcutPath) { - Remove-Item $shortcutPath -Force - } + # remove old shortcuts + "$([Environment]::GetFolderPath('Desktop'))\Microsoft Edge.lnk", + "$([Environment]::GetFolderPath('CommonStartMenu'))\Microsoft Edge.lnk" | ForEach-Object { DeleteIfExist $_ } - # restart explorer if Copilot is enabled - # this will hide the Copilot button - if ($copilot) { + # restart explorer if Copilot is enabled - this will hide the Copilot button + if ((Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowCopilotButton" -EA 0)."ShowCopilotButton" -eq 1) { Stop-Process -Name explorer -Force -ErrorAction SilentlyContinue } } function RemoveEdgeAppX { + # i'm aware of how this is deprecated + # kept for legacy purposes just in case someone's using an older build of Windows + # will be removed eventually + + $SID = (New-Object System.Security.Principal.NTAccount([Environment]::UserName)).Translate([Security.Principal.SecurityIdentifier]).Value + # remove from Registry $appxStore = '\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore' $pattern = "HKLM:$appxStore\InboxApplications\Microsoft.MicrosoftEdge_*_neutral__8wekyb3d8bbwe" @@ -235,167 +250,240 @@ function RemoveEdgeAppX { Remove-Item -Path "HKLM:$appxStore\EndOfLife\$SID\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" -Force | Out-Null } -function RemoveWebView { - $webviewUninstallKey = @() - $webviewKey = "Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" - foreach ($key in @( - "HKCU:\SOFTWARE\$webviewKey" - "HKLM:\SOFTWARE\WOW6432Node\$webviewKey" - )) { - $webviewUninstallKey += $key - } +function InstallEdgeChromium { + InternetCheck - if ($key.Count -eq 0) { - $webViews = @(); 'LocalApplicationData','ProgramFilesX86','ProgramFiles' | ForEach-Object { - $folder = [Environment]::GetFolderPath($_) - $webViews += Get-ChildItem "$folder\Microsoft\Edge*\setup.exe" -Recurse -EA SilentlyContinue | Where-Object {$_ -like '*EdgeWebView*'} + $temp = mkdir (Join-Path $([System.IO.Path]::GetTempPath()) $(New-Guid)) + $msi = "$temp\edge.msi" + $msiLog = "$temp\edgeMsi.log" + + if ([Environment]::Is64BitOperatingSystem) { + $arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') + $archString = ('x64', 'arm64')[$arm] + } else { + $archString = 'x86' + } + + Write-Status "Requesting from the Microsoft Edge Update API..." + try { + try { + $edgeUpdateApi = (Invoke-WebRequest "https://edgeupdates.microsoft.com/api/products" -UseBasicParsing).Content | ConvertFrom-Json + } catch { + Write-Status "Failed to request from EdgeUpdate API! +Error: $_" -Level Critical -Exit } - foreach ($setup in $webViews) { - $sulevel = ('--system-level','--user-level')[$setup -like '*\AppData\Local\*'] - Start-Process -Wait $setup -ArgumentList "--uninstall --msedgewebview $sulevel --verbose-logging --force-uninstall" + $edgeItem = ($edgeUpdateApi | ? { $_.Product -eq 'Stable' }).Releases | + Where-Object { $_.Platform -eq 'Windows' -and $_.Architecture -eq $archString } | + Where-Object { $_.Artifacts.Count -ne 0 } | Select-Object -First 1 + + if ($null -eq $edgeItem) { + Write-Status "Failed to parse EdgeUpdate API! No matching artifacts found." -Level Critical -Exit } - } else { - foreach ($key in $webviewUninstallKey) { - $webviewUninstallString = (Get-ItemProperty -Path $key -EA 0).UninstallString - if ($null -ne $webviewUninstallString) { - Start-Process cmd.exe $("/c $webviewUninstallString" + " --force-uninstall") -WindowStyle Hidden 2>&1 | Out-Null + + $hashAlg = $edgeItem.Artifacts.HashAlgorithm | % { if ([string]::IsNullOrEmpty($_)) { "SHA256" } else { $_ } } + foreach ($var in @{ + link = $edgeItem.Artifacts.Location + hash = $edgeItem.Artifacts.Hash + version = $edgeItem.ProductVersion + sizeInMb = [math]::round($edgeItem.Artifacts.SizeInBytes/1Mb) + released = Get-Date $edgeItem.PublishedTime + }.GetEnumerator()) { + $val = $var.Value | Select-Object -First 1 + if ($val.Length -le 0) { + Set-Variable -Name $var.Key -Value "Undefined" + if ($var.Key -eq 'link') { throw "Failed to parse download link!" } + } else { + Set-Variable -Name $var.Key -Value $val } } + } catch { + Write-Status "Failed to parse Microsoft Edge from `"$link`"! +Error: $_" -Level Critical -Exit } - - Uninstall-MsiexecAppByName -Name "Microsoft Edge WebView2 Runtime" -} - -function UninstallAll { - if ($removeEdge) { - Write-Warning "Uninstalling Edge Chromium..." - RemoveEdgeChromium - if (!($KeepAppX)) { - Write-Warning "Uninstalling AppX Edge..." - RemoveEdgeAppx - } else {Write-Warning "AppX Edge is being left, there might be a stub..."} + Write-Status "Parsed Microsoft Edge Update API!" -Level Success + + Write-Host "`nDownloading Microsoft Edge:" -ForegroundColor Cyan + @( + @("Released on: ", $released), + @("Version: ", "$version (Stable)"), + @("Size: ", "$sizeInMb Mb") + ) | Foreach-Object { + Write-Host " - " -NoNewline -ForegroundColor Magenta + Write-Host $_[0] -NoNewline -ForegroundColor Yellow + Write-Host $_[1] } - if ($removeWebView) { - Write-Warning "Uninstalling Edge WebView..." - RemoveWebView + + Write-Output "" + try { + if ($null -eq (Get-Command curl.exe -EA 0)) { + Write-Status "Couldn't find cURL, using Invoke-WebRequest, which is slower..." -Level Warning + Invoke-WebRequest -Uri $link -Output $msi -UseBasicParsing + } else { + curl.exe -#L "$link" -o "$msi" + } + } catch { + Write-Status "Failed to download Microsoft Edge from `"$link`"! +Error: $_" -Level Critical -Exit } - if ($removeEdge -and $removeWebView) { - Write-Warning "Deleting Edge Update..." - DeleteEdgeUpdate + Write-Output "" + + if ($hash -eq "Undefined") { + Write-Status "Not verifying hash as it's undefined, download might have failed." -Level Warning + } else { + Write-Status "Verifying download by checking its hash..." + if ((Get-FileHash -LiteralPath $msi -Algorithm $hashAlg).Hash -eq $hash) { + Write-Status "Verified the Microsoft Edge installer!" -Level Success + } else { + Write-Status "Edge installer hash does not match. The installer might be corrupted. Continuing anyways..." -Level Error + } } - Write-Warning "Applying EdgeUpdate policies..." - BlockEdgeInstallandUpdates -} - -function ReinstallWarning { - Clear-Host - Write-Host "It's highly recommended to remove the install/update blocks to reinstall Edge." -ForegroundColor Yellow - choice /c:yn /n /m "Would you like to remove the blocks? [Y/N]" - if ($LASTEXITCODE -eq 1) { - $global:removeEdge = $false - $global:removeWebView = $false - $global:removeData = $false - $global:blockEdge = $false - BlockEdgeInstallandUpdates + + Write-Status "Installing Microsoft Edge..." + Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$msi`" /l `"$msiLog`" /quiet" -Wait + + if (!(Test-Path $msiLog)) { + Write-Status "Couldn't find installer log at `"$msiLog`"! This likely means it failed." -Level Critical -Exit } -} - -function Completed { - Write-Host "`nCompleted." -ForegroundColor Green - if (!$Exit) { - PauseNul "Press any key to exit... " + + Write-Status -Text "Installer log path: `"$msiLog`"" + if ($null -eq ($(Get-Content $msiLog) -like "*Product: Microsoft Edge -- * completed successfully.*")) { + Write-Status "Can't find sucess string from Edge install log - it seems like the install was a failure." -Level Error -Exit } - exit -} -if ($null -ne $(whoami /user | Select-String "S-1-5-18")) { - Write-Host "This script can't be ran as TrustedInstaller or SYSTEM. -ForegroundColor Yellow -Please relaunch this script under a regular admin account.`n" -ForegroundColor Yellow - if (!($Exit)) {PauseNul "Press any key to exit... "} - exit 1 -} else { - if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) { - Start-Process cmd "/c PowerShell -NoP -EP Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit - } + Write-Status -Text "Installed Microsoft Edge!" -Level Success } -if ($UninstallAll) { - $removeEdge = $true - $removeWebView = $true - $removeData = $true - $blockEdge = $true - UninstallAll - Completed -} +function InstallWebView { + InternetCheck -if ($UninstallEdge) { - $removeEdge = $true - $removeWebView = $false - $removeData = $false - UninstallAll - Completed -} + $dlPath = "$((Join-Path $([System.IO.Path]::GetTempPath()) $(New-Guid)))-webview2.exe" + $link = "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -# set defaults -$removeEdge = $true -$removeWebView = $false -$removeData = $false -$blockEdge = $false + Write-Status "Downloading Edge WebView..." + try { + if ($null -eq (Get-Command curl.exe -EA 0)) { + Write-Status "Couldn't find cURL, using Invoke-WebRequest, which is slower..." -Level Warning + Invoke-WebRequest -Uri $link -Output $dlPath -UseBasicParsing + } else { + curl.exe -Ls "$link" -o "$dlPath" + } + } catch { + Write-Status "Failed to download Edge WebView from `"$link`"! +Error: $_" -Level Critical -Exit + } -while (!($continue)) { - Clear-Host; Write-Host "This script will remove Microsoft Edge, as once it's installed, you can't uninstall it.`n" -ForegroundColor Blue + Write-Status "Installing Edge WebView..." + Start-Process -FilePath "$dlPath" -ArgumentList "/silent /install" -Wait - Write-Host "Selecting nothing will clear all install and update blocks." -ForegroundColor Yellow - Write-Host "You can reinstall WebView and Edge from the internet in the future.`n" -ForegroundColor Yellow + Write-Status "Installed Edge WebView!" -Level Success +} - if ($removeEdge) {$colourEdge = "Green"; $textEdge = "Selected"} else {$colourEdge = "Red"; $textEdge = "Unselected"} - if ($removeWebView) {$colourWeb = "Green"; $textWeb = "Selected"} else {$colourWeb = "Red"; $textWeb = "Unselected"} - if ($removeData) {$colourData = "Green"; $textData = "Selected"} else {$colourData = "Red"; $textData = "Unselected"} - if ($blockEdge) {$colourBlock = "Green"; $textBlock = "Selected"} else {$colourBlock = "Red"; $textBlock = "Unselected"} +# SYSTEM check - using SYSTEM previously caused issues +if ([Security.Principal.WindowsIdentity]::GetCurrent().User.Value -eq 'S-1-5-18') { + Write-Status "This script can't be ran as TrustedInstaller/SYSTEM. +Please relaunch this script under a regular admin account." -Level Critical -Exit +} else { + if (!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) { + if ($PSBoundParameters.Count -le 0 -and !$args) { + Start-Process cmd "/c PowerShell -NoP -EP Bypass -File `"$PSCommandPath`"" -Verb RunAs + exit + } else { + throw "This script must be run as an administrator." + } + } +} - Write-Host "Options:" - Write-Host "[1] Remove Edge ($textEdge)" -ForegroundColor $colourEdge - Write-Host "[2] Remove Edge WebView ($textWeb)" -ForegroundColor $colourWeb - Write-Host "[3] Remove Edge User Data ($textData)" -ForegroundColor $colourData - Write-Host "[4] Block WebView install & Edge updates ($textBlock)" -ForegroundColor $colourBlock +# main menu +if (!$UninstallEdge -and !$InstallEdge -and !$InstallWebView) { + $version = '1.9.2' + $host.UI.RawUI.WindowTitle = "EdgeRemover $version | made by @he3als" - Write-Host "`nReinstall Edge links:" - Write-Host "[5] Install Edge" -ForegroundColor Magenta - Write-Host "[6] Install WebView" -ForegroundColor Magenta + $RemoveEdgeData = $false + while (!$continue) { + Clear-Host + $description = "This script removes or installs Microsoft Edge." + Write-Host "$description`n" -ForegroundColor Blue + Write-Host @" +To select an option, type its number. +To perform an action, also type its number. +"@ -ForegroundColor Yellow - Write-Host "`nPress enter to continue or use numbers to select options... " -NoNewLine + Write-Host "`n$("-" * $description.Length)" -ForegroundColor Magenta - $userInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + if ($RemoveEdgeData) {$colourData = "Green"; $textData = "Selected"} else {$colourData = "Red"; $textData = "Unselected"} - switch ($userInput.VirtualKeyCode) { - 49 { # num 1 - $removeEdge = !$removeEdge - } - 50 { # num 2 - $removeWebView = !$removeWebView - } - 51 { # num 3 - $removeData = !$removeData - } - 52 { # num 4 - $blockEdge = !$blockEdge - } - 53 { # num 5 - ReinstallWarning - Start-Process "https://www.microsoft.com/en-us/edge/download" - } - 54 { # num 6 - ReinstallWarning - Start-Process "https://go.microsoft.com/fwlink/?linkid=2124701" + Write-Host "`nOptions:" + Write-Host "[1] Remove Edge User Data ($textData)" -ForegroundColor $colourData + + Write-Host "`nActions:" + Write-Host @" +[2] Uninstall Edge +[3] Install Edge +[4] Install WebView +[5] Install both Edge & WebView +"@ -ForegroundColor Cyan + + $userInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + + switch ($userInput.VirtualKeyCode) { + 49 { # remove Edge user data (1) + $RemoveEdgeData = !$RemoveEdgeData + } + 50 { # uninstall Edge (2) + $UninstallEdge = $true + $continue = $true + } + 51 { # reinstall Edge (3) + $InstallEdge = $true + $continue = $true + } + 52 { # reinstall WebView (4) + $InstallWebView = $true + $continue = $true + } + 53 { # reinstall both (5) + $InstallWebView = $true + $InstallEdge = $true + $continue = $true + } } - 13 { # enter - $continue = $true + } + + Clear-Host +} + +if ($UninstallEdge) { + Write-Status "Uninstalling Edge Chromium..." + RemoveEdgeChromium + if ($null -ne (Get-AppxPackage -Name Microsoft.MicrosoftEdge)) { + if ($KeepAppX) { + Write-Status "AppX Edge is being left, there might be a stub..." -Level Warning + } else { + Write-Status "Uninstalling AppX Edge..." -Level Warning + RemoveEdgeAppx } } + Write-Output "" +} + +if ($RemoveEdgeData) { + KillEdgeProcesses + DeleteIfExist "$([Environment]::GetFolderPath('LocalApplicationData'))\Microsoft\Edge" + Write-Status "Removed any existing Edge Chromium user data." -Level Success + Write-Output "" +} + +if ($InstallEdge) { + InstallEdgeChromium + Write-Output "" +} +if ($InstallWebView) { + InstallWebView + Write-Output "" } -Clear-Host -UninstallAll -Completed \ No newline at end of file +Write-Host "Completed." -ForegroundColor Cyan +if ($NonInteractive) { exit } +Pause \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/TelemetryComponents.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/TelemetryComponents.ps1 new file mode 100644 index 0000000000..6fc311d7c1 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/TelemetryComponents.ps1 @@ -0,0 +1,95 @@ +$ProgressPreference = 'SilentlyContinue' +function Pause ($message = "Press Enter to exit") { $null = Read-Host $message } +function Write-BulletPoint($message) { + Write-Host " - " -ForegroundColor Green -NoNewline + Write-Host $message +} +function Restart { + Write-Host "`nCompleted!" -ForegroundColor Green + choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " + if ($lastexitcode -eq 1) { + Restart-Computer + } else { + Write-Host "`nChanges will apply after next restart." -ForegroundColor Yellow + Pause + } +} + +$packageInstall = "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\packageInstall.ps1" +if (!(Test-Path $packageInstall)) { + Write-Host "Missing package install script, can't continue." + Pause + exit 1 +} + +$package = "*Z-Atlas-NoTelemetry-Package*" + +try { + $packages = (Get-WindowsPackage -online | Where-Object { $_.PackageName -like $package }).PackageName +} catch { + if (!$?) { + Write-Host "Failed to get packages! $_" -ForegroundColor Red + Pause + exit 1 + } +} +if ($null -eq $packages) { + $TelemetryEnabled = '(current)' +} else { + $TelemetryDisabled = '(current)' +} + +function Menu { + Clear-Host + $ColourDisable = $ColourEnable = 'White' + if ($TelemetryDisabled) {$ColourDisable = 'Gray'} else {$ColourEnable = 'Gray'} + + Write-Host "This script adds or removes Atlas' NoTelemetry package, which removes certain telemetry components in Windows.`n" -ForegroundColor Cyan + + Write-BulletPoint @" +Removing the package restores the telemetry components, which can aid in troubleshooting. If + resolving the issue involves removing the package, please report this as an issue to Atlas.`n +"@ + Write-BulletPoint @" +Atlas retains policies that should disable telemetry even after the package removal. These policies + do not work on Windows Home edition. +"@ + + Write-Host "`n---------------------------------------------------------------------------------------------------------`n" -ForegroundColor Magenta + + Write-Host "1) Add the NoTelemetry package $TelemetryDisabled" -ForegroundColor $ColourDisable + Write-Host "2) Remove the NoTelemetry package $TelemetryEnabled`n" -ForegroundColor $ColourEnable + + Write-Host "Choose 1/2: " -NoNewline -ForegroundColor Yellow + $pageInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + + switch ($pageInput.Character) { + # Add NoTelemetry package + 1 { + if ($TelemetryDisabled) {Menu} + Clear-Host + Write-Host "Adding the NoTelemetry package... This will take a moment." -ForegroundColor Yellow + + & $packageInstall -InstallPackages @($package) + exit $LASTEXITCODE + } + + # Remove NoTelemetry package + 2 { + if ($TelemetryEnabled) { Menu } + + Clear-Host + Write-Host "Removing the NoTelemetry package... This will take a moment." -ForegroundColor Yellow + + & $packageInstall -UninstallPackages @($package) + exit $LASTEXITCODE + } + + # Do nothing + default { + Menu + } + } +} + +Menu \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ToggleDefender.ps1 b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ToggleDefender.ps1 new file mode 100644 index 0000000000..b2859ad53e --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/ToggleDefender.ps1 @@ -0,0 +1,98 @@ +$ProgressPreference = 'SilentlyContinue' +function Pause ($message = "Press Enter to exit") { $null = Read-Host $message } +function Restart { + Write-Host "`nCompleted!" -ForegroundColor Green + choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " + if ($lastexitcode -eq 1) { + Restart-Computer + } else { + Write-Host "`nChanges will apply after next restart." -ForegroundColor Yellow + Pause + } +} + +$packageInstall = "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\packageInstall.ps1" +if (!(Test-Path $packageInstall)) { + Write-Host "Missing package install script, can't continue." + if (!$args) { Pause } + exit 1 +} + +$package = "*Z-Atlas-NoDefender-Package*" + +try { + $packages = (Get-WindowsPackage -online | Where-Object { $_.PackageName -like "*NoDefender*" }).PackageName +} catch { + if (!$?) { + Write-Host "Failed to get packages! $_" -ForegroundColor Red + Pause + exit 1 + } +} +if ($null -eq $packages) { + $DefenderEnabled = '(current)' +} else { + $DefenderDisabled = '(current)' +} + +function Menu { + Clear-Host + $ColourDisable = $ColourEnable = 'White' + if ($DefenderDisabled) {$ColourDisable = 'Gray'} else {$ColourEnable = 'Gray'} + + Write-Host "Only disable Defender if you've read the documentation first.`n" -ForegroundColor Cyan + + Write-Host "1) Disable Defender $DefenderDisabled" -ForegroundColor $ColourDisable + Write-Host "2) Enable Defender $DefenderEnabled" -ForegroundColor $ColourEnable + Write-Host "3) See documentation`n" -ForegroundColor White + + Write-Host "Choose 1/2/3: " -NoNewline -ForegroundColor Yellow + $pageInput = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + + switch ($pageInput.Character) { + # Disable Defender + 1 { + if ($DefenderDisabled) {Menu} + Clear-Host + + $text = "Are you sure that you want to disable Windows Defender?" + Write-Host "$text`n$(('-' * $text.Length))" -ForegroundColor Red + Write-Host "By continuing, you acknowledge that the security of`nyour computer will be worse, especially if you are`nprone to getting infected." -ForegroundColor Yellow + + Pause "`nPress Enter to continue anyways" + + Clear-Host + Write-Host "Disabling Windows Defender... This will take a moment." -ForegroundColor Yellow + + & $packageInstall -InstallPackages @($package) + exit $LASTEXITCODE + } + + # Enable Defender + 2 { + if ($DefenderEnabled) { Menu } + Clear-Host + Write-Host "After enabling Windows Defender and restarting, it is highly recommended to go through`nthe settings in Windows Security and enabling anything you need.`n" -ForegroundColor Yellow + Pause "Press Enter to enable Windows Defender" + + Clear-Host + Write-Host "Enabling Windows Defender... This will take a moment." -ForegroundColor Yellow + + & $packageInstall -UninstallPackages @($package) + exit $LASTEXITCODE + } + + # Documentation + 3 { + Start-Process "https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/#defender" + Menu + } + + # Do nothing + default { + Menu + } + } +} + +Menu \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/edgeCheck.cmd b/src/playbook/Executables/AtlasModules/Scripts/edgeCheck.cmd new file mode 100644 index 0000000000..ce2307e82e --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/edgeCheck.cmd @@ -0,0 +1,44 @@ +@echo off + +set ___edge=0 +if exist "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" ( + set ___edge=1 + if "%~1"=="/edgeonly" exit /b +) +if "%~1"=="/webview" set ___edge=1 + +set "___dashes=-----------------------------------------------------------------------------------------------------" +echo %___dashes% + +if %___edge%==0 ( + echo Microsoft Edge is required to use this script. + if %___edge%==0 echo In the future, if you no longer want to use this feature, you can use the disable script and uninstall Edge. + choice /c:yn /n /m "Would you like to install Edge? [Y/N] " + if %errorlevel%==2 ( + echo] + echo Press any key to exit... + pause > nul + exit /b + ) +) else ( + echo Updating Edge WebView 2... +) + +echo] +set "___ps=powershell -nop -noni -c "^& """%windir%\AtlasModules\Scripts\ScriptWrappers\RemoveEdge.ps1""" -NonInteractive -InstallWebView" +if %___edge%==0 ( + %___ps% -InstallEdge" +) else ( + %___ps%" +) + +if "%errorlevel%"=="1" ( + echo Something went wrong while trying to update/install Edge or WebView. + if "%~1" neq "/silent" ( + echo Press any key to exit... + pause > nul + ) + exit /b 1 +) + +echo %___dashes% \ No newline at end of file diff --git a/src/playbook/Executables/LOCKSCREEN.ps1 b/src/playbook/Executables/AtlasModules/Scripts/lockscreen.ps1 similarity index 69% rename from src/playbook/Executables/LOCKSCREEN.ps1 rename to src/playbook/Executables/AtlasModules/Scripts/lockscreen.ps1 index 67bb741bea..e55b16ea71 100644 --- a/src/playbook/Executables/LOCKSCREEN.ps1 +++ b/src/playbook/Executables/AtlasModules/Scripts/lockscreen.ps1 @@ -1,9 +1,13 @@ # Credit: https://superuser.com/a/1343640 -$imagePath = "$env:windir\AtlasModules\Wallpapers\lockscreen.png" +$imagePath = "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Wallpapers\lockscreen.png" -$newImagePath = [System.IO.Path]::GetDirectoryName($imagePath) + '\' + (New-Guid).Guid + [System.IO.Path]::GetExtension($imagePath) +if (!(Test-Path $imagePath)) { + throw "Lockscreen not found." +} + +$newImagePath = [System.IO.Path]::GetTempPath() + (New-Guid).Guid + [System.IO.Path]::GetExtension($imagePath) Copy-Item $imagePath $newImagePath -[Windows.System.UserProfile.LockScreen,Windows.System.UserProfile,ContentType=WindowsRuntime] | Out-Null +[Windows.System.UserProfile.LockScreen, Windows.System.UserProfile, ContentType = WindowsRuntime] | Out-Null Add-Type -AssemblyName System.Runtime.WindowsRuntime $asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0] Function Await($WinRtTask, $ResultType) { @@ -17,7 +21,7 @@ Function AwaitAction($WinRtAction) { $netTask = $asTask.Invoke($null, @($WinRtAction)) $netTask.Wait(-1) | Out-Null } -[Windows.Storage.StorageFile,Windows.Storage,ContentType=WindowsRuntime] | Out-Null +[Windows.Storage.StorageFile, Windows.Storage, ContentType = WindowsRuntime] | Out-Null $image = Await ([Windows.Storage.StorageFile]::GetFileFromPathAsync($newImagePath)) ([Windows.Storage.StorageFile]) AwaitAction ([Windows.System.UserProfile.LockScreen]::SetImageFileAsync($image)) Remove-Item $newImagePath \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/newUsers.ps1 b/src/playbook/Executables/AtlasModules/Scripts/newUsers.ps1 index e127486073..39dcda1390 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/newUsers.ps1 +++ b/src/playbook/Executables/AtlasModules/Scripts/newUsers.ps1 @@ -1,26 +1,65 @@ +param ( + [switch]$ThemeMRU +) + +$windir = [Environment]::GetFolderPath('Windows') +$atlasDesktop = "$windir\AtlasDesktop" +$atlasModules = "$windir\AtlasModules" + +function ThemeMRU { + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes" -Name "ThemeMRU" -Value "$((@( + "atlas-v0.4.x-dark.theme", + "atlas-v0.4.x-light.theme", + "atlas-v0.3.x-dark.theme", + "atlas-v0.3.x-light.theme", + "dark.theme", + "aero.theme" + ) | ForEach-Object { "$windir\resources\Themes\$_" }) -join ';');" -PropertyType String -Force +} +if ($ThemeMRU) { ThemeMRU; exit } + $title = 'Preparing Atlas user settings...' +if (!(Test-Path $atlasDesktop) -or !(Test-Path $atlasModules)) { + Write-Host "Atlas was about to configure user settings, but its files weren't found. :(" -ForegroundColor Red + $null = Read-Host "Press Enter to exit" + exit 1 +} + $Host.UI.RawUI.WindowTitle = $title Write-Host $title -ForegroundColor Yellow Write-Host $('-' * ($title.length + 3)) -ForegroundColor Yellow -Write-Host 'You''ll be logged out in 10 to 20 seconds, and once you login again, your new account will be ready for use.' +Write-Host "You'll be logged out in 10 to 20 seconds, and once you login again, your new account will be ready for use." # Disable Windows 11 context menu & 'Gallery' in File Explorer if ([System.Environment]::OSVersion.Version.Build -ge 22000) { - reg import "$env:windir\AtlasDesktop\4. Optional Tweaks\Windows 11 Context Menu\Old Context Menu (default).reg" *>$null - reg import "$env:windir\AtlasDesktop\4. Optional Tweaks\File Explorer Customization\Gallery\Disable Gallery (default).reg" *>$null + reg import "$atlasDesktop\4. Interface Tweaks\Context Menus\Windows 11\Old Context Menu (default).reg" *>$null + reg import "$atlasDesktop\4. Interface Tweaks\File Explorer Customization\Gallery\Disable Gallery (default).reg" *>$null + + # Set ThemeMRU (recent themes) + ThemeMRU | Out-Null } +# Set lockscreen wallpaper +& "$atlasModules\Scripts\lockscreen.ps1" + # Disable 'Network' in navigation pane -reg import "$env:windir\AtlasDesktop\3. Configuration\Network Discovery\Network Navigation Pane\Disable Network Navigation Pane (default).reg" *>$null +reg import "$atlasDesktop\3. General Configuration\Network Discovery\Network Navigation Pane\Disable Network Navigation Pane (default).reg" *>$null # Set visual effects -Start-Process -FilePath "$env:windir\AtlasDesktop\3. Configuration\Visual Effects\Atlas Visual Effects (default).cmd" -ArgumentList '/silent' -WindowStyle Hidden +& "$atlasDesktop\4. Interface Tweaks\Visual Effects\Atlas Visual Effects (default).cmd" /silent # Pin 'Videos' and 'Music' folders to Home/Quick Acesss $o = new-object -com shell.application -$o.Namespace("$env:userprofile\Videos").Self.InvokeVerb('pintohome') -$o.Namespace("$env:userprofile\Music").Self.InvokeVerb('pintohome') +$currentPins = $o.Namespace('shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}').Items() | ForEach-Object { $_.Path } +foreach ($path in @( + [Environment]::GetFolderPath('MyVideos'), + [Environment]::GetFolderPath('MyMusic') +)) { + if ($currentPins -notcontains $path) { + $o.Namespace($path).Self.InvokeVerb('pintohome') + } +} # Set taskbar search box to an icon Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Value 1 diff --git a/src/playbook/Executables/AtlasModules/Scripts/packageInstall.ps1 b/src/playbook/Executables/AtlasModules/Scripts/packageInstall.ps1 new file mode 100644 index 0000000000..792e914d02 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/packageInstall.ps1 @@ -0,0 +1,361 @@ +#Requires -RunAsAdministrator + +# GPL-3.0-only license +# ๐Ÿฆ† Modified from: https://github.com/he3als/online-sxs + +param ( + [array]$InstallPackages, + [array]$UninstallPackages, + [string]$PackagesPath = "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Packages", + [switch]$NoInteraction, + [switch]$SafeMode, + [switch]$FailMessage +) + +# ======================================================================================================================= # +# INITIAL VARIABLES # +# ======================================================================================================================= # +$sys32 = [Environment]::GetFolderPath('System') +$safeModePackageList = "$sys32\safeModePackagesToInstall.atlasmodule" +$env:path = "$([Environment]::GetFolderPath('Windows'));$sys32;$sys32\Wbem;$sys32\WindowsPowerShell\v1.0;$([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory());" + $env:path +$certRegPath = "HKLM:\Software\Microsoft\SystemCertificates\ROOT\Certificates" +$errorLevel = $warningLevel = 0 + +$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') +$armString = if ($arm) {'arm64'} else {'amd64'} + +$safeModeStatus = (Get-CimInstance -Class Win32_ComputerSystem).BootupState -ne 'Normal boot' + +# ======================================================================================================================= # +# FUNCTIONS # +# ======================================================================================================================= # +function Pause ($message = "Press Enter to exit") { + $null = Read-Host $message +} + +function Write-BulletPoint($message) { + $message | Foreach-Object { + Write-Host " - " -ForegroundColor Green -NoNewline + Write-Host $_ + } + Write-Host "" +} + +function SafeMode { + param ( + [switch]$Enable, + [switch]$FailMessage, + [array]$FailedPackageList, + [string]$FailedPackageListPath = $safeModePackageList + ) + + if ($Enable) { + $bcdeditArgs = '/set {current} safeboot minimal' + $shellValue = "explorer.exe,powershell -NoP -EP Unrestricted -File `"$PSCommandPath`" -SafeMode" + + if ($FailedPackageList) { + Set-Content -Path $FailedPackageListPath -Value $FailedPackageList + } + } else { + $bcdeditArgs = '/deletevalue {current} safeboot' + $shellValue = 'explorer.exe' + } + + if ($bcdeditArgs) { Start-Process -FilePath "bcdedit" -ArgumentList $bcdeditArgs -WindowStyle Hidden } + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name Shell -Value $shellValue -Force +} +if ( + ($safeModeStatus -and + (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name Shell).Shell -like "*$PSCommandPath*") -or + $SafeMode +) { + SafeMode +} + +function Restart { + shutdown /f /r /t 0 *>$null + Start-Sleep 2 + Restart-Computer + Start-Sleep 2 + Write-Host "Something seems to have went wrong restarting automatically, restart manually." -ForegroundColor Red + if (!$NoInteraction) { Pause } + exit 9000 +} + +function Finish($failedPackages) { + function GenerateText($text, $dashCount = 84) { + $seperator = "[ $('-' * $dashCount) ]" + $text = "[ $text $(' ' * ($dashCount - $text.Length - 1)) ]" + return @" +$seperator +$text +$seperator +"@ + } + + Write-Host "`n$(GenerateText "Completed! Errors: $script:errorLevel | Warnings: $script:warningLevel")`n" -ForegroundColor Green + + if ($failedPackages.Count -gt 0) { + Write-Host "Some packages failed to install:" -ForegroundColor Red + Write-BulletPoint $failedPackages + + if ($NoInteraction) { + Write-Host "Setting error message box next boot as NoInteraction is enabled." + Set-Content -Path $safeModePackageList -Value $failedPackages + + $failedMsgTitle = 'AtlasFailedComponentMsgBox' + $failedMsgArgs = "/c title Finalizing Installation - Atlas & echo Do not close this window. & schtasks /delete /tn `"$failedMsgTitle`" /f > nul & " ` + + "PowerShell -NoP -NonI -W Hidden -EP Bypass -C `"& '$PSCommandPath' -FailMessage`"" + $failedMsg = @{ + 'TaskName' = $failedMsgTitle + 'Settings' = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries + 'Trigger' = New-ScheduledTaskTrigger -AtLogOn + 'User' = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + 'Force' = $true + 'RunLevel' = 'Highest' + 'Action' = New-ScheduledTaskAction -Execute 'cmd' -Argument $failedMsgArgs + } + Register-ScheduledTask @failedMsg + + exit $script:errorLevel + } + + function NoRestart { + Write-Host "`nIf any packages installed successfully, they will apply next restart." -ForegroundColor Yellow + Pause + } + + if ($safeModeStatus) { + Write-Host "Please report this to the Atlas team, as there's no automatic fallbacks past Safe Mode." -ForegroundColor Magenta + choice /c yn /n /m "Would you like to restart out of Safe Mode? [Y/N] " + if ($lastexitcode -eq 1) { + Restart + } else { + NoRestart + } + } else { + choice /c yn /n /m "Would you like to boot into Safe Mode and attempt to install them? [Y/N] " + if ($lastexitcode -eq 1) { + SafeMode -Enable -FailedPackageList $failedPackages + Restart + } else { + NoRestart + } + } + + exit $script:errorLevel + } + + if ($NoInteraction) { exit $script:errorLevel } + choice /c yn /n /m "Would you like to restart now to apply the changes? [Y/N] " + if ($lastexitcode -eq 1) { + Restart + } else { + Write-Host "`nChanges will apply next restart." -ForegroundColor Yellow + Pause + exit $script:errorLevel + } +} + +# ======================================================================================================================= # +# UNINSTALL PACKAGES # +# ======================================================================================================================= # +if ($UninstallPackages) { + $installedPackages = @() + $notInstalledPackages = $UninstallPackages + (Get-WindowsPackage -Online).PackageName | ForEach-Object { + foreach ($package in $UninstallPackages) { + if (($_ -like $package) -and ($_ -like "*$armString*")) { + $installedPackages += $_ + $notInstalledPackages = $notInstalledPackages -ne $package + break + } + } + } + + if ($installedPackages.Count -eq 0) { + Write-Host "[WARN] '$UninstallPackages' matched no installed packages, nothing to do." -ForegroundColor Yellow + $script:warningLevel++ + } else { + if ($notMatchedPackages.Count -gt 0) { + Write-Host "[WARN] Some packages not found to uninstall: $notMatchedPackages" -ForegroundColor Yellow + $script:warningLevel++ + } + + foreach ($package in $installedPackages) { + try { + Write-Host "[INFO] Uninstalling '$package'..." + Remove-WindowsPackage -Online -PackageName $package -NoRestart -LogLevel 1 *>$null + } catch { + Write-Host "[ERROR] $package failed to uninstall: $_" -ForegroundColor Red + $script:errorLevel++ + } + } + } + + if (!$InstallPackages) { + Finish + } +} + +# ======================================================================================================================= # +# PARSE $InstallPackages ARG # +# ======================================================================================================================= # +if ($InstallPackages) { + $matchedPackages = @() + $notMatchedPackages = $InstallPackages + (Get-ChildItem $PackagesPath -File -Filter "*.cab").FullName | ForEach-Object { + foreach ($package in $InstallPackages) { + if (($_ -like $package) -and ($_ -like "*$armString*")) { + $matchedPackages += $_ + $notMatchedPackages = $notMatchedPackages -ne $package + break + } + } + } + + if ($matchedPackages.Count -eq 0) { + Write-Host "[ERROR] The specified CABs ($InstallPackages) to install weren't found." -ForegroundColor Red + if (!$NoInteraction) { Pause } + exit 1 + } + if ($notMatchedPackages.Count -gt 0) { + Write-Host "[WARN] These CABs to install weren't found: $notMatchedPackages" -ForegroundColor Yellow + $script:warningLevel++ + } +} + +if ($SafeMode) { + function ExitSafeModePrompt { + choice /c yn /n /m "Would you like to restart to get out of Safe Mode? [Y/N] " + if ($lastexitcode -eq 1) { + Restart + } else { + exit 1 + } + } + + $matchedPackages = Get-Content $safeModePackageList + + if ($matchedPackages.Count -le 0) { + Write-Host "[ERROR] Safe Mode package list not found! Please report this to Atlas." -ForegroundColor Red + ExitSafeModePrompt + } + + $packagesThatDontExist = $matchedPackages | ForEach-Object { if (!(Test-Path $_ -PathType Leaf)) { $_ } } + if ($packagesThatDontExist) { + Write-Host "[ERROR] Some Safe Mode packages weren't found. Please report this to Atlas." -ForegroundColor Red + Write-BulletPoint $packagesThatDontExist + ExitSafeModePrompt + } +} + +if ($FailMessage) { + Add-Type -AssemblyName PresentationFramework + $body = "It appears that there was an issue while attempting to disable certain Windows components. + +Would you like to restart your system into Safe Mode and try again? This process should not take much time. + +Please note that if you chose to disable Windows Defender, it may still remain enabled if you select 'No'. However, you can always try disabling it later in the Atlas folder." + + $result = [System.Windows.MessageBox]::Show( + $body, + "Atlas - Component Modification", + [System.Windows.MessageBoxButton]::YesNo, + [System.Windows.MessageBoxImage]::Question + ) + + if ($result -eq 'Yes') { + SafeMode -Enable + Restart + } + + exit +} + +# ======================================================================================================================= # +# UI - SELECT PACKAGES # +# ======================================================================================================================= # +if (!$matchedPackages) { + Write-Host "This will install specified CBS packages online, meaning live on your current install of Windows." -ForegroundColor Yellow + Pause "Press Enter to continue" + + Write-Host "`n[INFO] Opening file dialog to select CBS package CAB..." + Add-Type -AssemblyName System.Windows.Forms + $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog + $openFileDialog.Multiselect = $true + $openFileDialog.Filter = "CBS Package Files (*.cab)|*.cab" + $openFileDialog.Title = "Select a CBS Package File" + if ($openFileDialog.ShowDialog() -ne 'OK') { + exit + } +} + +# ======================================================================================================================= # +# PROCESS PACKAGES # +# ======================================================================================================================= # +function ProcessCab($cabPath) { + try { + $filePath = Split-Path $cabPath -Leaf + Write-Host "`nInstalling $filePath..." -ForegroundColor Cyan + Write-Host ("-" * 84) -ForegroundColor Magenta + + Write-Host "[INFO] Importing and checking certificate..." + try { + $cert = (Get-AuthenticodeSignature $cabPath).SignerCertificate + foreach ($usage in $cert.Extensions.EnhancedKeyUsages) { + if ($usage.Value -ne "1.3.6.1.4.1.311.10.3.6") { + $correctUsage = $true + break + } + } + if (!$correctUsage) { + Write-Host "[ERROR] Cert doesn't have Windows System Component Verification, can't continue." -ForegroundColor Red + $script:errorLevel++ + return $false + } + + $certPath = [System.IO.Path]::GetTempFileName() + [System.IO.File]::WriteAllBytes($certPath, $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)) + Import-Certificate $certPath -CertStoreLocation "Cert:\LocalMachine\Root" | Out-Null + Copy-Item -Path "$certRegPath\$($cert.Thumbprint)" "$certRegPath\8A334AA8052DD244A647306A76B8178FA215F344" -Force | Out-Null + } catch { + Write-Host "[ERROR] Cert error from '$cabPath': $_" -ForegroundColor Red + $script:errorLevel++ + return $false + } + + Write-Host "[INFO] Adding package..." + try { + Add-WindowsPackage -Online -PackagePath $cabPath -NoRestart -IgnoreCheck -LogLevel 1 *>$null + } catch { + Write-Host "[ERROR] Error when adding package '$cabPath': $_" -ForegroundColor Red + $script:errorLevel++ + return $false + } + } finally { + Write-Host "[INFO] Cleaning up certificates..." + Get-ChildItem "Cert:\LocalMachine\Root\$($cert.Thumbprint)" | Remove-Item -Force | Out-Null + Remove-Item "$certRegPath\8A334AA8052DD244A647306A76B8178FA215F344" -Force -Recurse | Out-Null + } + + return $true +} + +if ($matchedPackages) { + $packagesToProcess = $matchedPackages +} else { + $packagesToProcess = $openFileDialog.FileNames +} + +$failedPackages = @() +$packagesToProcess | ForEach-Object { + if (!(ProcessCab $_)) { + $failedPackages += $_ + } +} + +# ======================================================================================================================= # +# RESTART # +# ======================================================================================================================= # +Finish $failedPackages \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd b/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd index 0ee50e4046..8d954f498c 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/setSvc.cmd @@ -1,16 +1,10 @@ @echo off - -whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( - call RunAsTI.cmd "%~f0" %* - exit /b -) goto script ---------------------------------------- [CREDITS] - Made by he3als & Xyueta -- Repo forked from: https://github.com/he3als/setSvc [FEATURES] - Checking whether the service/driver exists or not, and error detection diff --git a/src/playbook/Executables/AtlasModules/Scripts/settingsPages.cmd b/src/playbook/Executables/AtlasModules/Scripts/settingsPages.cmd new file mode 100644 index 0000000000..b89e2f7e86 --- /dev/null +++ b/src/playbook/Executables/AtlasModules/Scripts/settingsPages.cmd @@ -0,0 +1,48 @@ +@echo off + +fltmc > nul 2>&1 || (echo You must run this script as admin. & exit /b) +if "%~1"=="" goto help +if "%~2"=="" goto help + +set "___pageKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" +set ___silent= +set ___currentPages= + +(for /f "usebackq tokens=3*" %%a in (`reg query "%___pageKey%" /v "SettingsPageVisibility"`) do (set "___currentPages=%%a%%b")) > nul 2>&1 +if defined ___currentPages set "___currentPages=%___currentPages: =%" + +if "%~3"=="/silent" set ___silent=true +if "%~1"=="/hide" call :hide "%~2" +if "%~1"=="/unhide" call :unhide "%~2" +exit /b + + +:help + echo You must use one (not in combination): + echo /hide [page] [/silent] + echo /unhide [page] [/silent] + exit /b + + +:hide + if not defined ___silent echo Hiding Settings pages... + if not defined ___currentPages ( + reg add "%___pageKey%" /v "SettingsPageVisibility" /t REG_SZ /d "hide:%~1" /f > nul + exit /b + ) + + echo "%___currentPages%" | find "%~1" > nul && exit /b + + reg add "%___pageKey%" /v "SettingsPageVisibility" /t REG_SZ /d "%___currentPages%;%~1" /f > nul + exit /b + + +:unhide + if not defined ___silent echo Unhiding Settings pages... + if not defined ___currentPages exit /b + + set "___page=%~1" + call set "___newPages=%%___currentPages:%___page%=%%" + reg add "%___pageKey%" /v "SettingsPageVisibility" /t REG_SZ /d "%___newPages%" /f > nul + + exit /b \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd b/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd index 32da0c11a3..37b7040d04 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/toggleDev.cmd @@ -31,12 +31,8 @@ call toggleDev.cmd %devices% :main fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( - echo You must run this script as admin. - exit /b 1 - ) - exit /b + echo You need to run this script as an administrator. + exit /b 1 ) set args= & set "args1=%*" @@ -46,7 +42,7 @@ exit /b %ERRORLEVEL% : end batch / begin PowerShell #> param ( - [switch]$Enable, + [switch]$Enable, [switch]$Silent, [string]$Devices ) diff --git a/src/playbook/Executables/AtlasModules/Scripts/wingetCheck.cmd b/src/playbook/Executables/AtlasModules/Scripts/wingetCheck.cmd index df986375d3..31fdf23117 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/wingetCheck.cmd +++ b/src/playbook/Executables/AtlasModules/Scripts/wingetCheck.cmd @@ -1,33 +1,52 @@ @echo off -:: Simple script to check if WinGet is functional or not + +set "dashes=-----------------------------------------------------------------------------------------------------" +set "silent=" +echo "%~1 %~2" | find "/silent" > nul && set silent=true + +if not defined silent echo %dashes% ping -n 1 -4 www.microsoft.com > nul 2>&1 -if %ERRORLEVEL% == 1 ( - if "%~1"=="/silent" exit /b 2 - echo You must have an internet connection to use this script. - echo Press any key to exit... - pause > nul +if errorlevel == 1 ( + if defined silent exit /b 2 + echo You must have an internet connection to continue. + if not defined silent ( + echo Press any key to exit... + pause > nul + ) exit /b 2 ) +:main +if not defined silent echo Checking for WinGet... + where winget > nul 2>&1 || ( - if "%~1"=="/silent" exit /b 1 + if defined silent exit /b 1 + if defined edge goto edgeFail set "action=install" set "uri=ms-windows-store://pdp/?ProductId=9NBLGGH4NNS1" - goto :error + goto error ) winget search "Microsoft Visual Studio Code" --accept-source-agreements > nul 2>&1 || ( - if "%~1"=="/silent" exit /b 1 + if defined silent exit /b 1 + if defined edge goto edgeFail set "action=update" set "uri=ms-windows-store://downloadsandupdates" - goto :error + goto error ) + +if not defined silent ( + echo %dashes% + echo] +) + exit /b :error +cls echo You need the latest version of WinGet to use this script. echo WinGet is included with 'App Installer' on the Microsoft Store, it's also on GitHub. echo] choice /c:yn /n /m "Would you like to open the Microsoft Store to %action% it? [Y/N] " -if %ERRORLEVEL% == 1 start %uri% +if errorlevel == 1 start %uri% exit /b 2 \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Tools/filepicker.exe b/src/playbook/Executables/AtlasModules/Tools/filepicker.exe deleted file mode 100644 index 7ea4585c4b..0000000000 Binary files a/src/playbook/Executables/AtlasModules/Tools/filepicker.exe and /dev/null differ diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/atlas-legacy.png b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-solid.png similarity index 100% rename from src/playbook/Executables/AtlasModules/Wallpapers/atlas-legacy.png rename to src/playbook/Executables/AtlasModules/Wallpapers/atlas-solid.png diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/atlas-dark.png b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.3.x-dark.png similarity index 100% rename from src/playbook/Executables/AtlasModules/Wallpapers/atlas-dark.png rename to src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.3.x-dark.png diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/atlas-light.png b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.3.x-light.png similarity index 100% rename from src/playbook/Executables/AtlasModules/Wallpapers/atlas-light.png rename to src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.3.x-light.png diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-dark.png b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-dark.png new file mode 100644 index 0000000000..faf2e06fb9 Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-dark.png differ diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-light.png b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-light.png new file mode 100644 index 0000000000..0400a06952 Binary files /dev/null and b/src/playbook/Executables/AtlasModules/Wallpapers/atlas-v0.4.x-light.png differ diff --git a/src/playbook/Executables/AtlasModules/Wallpapers/lockscreen.png b/src/playbook/Executables/AtlasModules/Wallpapers/lockscreen.png index 0cdf3b86f2..5f6b4d0ef5 100644 Binary files a/src/playbook/Executables/AtlasModules/Wallpapers/lockscreen.png and b/src/playbook/Executables/AtlasModules/Wallpapers/lockscreen.png differ diff --git a/src/playbook/Executables/BACKUP.ps1 b/src/playbook/Executables/BACKUP.ps1 index 086de73105..f6e2c1a543 100644 --- a/src/playbook/Executables/BACKUP.ps1 +++ b/src/playbook/Executables/BACKUP.ps1 @@ -1,18 +1,18 @@ param ( [Parameter( Mandatory = $True )] - [string]$FileName + [string]$FilePath ) -if (Test-Path $FileName) { exit } +if (Test-Path $FilePath) { exit } -Add-Content -Path $FileName -Value "Windows Registry Editor Version 5.00" +Add-Content -Path $FilePath -Value "Windows Registry Editor Version 5.00" Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services" | ForEach-Object { if ((Get-ItemProperty $_.PSPath).PSObject.Properties.Name -contains "Start") { $startValue = (Get-ItemProperty -Path $_.PSPath -Name "Start").Start for ($c = 0; $c -le 4; $c++) { if ($startValue -eq "0x$c") { - Add-Content -Path $FileName -Value ("`n" + "[" + $_.Name + "]") - Add-Content -Path $FileName -Value ("`"Start`"=dword:0000000$c") + Add-Content -Path $FilePath -Value ("`n" + "[" + $_.Name + "]") + Add-Content -Path $FilePath -Value ("`"Start`"=dword:0000000$c") } } } diff --git a/src/playbook/Executables/CLEANUP.ps1 b/src/playbook/Executables/CLEANUP.ps1 index d65956e7fd..b22a53c8cf 100644 --- a/src/playbook/Executables/CLEANUP.ps1 +++ b/src/playbook/Executables/CLEANUP.ps1 @@ -31,7 +31,13 @@ function Invoke-AtlasDiskCleanup { "Device Driver Packages" = 2 } foreach ($entry in $regValues.GetEnumerator()) { - Set-ItemProperty -Path "$baseKey\$($entry.Key)" -Name 'StateFlags0064' -Value $entry.Value -Type DWORD + $key = "$baseKey\$($entry.Key)" + + if (!(Test-Path $key)) { + Write-Output "'$key' not found, not configuring it." + } else { + Set-ItemProperty -Path "$baseKey\$($entry.Key)" -Name 'StateFlags0064' -Value $entry.Value -Type DWORD + } } # Run preset 64 (0-65535) @@ -53,7 +59,7 @@ $ErrorActionPreference = 'SilentlyContinue' Get-ChildItem -Path "$env:TEMP" | Where-Object { $_.Name -ne 'AME' } | Remove-Item -Force -Recurse # Clear the temporary system folder -Remove-Item -Path "$env:windir\Temp\*" -Force -Recurse +Remove-Item -Path "$([Environment]::GetFolderPath('Windows'))\Temp\*" -Force -Recurse # Delete all system restore points # This is so that users can't revert back from Atlas to stock with Restore Points diff --git a/src/playbook/Executables/CLIENTCBS.ps1 b/src/playbook/Executables/CLIENTCBS.ps1 index 9e578774b6..ae8e40d196 100644 --- a/src/playbook/Executables/CLIENTCBS.ps1 +++ b/src/playbook/Executables/CLIENTCBS.ps1 @@ -1,13 +1,98 @@ +# -------------------------------------------------------------- # Remove ads from the 'Accounts' page in Immersive Control Panel -# Made by Xyueta +# -------------------------------------------------------------- -$file = "$env:windir\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\Public\wsxpacks.json" -$content = Get-Content -Path "$file" -$pattern = '^\s*"Windows\.Settings\.Account".*' -$modifiedContent = $content -replace $pattern, '' -$modifiedContent = ($modifiedContent | Where-Object { $_.Trim() -ne "" }) -join "`n" +# Find feature/velocity IDs to disable for the 'Accounts' page +# After disabling each one, there's a 'Microsoft account' page that appears (ms-settings:account) +# It can be hidden by using SettingsPageVisibility -takeown /f "$file" -icacls "$file" /grant *S-1-3-4:F /t /c /l +# Variables +$cbsPublic = "$([Environment]::GetFolderPath('Windows'))\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\Public" +$settingsExtensions = "$cbsPublic\wsxpacks\Account\SettingsExtensions.json" +if (!(Test-Path $settingsExtensions)) { + Write-Output "Settings extensions ($settingsExtensions) not found." + Write-Output "User is likely on Windows 10, nothing to do. Exiting..." + exit +} -Set-Content -Path "$file" -Value "$modifiedContent" +# Finds velocity IDs listed in 'Accounts' wsxpack +function Find-VelocityID($Node) { + $ids = @() + if ($Node -is [PSCustomObject]) { + # If the node is a PSObject, go through through its properties + foreach ($property in $Node.PSObject.Properties) { + if ($property.Name -eq 'velocityKey' -and $property.Value.id) { + $ids += $property.Value.id + } + Find-VelocityID -Node $property.Value + } + } elseif ($Node -is [Array]) { + # If the node is an array, go through its elements + foreach ($element in $Node) { + Find-VelocityID -Node $element + } + } + + return $ids +} +$ids = Find-VelocityID -Node $(Get-Content -Path $settingsExtensions | ConvertFrom-Json) + +# No IDs check +if ($ids.Count -le 0) { + Write-Output "No velocity IDs were found, Microsoft might have changed something." + exit 1 +} + +# Hide 'Microsoft account' page in Settings that appears +# Not set in the actual YAML in case no velocity IDs were found +# If the velocity IDs aren't set, then the account page disappears +function SettingsPageVisibility { + $policyKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" + $visbility = "SettingsPageVisibility" + $currentPolicy = (Get-ItemProperty -Path $policyKey -Name $visbility -EA 0).$visbility + + if ($currentPolicy -like "showonly:*") { + return "Current $visibilityValue is 'showonly', no need to append." + } + + $split = $currentPolicy -replace 'hide:' -split ';' | Where-Object { $_ } + $split += "account" + Set-ItemProperty -Path $policyKey -Name $visbility -Value "hide:$($split -join ';')" +} +SettingsPageVisibility + +# Obfuscate velocity IDs +# Rewritten in PowerShell from ViVE +# https://github.com/thebookisclosed/ViVe/blob/master/ViVe/ObfuscationHelpers.cs +class ObfuscationHelpers { + static [uint32] SwapBytes([uint32] $x) { + $x = ($x -shr 16) -bor ($x -shl 16) + return (($x -band 0xFF00FF00) -shr 8) -bor (($x -band 0x00FF00FF) -shl 8) + } + + static [uint32] RotateRight32([uint32] $value, [int] $shift) { + return ($value -shr $shift) -bor ($value -shl (32 - $shift)) + } + + static [uint32] ObfuscateFeatureId([uint32] $featureId) { + return [ObfuscationHelpers]::RotateRight32(([ObfuscationHelpers]::SwapBytes($featureId -bxor 0x74161A4E) -bxor 0x8FB23D4F), -1) -bxor 0x833EA8FF + } + + static [uint32] DeobfuscateFeatureId([uint32] $featureId) { + return [ObfuscationHelpers]::SwapBytes(([ObfuscationHelpers]::RotateRight32($featureId -bxor 0x833EA8FF, 1) -bxor 0x8FB23D4F)) -bxor 0x74161A4E + } +} + +# Disable velocity IDs +# Applies next reboot +$featureKey = "HKLM:\SYSTEM\CurrentControlSet\Control\FeatureManagement\Overrides\8" +foreach ($id in $($ids | Sort-Object -Unique)) { + $veloId = "$featureKey\$([ObfuscationHelpers]::ObfuscateFeatureId($id))" + Write-Output "Disabling velocity ID '$veloId'..." + New-Item $veloId -Force | Out-Null + Set-ItemProperty -Path $veloId -Name "EnabledStateOptions" -Value 0 -Force + Set-ItemProperty -Path $veloId -Name "EnabledState" -Value 1 -Force + Set-ItemProperty -Path $veloId -Name "VariantPayload" -Value 0 -Force + Set-ItemProperty -Path $veloId -Name "Variant" -Value 0 -Force + Set-ItemProperty -Path $veloId -Name "VariantPayloadKind" -Value 0 -Force +} \ No newline at end of file diff --git a/src/playbook/Executables/FILEASSOC.cmd b/src/playbook/Executables/FILEASSOC.cmd index 629e8a10a4..d587ae0c1a 100644 --- a/src/playbook/Executables/FILEASSOC.cmd +++ b/src/playbook/Executables/FILEASSOC.cmd @@ -1,17 +1,6 @@ @echo off -set baseAssociations=".dib:PhotoViewer.FileAssoc.Tiff"^ - ".jfif:PhotoViewer.FileAssoc.Tiff"^ - ".jpe:PhotoViewer.FileAssoc.Tiff"^ - ".jpeg:PhotoViewer.FileAssoc.Tiff"^ - ".jpg:PhotoViewer.FileAssoc.Tiff"^ - ".jxr:PhotoViewer.FileAssoc.Tiff"^ - ".png:PhotoViewer.FileAssoc.Tiff"^ - ".tif:PhotoViewer.FileAssoc.Tiff"^ - ".tiff:PhotoViewer.FileAssoc.Tiff"^ - ".wdp:PhotoViewer.FileAssoc.Tiff"^ - ".url:IE.AssocFile.URL"^ - ".ps1:Microsoft.PowerShellScript.1" +set baseAssociations=".url:InternetShortcut" set braveAssociations="Proto:https:BraveHTML"^ "Proto:http:BraveHTML"^ @@ -20,6 +9,13 @@ set braveAssociations="Proto:https:BraveHTML"^ ".pdf:BraveFile"^ ".shtml:BraveHTML" +set libreWolfAssociations="Proto:https:LibreWolfHTM"^ + "Proto:http:LibreWolfHTM"^ + ".htm:LibreWolfHTM"^ + ".html:LibreWolfHTM"^ + ".pdf:LibreWolfHTM"^ + ".shtml:LibreWolfHTM" + set firefoxAssociations="Proto:https:FirefoxURL-308046B0AF4A39CB"^ "Proto:http:FirefoxURL-308046B0AF4A39CB"^ ".htm:FirefoxHTML-308046B0AF4A39CB"^ @@ -37,20 +33,33 @@ set chromeAssociations="Proto:https:ChromeHTML"^ if "%~1" == "" set "associations=%baseAssociations%" if "%~1" == "Microsoft Edge" set "associations=%baseAssociations%" if "%~1" == "Brave" set "associations=%baseAssociations% %braveAssociations%" +if "%~1" == "LibreWolf" set "associations=%baseAssociations% %libreWolfAssociations%" if "%~1" == "Firefox" set "associations=%baseAssociations% %firefoxAssociations%" if "%~1" == "Google Chrome" set "associations=%baseAssociations% %chromeAssociations%" :: Set 7-Zip assocations call :7ZIPSYSTEM +:: Make a temporary renamed PowerShell executable to bypass UCPD +:: https://hitco.at/blog/windows-userchoice-protection-driver-ucpd/ +echo Making temporary PowerShell... +for /f "tokens=* delims=" %%a in ('where powershell.exe') do (set "powershellPath=%%a") +for %%A in ("%powershellPath%") do (set "powershellDir=%%~dpA") +set "powershellTemp=%powershellDir%\powershell%random%%random%%random%%random%.exe" +copy /y "%powershellPath%" "%powershellTemp%" > nul + :: If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs don't have this key. for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( reg query "HKU\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && ( echo Setting associations for "%%a"... call :7ZIPUSER "%%a" - PowerShell -NoP -EP Bypass -File ASSOC.ps1 "Placeholder" "%%a" %associations% + "%powershellTemp%" -NoP -NonI -EP Bypass -File ASSOC.ps1 "Placeholder" "%%a" %associations% ) ) + +echo Deleting temporary PowerShell... +del /f /q "%powershellTemp%" > nul + exit /b :7ZIPUSER diff --git a/src/playbook/Executables/FINALIZE.cmd b/src/playbook/Executables/FINALIZE.cmd deleted file mode 100644 index dc980e53b1..0000000000 --- a/src/playbook/Executables/FINALIZE.cmd +++ /dev/null @@ -1,217 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion - -:: MSI Mode - -:: Enable MSI mode on USB, GPU, Audio, SATA controllers, disk drives and network adapters -:: Deleting DevicePriority sets the priority to undefined -for %%a in ("CIM_NetworkAdapter", "CIM_USBController", "CIM_VideoController" "Win32_IDEController", "Win32_PnPEntity", "Win32_SoundDevice") do ( - if "%%~a" == "Win32_PnPEntity" ( - for /f "tokens=*" %%b in ('PowerShell -NoP -C "Get-WmiObject -Class Win32_PnPEntity | Where-Object {($_.PNPClass -eq 'SCSIAdapter') -or ($_.Caption -like '*High Definition Audio*')} | Where-Object { $_.PNPDeviceID -like 'PCI\VEN_*' } | Select-Object -ExpandProperty DeviceID"') do ( - reg add "HKLM\SYSTEM\CurrentControlSet\Enum\%%b\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" /v "MSISupported" /t REG_DWORD /d "1" /f > nul - reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\%%b\Device Parameters\Interrupt Management\Affinity Policy" /v "DevicePriority" /f > nul 2>&1 - ) - ) else ( - for /f %%b in ('wmic path %%a get PNPDeviceID ^| findstr /l "PCI\VEN_"') do ( - reg add "HKLM\SYSTEM\CurrentControlSet\Enum\%%b\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" /v "MSISupported" /t REG_DWORD /d "1" /f > nul - reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\%%b\Device Parameters\Interrupt Management\Affinity Policy" /v "DevicePriority" /f > nul 2>&1 - ) - ) -) - -:: If a virtual machine is used, set network adapter to normal priority as Undefined may break internet connection -for %%a in ("hvm", "hyper", "innotek", "kvm", "parallel", "qemu", "virtual", "xen", "vmware") do ( - wmic computersystem get manufacturer /format:value | findstr /i /c:%%~a && ( - for /f %%b in ('wmic path CIM_NetworkAdapter get PNPDeviceID ^| findstr /l "PCI\VEN_"') do ( - reg add "HKLM\SYSTEM\CurrentControlSet\Enum\%%b\Device Parameters\Interrupt Management\Affinity Policy" /v "DevicePriority" /t REG_DWORD /d "2" /f > nul - ) - ) -) - -:: Network Configuration - -:: Disable NetBios over tcp/ip -:: Works only when services are enabled -for /f "delims=" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces" /s /f "NetbiosOptions" ^| findstr "HKEY"') do ( - reg add "%%a" /v "NetbiosOptions" /t REG_DWORD /d "2" /f > nul -) - -:: Disable Nagle's Algorithm -:: https://en.wikipedia.org/wiki/Nagle%27s_algorithm -for /f %%a in ('wmic path Win32_NetworkAdapter get GUID ^| findstr "{"') do ( - reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%a" /v "TcpAckFrequency" /t REG_DWORD /d "1" /f > nul - reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%a" /v "TcpDelAckTicks" /t REG_DWORD /d "0" /f > nul - reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%a" /v "TCPNoDelay" /t REG_DWORD /d "1" /f > nul -) - -:: Set network adapter driver registry key -for /f %%a in ('wmic path Win32_NetworkAdapter get PNPDeviceID^| findstr /L "PCI\VEN_"') do ( - for /f "tokens=3" %%b in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum\%%a" /v "Driver" 2^>nul') do ( - set "netKey=HKLM\SYSTEM\CurrentControlSet\Control\Class\%%b" - ) -) - -:: Configure internet adapter settings -:: Dump of all possible settings found -:: TO DO: revise and document each setting -for %%a in ( - "AdvancedEEE" - "AlternateSemaphoreDelay" - "ApCompatMode" - "ARPOffloadEnable" - "AutoDisableGigabit" - "AutoPowerSaveModeEnabled" - "bAdvancedLPs" - "bLeisurePs" - "bLowPowerEnable" - "DeviceSleepOnDisconnect" - "DMACoalescing" - "EEE" - "EEELinkAdvertisement" - "EeePhyEnable" - "Enable9KJFTpt" - "EnableConnectedPowerGating" - "EnableDynamicPowerGating" - "EnableEDT" - "EnableGreenEthernet" - "EnableModernStandby" - "EnablePME" - "EnablePowerManagement" - "EnableSavePowerNow" - "EnableWakeOnLan" - "FlowControl" - "FlowControlCap" - "GigaLite" - "GPPSW" - "GTKOffloadEnable" - "InactivePs" - "LargeSendOffload" - "LargeSendOffloadJumboCombo" - "LogLevelWarn" - "LsoV1IPv4" - "LsoV2IPv4" - "LsoV2IPv6" - "MasterSlave" - "ModernStandbyWoLMagicPacket" - "MPC" - "NicAutoPowerSaver" - "Node" - "NSOffloadEnable" - "PacketCoalescing" - "PMWiFiRekeyOffload" - "PowerDownPll" - "PowerSaveMode" - "PowerSavingMode" - "PriorityVLANTag" - "ReduceSpeedOnPowerDown" - "S5WakeOnLan" - "SavePowerNowEnabled" - "SelectiveSuspend" - "SipsEnabled" - "uAPSDSupport" - "ULPMode" - "WaitAutoNegComplete" - "WakeOnDisconnect" - "WakeOnLink" - "WakeOnMagicPacket" - "WakeOnPattern" - "WakeOnSlot" - "WakeUpModeCap" - "WoWLANLPSLevel" - "WoWLANS5Support" -) do ( - rem Check without '*' - for /f %%b in ('reg query "%netKey%" /v "%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( - reg add "%netKey%" /v "%%~a" /t REG_SZ /d "0" /f > nul - ) - rem Check with '*' - for /f %%b in ('reg query "%netKey%" /v "*%%~a" 2^>nul ^| findstr "HKEY" 2^>nul') do ( - reg add "%netKey%" /v "*%%~a" /t REG_SZ /d "0" /f > nul - ) -) - -:: Miscellaneous - -:: Disable Direct Memory Access remapping -:: https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/enabling-dma-remapping-for-device-drivers -for /f %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services" /s /f "DmaRemappingCompatible" ^| find /i "Services\" ') do ( - reg add "%%a" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f > nul -) - -:: Hide unnecessary items from the 'Send To' context menu -for %%a in ( - "Documents.mydocs" - "Mail Recipient.MAPIMail" -) do ( - attrib +h "%APPDATA%\Microsoft\Windows\SendTo\%%~a" > nul -) - -:: Set RunOnce login script -:: This is the script that will be ran on login for new users -reg add "HKU\AME_UserHive_Default\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v "RunScript" /t REG_SZ /d "powershell -EP Bypass -NoP & \"$env:windir\AtlasModules\Scripts\newUsers.ps1\"" /f - -:: Remove Fax Recipient from the 'Send to' context menu as Fax feature is removed -del /f /q "%APPDATA%\Microsoft\Windows\SendTo\Fax Recipient.lnk" > nul 2>&1 - -:: Disable audio exclusive mode on all devices -for %%a in ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture", "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render") do ( - for /f "delims=" %%b in ('reg query "%%a"') do ( - reg add "%%b\Properties" /v "{b3f8fa53-0004-438e-9003-51a46e139bfc},3" /t REG_DWORD /d "0" /f > nul - reg add "%%b\Properties" /v "{b3f8fa53-0004-438e-9003-51a46e139bfc},4" /t REG_DWORD /d "0" /f > nul - ) -) - -:: Disable all audio enhancements in mmsys.cpl (audio settings) -for %%a in ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture", "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render") do ( - for /f "delims=" %%b in ('reg query "%%a"') do ( - reg add "%%b\FxProperties" /v "{1da5d803-d492-4edd-8c23-e0c0ffee7f0e},5" /t REG_DWORD /d "1" /f > nul - reg add "%%b\FxProperties" /v "{1b5c2483-0839-4523-ba87-95f89d27bd8c},3" /t REG_BINARY /d "030044CD0100000000000000" /f > nul - reg add "%%b\FxProperties" /v "{73ae880e-8258-4e57-b85f-7daa6b7d5ef0},3" /t REG_BINARY /d "030044CD0100000001000000" /f > nul - reg add "%%b\FxProperties" /v "{9c00eeed-edce-4cd8-ae08-cb05e8ef57a0},3" /t REG_BINARY /d "030044CD0100000004000000" /f > nul - reg add "%%b\FxProperties" /v "{fc52a749-4be9-4510-896e-966ba6525980},3" /t REG_BINARY /d "0B0044CD0100000000000000" /f > nul - reg add "%%b\FxProperties" /v "{ae7f0b2a-96fc-493a-9247-a019f1f701e1},3" /t REG_BINARY /d "0300BC5B0100000001000000" /f > nul - reg add "%%b\FxProperties" /v "{1864a4e0-efc1-45e6-a675-5786cbf3b9f0},4" /t REG_BINARY /d "030044CD0100000000000000" /f > nul - reg add "%%b\FxProperties" /v "{61e8acb9-f04f-4f40-a65f-8f49fab3ba10},4" /t REG_BINARY /d "030044CD0100000050000000" /f > nul - reg add "%%b\Properties" /v "{e4870e26-3cc5-4cd2-ba46-ca0a9a70ed04},0" /t REG_BINARY /d "4100FE6901000000FEFF020080BB000000DC05000800200016002000030000000300000000001000800000AA00389B71" /f > nul - reg add "%%b\Properties" /v "{e4870e26-3cc5-4cd2-ba46-ca0a9a70ed04},1" /t REG_BINARY /d "41008EC901000000A086010000000000" /f > nul - reg add "%%b\Properties" /v "{3d6e1656-2e50-4c4c-8d85-d0acae3c6c68},3" /t REG_BINARY /d "4100020001000000FEFF020080BB000000DC05000800200016002000030000000300000000001000800000AA00389B71" /f > nul - reg delete "%%b\Properties" /v "{624f56de-fd24-473e-814a-de40aacaed16},3" /f > nul 2>&1 - reg delete "%%b\Properties" /v "{3d6e1656-2e50-4c4c-8d85-d0acae3c6c68},2" /f > nul 2>&1 - ) -) - -:: Detect hard drive - Solid State Drive (SSD) or Hard Disk Drive (HDD) -for /f %%a in ('PowerShell -NoP -C "(Get-PhysicalDisk -SerialNumber (Get-Disk -Number (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1)).DiskNumber).SerialNumber.TrimStart()).MediaType"') do ( - set "diskDrive=%%a" -) - -if "%diskDrive%" == "SSD" ( - rem Remove lower filters for rdyboost driver - set "reg_path=HKLM\SYSTEM\CurrentControlSet\Control\Class\{71a27cdd-812a-11d0-bec7-08002be2092f}" - for /f "skip=1 tokens=3*" %%a in ('reg query "!reg_path!" /v "LowerFilters"') do (set "val=%%a") - set "val=!val:rdyboost\0=!" - set "val=!val:\0rdyboost=!" - set "val=!val:rdyboost=!" - reg add "!reg_path!" /v "LowerFilters" /t REG_MULTI_SZ /d "!val!" /f > nul - - rem Disable ReadyBoost - reg add "HKLM\SYSTEM\CurrentControlSet\Services\rdyboost" /v "Start" /t REG_DWORD /d "4" /f > nul - - rem Remove ReadyBoost tab - reg delete "HKCR\Drive\shellex\PropertySheetHandlers\{55B3A0BD-4D28-42fe-8CFB-FA3EDFF969B8}" /f > nul 2>&1 - - rem Disable Memory Compression - rem If SysMain is disabled, MC should be too, but ensure its state by executing this command. - PowerShell -NoP -C "Disable-MMAGent -MemoryCompression" > nul - - rem Disable SysMain (Superfetch and Prefetch) - reg add "HKLM\SYSTEM\CurrentControlSet\Services\SysMain" /v "Start" /t REG_DWORD /d "4" /f > nul -) - -:: Disable brightness slider service if it's not supported on the current display -powershell -nop -c "if ((Get-Computerinfo).CsPCSystemType -eq 'Desktop') { exit 532 }" -if errorlevel 532 set disableBright=true -powershell -nop -c "Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods -EA 0; if (!$?) {exit 533}" -if errorlevel 533 set disableBright=true -if "%disableBright%"=="true" (set brightStartup=4) else (set brightStartup=2) -call %windir%\AtlasModules\Scripts\setSvc.cmd DisplayEnhancementService %brightStartup% \ No newline at end of file diff --git a/src/playbook/Executables/FINALIZE.ps1 b/src/playbook/Executables/FINALIZE.ps1 new file mode 100644 index 0000000000..8dbd850b38 --- /dev/null +++ b/src/playbook/Executables/FINALIZE.ps1 @@ -0,0 +1,26 @@ +# SSD specific settings +if ((Get-Partition | Where-Object { $_.IsBoot } | Get-Disk | Get-PhysicalDisk).MediaType -eq "SSD") { + # Remove lower filters for rdyboost driver + $regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{71a27cdd-812a-11d0-bec7-08002be2092f}" + $val = (Get-ItemProperty -Path $regPath -Name "LowerFilters")."LowerFilters" | Where-Object { $_ -ne 'rdyboost' } + Set-ItemProperty -Path $regPath -Name "LowerFilters" -Value $val -Force + + # Disable ReadyBoost + Set-Service -Name rdyboost -StartupType Disabled + # Remove ReadyBoost tab + Remove-Item -Path "Registry::HKCR\Drive\shellex\PropertySheetHandlers\{55B3A0BD-4D28-42fe-8CFB-FA3EDFF969B8}" -Force -ErrorAction SilentlyContinue + + # Disable SysMain - contains Superfetch, Prefetch, Memory Management Agents + Set-Service -Name SysMain -StartupType Disabled +} + +# Disable brightness slider service if it's not supported on the current display +$startup = 'Automatic' +try { + Get-CimInstance -Class WmiMonitorBrightnessMethods -Namespace root/wmi -ErrorAction Stop | Out-Null +} catch { + if ((Get-ComputerInfo).CsPCSystemType -eq 'Desktop') { + $startup = 'Disabled' + } +} +Set-Service -Name DisplayEnhancementService -StartupType $startup \ No newline at end of file diff --git a/src/playbook/Executables/LIBREWOLF.ps1 b/src/playbook/Executables/LIBREWOLF.ps1 new file mode 100644 index 0000000000..7821790382 --- /dev/null +++ b/src/playbook/Executables/LIBREWOLF.ps1 @@ -0,0 +1,70 @@ +$ProgressPreference = "SilentlyContinue" +$ErrorActionPreference = "Stop" + +# Define variables +$desktop = [Environment]::GetFolderPath("Desktop") +$startMenu = [Environment]::GetFolderPath("CommonPrograms") +$programs = [Environment]::GetFolderPath("ProgramFiles") +$updaterPath = "$programs\LibreWolf\librewolf-winupdater" +$librewolfPath = "$programs\LibreWolf" + +# Get latest LibreWolf download link +Write-Output "Getting the latest LibreWolf download link" +$librewolfVersion = Invoke-RestMethod -Uri "https://gitlab.com/api/v4/projects/44042130/releases" | ForEach-Object { $_.name } | Select-Object -First 1 +$librewolfFileName = "librewolf-$librewolfVersion-windows-x86_64-setup.exe" +$librewolfDownload = "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/$librewolfVersion/$librewolfFileName" + +# Get latest LibreWolf-WinUpdater download link +Write-Output "Getting the latest LibreWolf-WinUpdater download link" +$librewolfUpdaterURI = "https://codeberg.org/api/v1/repos/ltguillaume/librewolf-winupdater/releases?draft=false&pre-release=false&page=1&limit=1" +$librewolfUpdaterDownload = (Invoke-RestMethod -Uri "$librewolfUpdaterURI" -Headers @{ "accept" = "application/json" }).Assets | + Where-Object { $_.name -like "*.zip" } | + Select-Object -ExpandProperty browser_download_url + +# Output paths +$outputLibrewolf = "$env:systemdrive\$librewolfFileName" +$outputLibrewolfUpdater = "$env:systemdrive\librewolf-winupdater.zip" + +# Download files +Write-Output "Downloading the latest LibreWolf setup" +curl.exe -LSs "$librewolfDownload" -o "$outputLibrewolf" +Write-Output "Downloading the latest LibreWolf WinUpdater ZIP" +curl.exe -LSs "$librewolfUpdaterDownload" -o "$outputLibrewolfUpdater" + +# Install LibreWolf & LibreWolf-WinUpdater +Write-Output "Installing LibreWolf silently" +Start-Process -Wait -FilePath $outputLibrewolf -ArgumentList "/S" +if (!(Test-Path $librewolfPath)) { + Write-Host "Installing LibreWolf silently failed." + exit 1 +} +Write-Output "Installing/extracting Librewolf-WinUpdater" +Expand-Archive -Path $outputLibrewolfUpdater -DestinationPath "$env:programfiles\LibreWolf\librewolf-winupdater" -Force + +# Automatic updater +Write-Output "Adding automatic updater task" +$Action = New-ScheduledTaskAction -Execute "$updaterPath\LibreWolf-WinUpdater.exe" -Argument "/Scheduled" +$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -RunOnlyIfNetworkAvailable +$7Hours = New-ScheduledTaskTrigger -Once -At (Get-Date -Minute 0 -Second 0).AddHours(1) -RepetitionInterval (New-TimeSpan -Hours 7) +$AtLogon = New-ScheduledTaskTrigger -AtLogOn +$AtLogon.Delay = 'PT1M' +$User = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name +Register-ScheduledTask -TaskName "LibreWolf WinUpdater ($($User -replace ".*\\"))" -Action $Action -Settings $Settings -Trigger $7Hours,$AtLogon -User $User -RunLevel Highest -Force | Out-Null + +# Shortcuts +Write-Output "Creating shortcuts" +function Add-Shortcut { + param ( [string]$Source, [string]$Destination, [string]$WorkingDir ) + $WshShell = New-Object -comObject WScript.Shell + $Shortcut = $WshShell.CreateShortcut($Destination) + $Shortcut.TargetPath = $Source + $Shortcut.WorkingDirectory = $WorkingDir + $Shortcut.Save() +} +Add-Shortcut -Source "$librewolfPath\librewolf.exe" -Destination "$desktop\LibreWolf.lnk" -WorkingDir $librewolfPath +Add-Shortcut -Source "$updaterPath\Librewolf-WinUpdater.exe" -Destination "$startMenu\LibreWolf\LibreWolf WinUpdater.lnk" -WorkingDir $librewolfPath + +# Temp files +Write-Output "Removing temporary installer files" +Remove-Item "$outputLibrewolf" -Force +Remove-Item "$outputLibrewolfUpdater" -Force \ No newline at end of file diff --git a/src/playbook/Executables/NGEN.ps1 b/src/playbook/Executables/NGEN.ps1 index 2b419f2ed3..ab236e4680 100644 --- a/src/playbook/Executables/NGEN.ps1 +++ b/src/playbook/Executables/NGEN.ps1 @@ -1,12 +1,6 @@ # speeds up powershell startup time by 10x -$env:path = $env:path + ";" + $([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) -[AppDomain]::CurrentDomain.GetAssemblies() | % { - if (! $_.location) {continue} - $Name = Split-Path $_.location -leaf - Write-Host -ForegroundColor Yellow "NGENing : $Name" - ngen install $_.location | % {"`t$_"} | Out-Null -} - -# run these tasks in the background to make sure that it is all ngened -& schtasks.exe /Run /TN "\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319" -& schtasks.exe /Run /TN "\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64" \ No newline at end of file +$env:path = "$([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory());" + $env:path +[AppDomain]::CurrentDomain.GetAssemblies().Location | ? {$_} | % { + Write-Host "NGENing: $(Split-Path $_ -Leaf)" -ForegroundColor Yellow + ngen install $_ | Out-Null +} \ No newline at end of file diff --git a/src/playbook/Executables/PFP.ps1 b/src/playbook/Executables/PFP.ps1 index 833d61d7b3..8a205cf67a 100644 --- a/src/playbook/Executables/PFP.ps1 +++ b/src/playbook/Executables/PFP.ps1 @@ -20,7 +20,7 @@ foreach ($image in $resolutions.Keys) { $a = New-Object System.Drawing.Bitmap($resolution, $resolution) $graph = [System.Drawing.Graphics]::FromImage($a) $graph.DrawImage($img, 0, 0, $resolution, $resolution) - $a.Save("$env:ProgramData\Microsoft\User Account Pictures\$image") + $a.Save("$([Environment]::GetFolderPath('CommonApplicationData'))\Microsoft\User Account Pictures\$image") } # Set Atlas profile picture for each user diff --git a/src/playbook/Executables/REMOVEBITMAP.ps1 b/src/playbook/Executables/REMOVEBITMAP.ps1 deleted file mode 100644 index 6752d840fd..0000000000 --- a/src/playbook/Executables/REMOVEBITMAP.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -# Removes 'Bitmap' from the 'New' context menu in Windows 11 -foreach ($userKey in $((Get-ChildItem -Path "Registry::HKEY_USERS").Name | Where-Object { $_ -like '*_Classes' })) { - foreach ($key in $(Get-ChildItem -Path "Registry::$userKey\Local Settings\MrtCache" -Recurse)) { - $key | Get-ItemProperty | ForEach-Object { - foreach ($value in $($_.PSObject.Properties.Name | Where-Object {$_ -like '*ShellNewDisplayName_Bmp*'})) { - Set-ItemProperty -Path $key.PSPath -Name $value -Value "" - Write-Host "Removed 'Bitmap' from 'New' context menu for $userKey..." - } - } - } -} \ No newline at end of file diff --git a/src/playbook/Executables/SHORTCUTS.ps1 b/src/playbook/Executables/SHORTCUTS.ps1 index 5f5f73a167..d19d84a9e8 100644 --- a/src/playbook/Executables/SHORTCUTS.ps1 +++ b/src/playbook/Executables/SHORTCUTS.ps1 @@ -9,7 +9,7 @@ function New-Shortcut { ) if ($IfExist) { - if (-not (Test-Path -Path $ShortcutPath -PathType Leaf)) { + if (!(Test-Path -Path $ShortcutPath -PathType Leaf)) { return } } @@ -22,20 +22,38 @@ function New-Shortcut { $Shortcut.Save() } +Write-Output "Creating Desktop & Start Menu shortcuts..." $defaultShortcut = "$env:SystemDrive\Users\Default\Desktop\Atlas.lnk" -New-Shortcut -Icon "$env:windir\AtlasModules\Other\atlas-folder.ico,0" -Target "$env:windir\AtlasDesktop" -ShortcutPath $defaultShortcut -foreach ($user in $(Get-ChildItem -Path "$env:SystemDrive\Users" -Directory | Where-Object { 'Public' -notcontains $_.Name })) { - Copy-Item $defaultShortcut -Destination "$($user.FullName)\Desktop" -Force +New-Shortcut -Icon "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Other\atlas-folder.ico,0" -Target "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop" -ShortcutPath $defaultShortcut + +$registryKeys = Get-ChildItem -Path "Registry::HKU" | Where-Object { + $_.Name -match "S-.*|AME_UserHive_[^_]*" -and + $_.Name -notlike '*Classes*' -and + $_.Name -notlike '*Default*' +} +foreach ($userKey in $registryKeys.PsPath) { + $deskPath = (get-itemproperty -path "$userKey\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop -EA 0).Desktop + if ($null -eq $deskPath) { + Write-Output "Desktop path not found for '$userKey', shortcuts can't be copied." + } else { + Write-Output "Copying shortcut for '$userKey'..." + Copy-Item $defaultShortcut -Destination $deskPath -Force + } } -Copy-Item $defaultShortcut -Destination "$env:ProgramData\Microsoft\Windows\Start Menu\Programs" -Force -$runAsTI = "$env:windir\AtlasModules\Scripts\RunAsTI.cmd" -$default = "$env:windir\AtlasDesktop\8. Troubleshooting\Default" -New-Shortcut -ShortcutPath "$default Windows Services and Drivers.lnk" -Target "$runAsTI" -Arguments "$env:windir\AtlasModules\Other\winServices.reg" -Icon "$env:windir\regedit.exe,1" -New-Shortcut -ShortcutPath "$default Atlas Services and Drivers.lnk" -Target "$runAsTI" -Arguments "$env:windir\AtlasModules\Other\atlasServices.reg" -Icon "$env:windir\regedit.exe,1" +Copy-Item $defaultShortcut -Destination "$([Environment]::GetFolderPath('CommonStartMenu'))\Programs" -Force + + +Write-Output "Creating services shortcuts..." +$runAsTI = "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Scripts\RunAsTI.cmd" +$default = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\8. Troubleshooting\Default" +New-Shortcut -ShortcutPath "$default Windows Services and Drivers.lnk" -Target "$runAsTI" -Arguments "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Other\winServices.reg" -Icon "$([Environment]::GetFolderPath('Windows'))\regedit.exe,1" +New-Shortcut -ShortcutPath "$default Atlas Services and Drivers.lnk" -Target "$runAsTI" -Arguments "$([Environment]::GetFolderPath('Windows'))\AtlasModules\Other\atlasServices.reg" -Icon "$([Environment]::GetFolderPath('Windows'))\regedit.exe,1" + -# Fix Windows Tools shortcut in Windows 11 -$shortcutPath = "$env:appdata\Microsoft\Windows\Start Menu\Programs\Administrative Tools.lnk" -$newTargetPath = "$env:windir\explorer.exe" +Write-Output "Making Windows Tools shortcuts dark mode for Windows 11..." +$newTargetPath = "$([Environment]::GetFolderPath('Windows'))\explorer.exe" $newArgs = "shell:::{D20EA4E1-3957-11d2-A40B-0C5020524153}" -New-Shortcut -ShortcutPath $shortcutPath -Target $newTargetPath -Arguments $newArgs -IfExist \ No newline at end of file +foreach ($user in (Get-ChildItem -Path "$env:SystemDrive\Users" -Directory | Where-Object { 'Public' -notcontains $_.Name }).FullName) { + New-Shortcut -ShortcutPath "$user\Microsoft\Windows\Start Menu\Programs\Administrative Tools.lnk" -Target $newTargetPath -Arguments $newArgs -IfExist +} \ No newline at end of file diff --git a/src/playbook/Executables/SOFTWARE.ps1 b/src/playbook/Executables/SOFTWARE.ps1 index 2242cf3c5f..9397e43c9f 100644 --- a/src/playbook/Executables/SOFTWARE.ps1 +++ b/src/playbook/Executables/SOFTWARE.ps1 @@ -1,39 +1,38 @@ param ( [switch]$Chrome, [switch]$Brave, - [switch]$Firefox, - [switch]$MPV, - [switch]$MPCHC, - [switch]$VLC, - [switch]$NotepadPlusPlus, - [switch]$VisualStudioCode, - [switch]$VSCodium + [switch]$Firefox ) # ----------------------------------------------------------------------------------------------------------- # # Software is no longer installed with a package manager anymore to be as fast and as reliable as possible. # # ----------------------------------------------------------------------------------------------------------- # +$msiArgs = "/qn /quiet /norestart ALLUSERS=1 REBOOT=ReallySuppress" +$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') +$armString = ('x64', 'arm64')[$arm] + # Create temporary directory -$tempDir = Join-Path -Path $env:TEMP -ChildPath $([System.Guid]::NewGuid()) +$tempDir = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $([System.Guid]::NewGuid()) New-Item $tempDir -ItemType Directory -Force | Out-Null Push-Location $tempDir # Brave if ($Brave) { - Write-Host "Installing Brave..." + Write-Output "Downloading Brave..." & curl.exe -LSs "https://laptop-updates.brave.com/latest/winx64" -o "$tempDir\BraveSetup.exe" if (!$?) { Write-Error "Downloading Brave failed." exit 1 } + Write-Output "Installing Brave..." & "$tempDir\BraveSetup.exe" /silent /install 2>&1 | Out-Null do { $processesFound = Get-Process | Where-Object { "BraveSetup" -contains $_.Name } | Select-Object -ExpandProperty Name if ($processesFound) { - Write-Host "Still running BraveSetup." + Write-Output "Still running BraveSetup." Start-Sleep -Seconds 2 } else { Remove-Item "$tempDir" -ErrorAction SilentlyContinue -Force -Recurse @@ -46,129 +45,97 @@ if ($Brave) { # Firefox if ($Firefox) { - Write-Host "Installing Firefox..." - & curl.exe -LSs "https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US" -o "$tempDir\firefox.exe" + if ($arm) { + $firefoxArch = 'win64-aarch64' + } else { + $firefoxArch = 'win64' + } + + Write-Output "Downloading Firefox..." + & curl.exe -LSs "https://download.mozilla.org/?product=firefox-latest-ssl&os=$firefoxArch&lang=en-US" -o "$tempDir\firefox.exe" + Write-Output "Installing Firefox..." Start-Process -FilePath "$tempDir\firefox.exe" -WindowStyle Hidden -ArgumentList '/S /ALLUSERS=1' -Wait 2>&1 | Out-Null exit } # Chrome if ($Chrome) { - Write-Host "Installing Google Chrome..." + Write-Output "Downloading Google Chrome..." & curl.exe -LSs "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -o "$tempDir\chrome.msi" + Write-Output "Installing Google Chrome..." Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait 2>&1 | Out-Null exit } -################# -## MEDIA ## -################# - -# mpv -# if ($mpv) { -# Write-Host "Installing mpv..." -# & curl.exe -LSs "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -o "$tempDir\chrome.msi" -# Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait 2>&1 | Out-Null -# exit -#} - -# MPC-HC -if ($mpchc) { - Write-Host "Installing MPC-HC..." - $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/clsid2/mpc-hc/releases/latest" - $link = $latestRelease.assets | Where-Object { $_.browser_download_url -like "*x64.exe" } | Select-Object -ExpandProperty browser_download_url - & curl.exe -LSs "$link" -o "$tempDir\mpc-hc.exe" - Start-Process -FilePath "$tempDir\mpc-hc.exe" -WindowStyle Hidden -ArgumentList '/VERYSILENT /NORESTART' -Wait 2>&1 | Out-Null - exit -} - -# VLC -if ($vlc) { - Write-Host "Installing VLC..." - $baseUrl = "https://get.videolan.org/vlc/last/win64/" - $fileName = $((Invoke-WebRequest -Uri $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -like 'vlc*.exe' } | Select-Object -First 1 -ExpandProperty Href) - & curl.exe -LSs "$baseUrl$fileName" -o "$tempDir\vlc.exe" - Start-Process -FilePath "$tempDir\vlc.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait 2>&1 | Out-Null - exit -} - -# Notepad++ -if ($npp) { - Write-Host "Installing Notepad++..." - $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/releases/latest" - $link = $latestRelease.assets | Where-Object { $_.browser_download_url -like "*x64.exe" } | Select-Object -ExpandProperty browser_download_url - & curl.exe -LSs "$link" -o "$tempDir\npp.exe" - Start-Process -FilePath "$tempDir\npp.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait 2>&1 | Out-Null - exit -} - -# VSCode -if ($vscode) { - Write-Host "Installing VSCode..." - & curl.exe -LSs "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64" -o "$tempDir\vscode.exe" - Start-Process -FilePath "$tempDir\vscode.exe" -WindowStyle Hidden -ArgumentList '/VERYSILENT /NORESTART /MERGETASKS=!runcode' -Wait 2>&1 | Out-Null - exit -} - -# VSCodium -if ($vscodium) { - Write-Host "Installing VSCodium..." - $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/VSCodium/vscodium/releases/latest" - $link = $latestRelease.assets | Where-Object { $_.browser_download_url -like "*VSCodiumSetup-x64*" -and $_.browser_download_url -like "*.exe" } | Select-Object -ExpandProperty browser_download_url - & curl.exe -LSs "$link" -o "$tempDir\vscodium.exe" - Start-Process -FilePath "$tempDir\vscodium.exe" -WindowStyle Hidden -ArgumentList '/VERYSILENT /NORESTART /MERGETASKS=!runcode' -Wait 2>&1 | Out-Null - exit -} - -#################### -## Software ## -#################### +##################### +## Utilities ## +##################### # Visual C++ Runtimes (referred to as vcredists for short) # https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist -$legacyArgs1 = '/Q' -$legacyArgs2 = '/q /norestart' +$legacyArgs = '/q /norestart' $modernArgs = "/install /quiet /norestart" -$vcredists = @{ +$vcredists = [ordered] @{ # 2005 - version 8.0.50727.6195 (MSI 8.0.61000/8.0.61001) SP1 - "https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.exe" = $legacyArgs1 - "https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.exe" = $legacyArgs1 + "https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.exe" = @("2005-x64", "/c /q /t:") + "https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.exe" = @("2005-x86", "/c /q /t:") # 2008 - version 9.0.30729.6161 (EXE 9.0.30729.5677) SP1 - "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe" = $legacyArgs1 - "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe" = $legacyArgs1 + "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe" = @("2008-x64", "/q /extract:") + "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe" = @("2008-x86", "/q /extract:") # 2010 - version 10.0.40219.325 SP1 - "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe" = $legacyArgs2 - "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe" = $legacyArgs2 + "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe" = @("2010-x64", $legacyArgs) + "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe" = @("2010-x86", $legacyArgs) # 2012 - version 11.0.61030.0 - "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" = $modernArgs - "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe" = $modernArgs + "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" = @("2012-x64", $modernArgs) + "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe" = @("2012-x86", $modernArgs) # 2013 - version 12.0.40664.0 - "https://aka.ms/highdpimfc2013x64enu" = $modernArgs - "https://aka.ms/highdpimfc2013x86enu" = $modernArgs + "https://aka.ms/highdpimfc2013x64enu" = @("2013-x64", $modernArgs) + "https://aka.ms/highdpimfc2013x86enu" = @("2013-x86", $modernArgs) # 2015-2022 (2015+) - latest version - "https://aka.ms/vs/17/release/vc_redist.x64.exe" = $modernArgs - "https://aka.ms/vs/17/release/vc_redist.x86.exe" = $modernArgs + "https://aka.ms/vs/17/release/vc_redist.x64.exe" = @("2015+-x64", $modernArgs) + "https://aka.ms/vs/17/release/vc_redist.x86.exe" = @("2015+-x86", $modernArgs) } -$num = 0; foreach ($a in $vcredists.GetEnumerator()) { - $num++; $vcredist = "$tempDir\vcredist$num.exe" +foreach ($a in $vcredists.GetEnumerator()) { + $vcName = $a.Value[0] + $vcArgs = $a.Value[1] + $vcUrl = $a.Name + $vcExePath = "$tempDir\vcredist-$vcName.exe" + # curl is faster than Invoke-WebRequest - Write-Host "Installing Visual C++ Runtime $num..." - & curl.exe -LSs "$($a.Name)" -o "$vcredist" - Start-Process -FilePath $vcredist -WindowStyle Hidden -ArgumentList $a.Value -Wait 2>&1 | Out-Null + Write-Output "Downloading and installing Visual C++ Runtime $vcName..." + & curl.exe -LSs "$vcUrl" -o "$vcExePath" + + if ($vcArgs -match ":") { + $msiDir = "$tempDir\vcredist-$vcName" + Start-Process -FilePath $vcExePath -ArgumentList "$vcArgs`"$msiDir`"" -Wait -WindowStyle Hidden + + $msiPaths = (Get-ChildItem -Path $msiDir -Filter *.msi -EA 0).FullName + if (!$msiPaths) { + Write-Output "Failed to extract MSI for $vcName, not installing." + } else { + $msiPaths | ForEach-Object { + Start-Process -FilePath "msiexec.exe" -ArgumentList "/log `"$msiDir\logfile.log`" /i `"$_`" $msiArgs" -WindowStyle Hidden + } + } + } else { + Start-Process -FilePath $vcExePath -ArgumentList $vcArgs -Wait -WindowStyle Hidden + } } # 7-Zip $website = 'https://7-zip.org/' -$download = $website + ((Invoke-WebRequest $website -UseBasicParsing).Links.href | Where-Object { $_ -like "a/7z2301-x64.exe" }) +$download = $website + ((Invoke-WebRequest $website -UseBasicParsing).Links.href | Where-Object { $_ -like "a/7z*-$armString.exe" }) +Write-Output "Downloading 7-Zip..." & curl.exe -LSs $download -o "$tempDir\7zip.exe" +Write-Output "Installing 7-Zip..." Start-Process -FilePath "$tempDir\7zip.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait 2>&1 | Out-Null # Legacy DirectX runtimes & curl.exe -LSs "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" -o "$tempDir\directx.exe" -Write-Host "Extracting legacy DirectX runtimes..." +Write-Output "Extracting legacy DirectX runtimes..." Start-Process -FilePath "$tempDir\directx.exe" -WindowStyle Hidden -ArgumentList "/q /c /t:`"$tempDir\directx`"" -Wait 2>&1 | Out-Null -Write-Host "Installing legacy DirectX runtimes..." +Write-Output "Installing legacy DirectX runtimes..." Start-Process -FilePath "$tempDir\directx\dxsetup.exe" -WindowStyle Hidden -ArgumentList '/silent' -Wait 2>&1 | Out-Null # Remove temporary directory diff --git a/src/playbook/Executables/STARTMENU.cmd b/src/playbook/Executables/STARTMENU.cmd index 6e397b45e7..950cbded87 100644 --- a/src/playbook/Executables/STARTMENU.cmd +++ b/src/playbook/Executables/STARTMENU.cmd @@ -1,26 +1,44 @@ @echo off - -copy /y "Layout.xml" "%SystemDrive%\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" > nul +setlocal EnableDelayedExpansion :: If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs don't have this key. for /f "usebackq tokens=2 delims=\" %%a in (`reg query "HKEY_USERS" ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( reg query "HKU\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && ( - for /f "usebackq tokens=4* delims= " %%c in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData" 2^>nul ^| findstr /r /x /c:".*Local AppData[ ]*REG_SZ[ ].*" 2^>nul`) do ( - copy /y "Layout.xml" "%%c\Microsoft\Windows\Shell\LayoutModification.xml" > nul + echo] + set userAppdata= + if "%%a"=="AME_UserHive_Default" ( + set "userAppdata=%systemdrive%\Users\Default\AppData\Local" + ) else ( + for /f "usebackq tokens=4* delims= " %%b in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData" 2^>nul ^| findstr /r /x /c:".*Local AppData[ ]*REG_SZ[ ].*" 2^>nul`) do ( + set "userAppdata=%%b" + ) + ) + + echo Configuring Start Menu for "%%a"... + echo ------------------------------------------------------------------------------------------------ + + if [!userAppdata!]==[] ( + echo Couldn't find AppData value! + ) else ( + echo Copying default layout XML + copy /y "Layout.xml" "!userAppdata!\Microsoft\Windows\Shell\LayoutModification.xml" > nul - rem Clear Start Menu pinned items - for /f "usebackq delims=" %%d in (`dir /b "%%c\Packages" /a:d ^| findstr /c:"Microsoft.Windows.StartMenuExperienceHost"`) do ( - for /f "usebackq delims=" %%e in (`dir /b "%%c\Packages\%%d\LocalState" /a:-d ^| findstr /R /c:"start.\.bin" /c:"start\.bin"`) do ( - del /q /f "%%c\Packages\%%d\LocalState\%%e" > nul 2>&1 + if "%%a" neq "AME_UserHive_Default" ( + echo Clear Start Menu pinned items + for /f "usebackq delims=" %%d in (`dir /b "!userAppdata!\Packages" /a:d ^| findstr /c:"Microsoft.Windows.StartMenuExperienceHost"`) do ( + for /f "usebackq delims=" %%e in (`dir /b "!userAppdata!\Packages\%%d\LocalState" /a:-d ^| findstr /R /c:"start.\.bin" /c:"start\.bin"`) do ( + del /q /f "!userAppdata!\Packages\%%d\LocalState\%%e" > nul 2>&1 + ) ) ) ) + echo Clearing default 'tilegrid' for /f "usebackq delims=" %%c in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount" 2^>nul ^| findstr /c:"start.tilegrid" 2^>nul`) do ( reg delete "%%c" /f > nul 2>&1 ) - rem Remove advertisements from Start Menu (23H2+) + echo Removing advertisements/stubs from Start Menu ^(23H2+^) reg delete "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Start" /v "Config" /f > nul 2>&1 ) ) diff --git a/src/playbook/Executables/Shortcuts/LibreWolf.lnk b/src/playbook/Executables/Shortcuts/LibreWolf.lnk new file mode 100644 index 0000000000..7c827255f8 Binary files /dev/null and b/src/playbook/Executables/Shortcuts/LibreWolf.lnk differ diff --git a/src/playbook/Executables/TASKBARPINS.cmd b/src/playbook/Executables/TASKBARPINS.cmd index ff530bf24f..0476230018 100644 --- a/src/playbook/Executables/TASKBARPINS.cmd +++ b/src/playbook/Executables/TASKBARPINS.cmd @@ -1,53 +1,76 @@ @echo off +setlocal EnableDelayedExpansion +set browser=true +set "input=%~1" set "taskBarLocation=Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" set "rootKey=SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -set "noArgs=false" -if "%~1" == "" set "noArgs=true" -if exist "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" ( - set "noArgs=false" - set "input=Microsoft Edge" +if "%input%" == "" ( + rem If Edge exists, pin it + rem Otherwise, pin only File Explorer + + if exist "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" ( + set "input=Microsoft Edge" + set "favoritesResolve=E50200004C0000000114020000000000C000000000000046830080002000000013ECDA0121E0D901EA00DD0121E0D9014D038B7320E0D90186090000000000000100000000000000000000000000000052013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D901EA00DD0121E0D901140056003100000000002557E88D10005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A8B26A005400610073006B0042006100720000001600C0003200860900002557698D20004D4943524F537E312E4C4E4B0000560009000400EFBE2557E88D2557E88D2E000000D6990100000004000000000000000000000000000000B37BD2004D006900630072006F0073006F0066007400200045006400670065002E006C006E006B0000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBEEA00DD0121E0D9011C001A0000001D00EFBE02004D005300450064006700650000001C0000009C0000001C000000010000001C0000002D000000000000009B0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C4D6963726F736F667420456467652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA5831EF36144CEE11AE90000C29335CED3AEC768D387A5741A7D5E116AEF015FA5831EF36144CEE11AE90000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000EA00DD0121E0D9015961DF0121E0D901A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D9015961DF0121E0D901140056003100000000002557E88D11005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A7085A005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBE2557E88D2557E88D2E000000D8990100000007000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE5961DF0121E0D9011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA5931EF36144CEE11AE90000C29335CED3AEC768D387A5741A7D5E116AEF015FA5931EF36144CEE11AE90000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000" + set "favorites=00560100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D901EA00DD0121E0D901140056003100000000002557E88D10005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A8B26A005400610073006B0042006100720000001600C4003200860900002557698D20004D4943524F537E312E4C4E4B0000560009000400EFBE2557E88D2557E88D2E000000D6990100000004000000000000000000000000000000B37BD2004D006900630072006F0073006F0066007400200045006400670065002E006C006E006B0000001C00120000002B00EFBEEA00DD0121E0D9011C001A0000001D00EFBE02004D005300450064006700650000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C00000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D9015961DF0121E0D901140056003100000000002557E88D11005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A7085A005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBE2557E88D2557E88D2E000000D8990100000007000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE5961DF0121E0D9011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) else ( + set browser=false + set "input=File Explorer" + set "favoritesResolve=320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" + set "favorites=00A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) ) else ( - set "input=%~1" + rem Browser options + rem No elseif or switch statement in batch :( + if "%input%" == "Brave" ( + set "favoritesResolve=C40200004C0000000114020000000000C000000000000046830080002000000038DCEBF8DDE0D9018F25810DDEE0D9018F25810DDEE0D9017809000000000000010000000000000000000000000000003A013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90138DCEBF8DDE0D9018F25810DDEE0D9011400560031000000000026578C8210005461736B42617200400009000400EFBE26577C8226578C822E000000D499010000000C000000000000000000000000000000E3721D005400610073006B0042006100720000001600A80032007809000026578F82200042726176652E6C6E6B00440009000400EFBE26577C8226578F822E0000005E62060000000700000000000000000000000000000071751D00420072006100760065002E006C006E006B0000001800220000001E00EFBE02005500730065007200500069006E006E006500640000001800120000002B00EFBE8F25810DDEE0D9011800180000001D00EFBE020042007200610076006500000018000000930000001C000000010000001C0000002D00000000000000920000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C42726176652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FAB2E44312214CEE11AE92000C29335CED3AEC768D387A5741A7D5E116AEF015FAB2E44312214CEE11AE92000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" + set "favorites=003A0100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90138DCEBF8DDE0D9018F25810DDEE0D9011400560031000000000026578C8210005461736B42617200400009000400EFBE26577C8226578C822E000000D499010000000C000000000000000000000000000000E3721D005400610073006B0042006100720000001600A80032007809000026578F82200042726176652E6C6E6B00440009000400EFBE26577C8226578F822E0000005E62060000000700000000000000000000000000000071751D00420072006100760065002E006C006E006B0000001800120000002B00EFBE8F25810DDEE0D9011800180000001D00EFBE02004200720061007600650000001800220000001E00EFBE02005500730065007200500069006E006E006500640000001800000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) else ( + if "%input%" == "Firefox" ( + set "favoritesResolve=E20200004C0000000114020000000000C0000000000000468300800020000000C1EAB456F76CDA01C1EAB456F76CDA01CE99A8CBF66CDA01E1030000000000000100000000000000000000000000000056013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000A8F97DA9776ADA018D804BF2F66CDA018D804BF2F66CDA01140056003100000000006258C3B910005461736B42617200400009000400EFBE62586DB96258C3B92E0000001E6B00000000030000000000000000000000000000005FE5D3005400610073006B0042006100720000001600C4003200E103000062584AB9200046697265666F782E6C6E6B00480009000400EFBE6258C7B96258C7B92E0000003C01000000000600000000000000000000000000000032BC4500460069007200650066006F0078002E006C006E006B0000001A00220000001E00EFBE02005500730065007200500069006E006E006500640000001A00120000002B00EFBE1E52B756F76CDA011A002E0000001D00EFBE0200330030003800300034003600420030004100460034004100330039004300420000001A000000950000001C000000010000001C0000002D00000000000000940000001100000003000000050CFEB61000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46697265666F782E6C6E6B000060000000030000A058000000000000006465736B746F702D627562766D6A340086BE4F893A62684A86310928B4B0051FF351BD4AEAD8EE118995000C2903292886BE4F893A62684A86310928B4B0051FF351BD4AEAD8EE118995000C2903292845000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D00000068000000004800000090BB989C2A392A46865DFC96152B921F000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" + set "favorites=00560100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000A8F97DA9776ADA018D804BF2F66CDA018D804BF2F66CDA01140056003100000000006258C3B910005461736B42617200400009000400EFBE62586DB96258C3B92E0000001E6B00000000030000000000000000000000000000005FE5D3005400610073006B0042006100720000001600C4003200E103000062584AB9200046697265666F782E6C6E6B00480009000400EFBE6258C7B96258C7B92E0000003C01000000000600000000000000000000000000000032BC4500460069007200650066006F0078002E006C006E006B0000001A00120000002B00EFBE1E52B756F76CDA011A002E0000001D00EFBE0200330030003800300034003600420030004100460034004100330039004300420000001A00220000001E00EFBE02005500730065007200500069006E006E006500640000001A00000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) else ( + if "%input%" == "LibreWolf" ( + set "favoritesResolve=EA0200004C0000000114020000000000C0000000000000468300800020000000529D8535B6E0D901529D8535B6E0D901529D8535B6E0D901B904000000000000010000000000000000000000000000005C013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657655C11005461736B42617200400009000400EFBE2557E88D2657665C2E000000D4990100000006000000000000000000000000000000AC6601005400610073006B0042006100720000001600CA003200B90400002657695C20004C69627265576F6C662E6C6E6B004C0009000400EFBE2657695C2657695C2E000000DA780000000008000000000000000000000000000000AE018D004C00690062007200650057006F006C0066002E006C006E006B0000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE529D8535B6E0D9011C002E0000001D00EFBE0200380033004300310043003000460033004600410038003500320034004200310000001C000000970000001C000000010000001C0000002D00000000000000960000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C4C69627265576F6C662E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FAB13DA7E29E4CEE11AE93000C29335CED3AEC768D387A5741A7D5E116AEF015FAB13DA7E29E4CEE11AE93000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" + set "favorites=005C0100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657655C11005461736B42617200400009000400EFBE2557E88D2657665C2E000000D4990100000006000000000000000000000000000000AC6601005400610073006B0042006100720000001600CA003200B90400002657695C20004C69627265576F6C662E6C6E6B004C0009000400EFBE2657695C2657695C2E000000DA780000000008000000000000000000000000000000AE018D004C00690062007200650057006F006C0066002E006C006E006B0000001C00120000002B00EFBE529D8535B6E0D9011C002E0000001D00EFBE0200380033004300310043003000460033004600410038003500320034004200310000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) else ( + if "%input%" == "Google Chrome" ( + set "favoritesResolve=E60200004C0000000114020000000000C000000000000046830080002000000080E4020EB6E0D90180E4020EB6E0D9013AB600FBB5E0D901A0080000000000000100000000000000000000000000000054013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657185211005461736B42617200400009000400EFBE2557E88D265718522E000000D49901000000060000000000000000000000000000009CD11B015400610073006B0042006100720000001600C2003200A00800002657345C2000476F6F676C65204368726F6D652E6C6E6B00540009000400EFBE2657465C2657465C2E00000076780000000007000000000000000000000000000000C64BA80047006F006F0067006C00650020004300680072006F006D0065002E006C006E006B0000002000220000001E00EFBE02005500730065007200500069006E006E006500640000002000120000002B00EFBE80E4020EB6E0D90120001A0000001D00EFBE02004300680072006F006D0065000000200000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C476F6F676C65204368726F6D652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA933DA7E29E4CEE11AE93000C29335CED3AEC768D387A5741A7D5E116AEF015FA933DA7E29E4CEE11AE93000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" + set "favorites=00540100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657185211005461736B42617200400009000400EFBE2557E88D265718522E000000D49901000000060000000000000000000000000000009CD11B015400610073006B0042006100720000001600C2003200A00800002657345C2000476F6F676C65204368726F6D652E6C6E6B00540009000400EFBE2657465C2657465C2E00000076780000000007000000000000000000000000000000C64BA80047006F006F0067006C00650020004300680072006F006D0065002E006C006E006B0000002000120000002B00EFBE80E4020EB6E0D90120001A0000001D00EFBE02004300680072006F006D00650000002000220000001E00EFBE02005500730065007200500069006E006E006500640000002000000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" + ) + ) + ) + ) ) :: If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs don't have this key. -for /f "usebackq tokens=2 delims=\" %%a in (`reg query "HKEY_USERS" ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( +for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[0-9][0-9]*"`) do ( reg query "HKEY_USERS\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && ( + echo] for /f "usebackq tokens=3* delims= " %%b in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "AppData" 2^>nul ^| findstr /r /x /c:".*AppData[ ]*REG_SZ[ ].*" 2^>nul`) do ( - rmdir /s /q "%%b\%taskBarLocation%" > nul - mkdir "%%b\%taskBarLocation%" > nul - copy /y "Shortcuts\File Explorer.lnk" "%%b\%taskBarLocation%" > nul - - if "%noArgs%" == "true" ( - echo Setting File Explorer taskbar shortcut... - reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" /f - reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "00A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" /f - ) else ( - echo Setting %input% taskbar shortcut... - copy /y "Shortcuts\%input%.lnk" "%%b\%taskBarLocation%" > nul - - if "%input%" == "Microsoft Edge" ( - reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "E50200004C0000000114020000000000C000000000000046830080002000000013ECDA0121E0D901EA00DD0121E0D9014D038B7320E0D90186090000000000000100000000000000000000000000000052013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D901EA00DD0121E0D901140056003100000000002557E88D10005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A8B26A005400610073006B0042006100720000001600C0003200860900002557698D20004D4943524F537E312E4C4E4B0000560009000400EFBE2557E88D2557E88D2E000000D6990100000004000000000000000000000000000000B37BD2004D006900630072006F0073006F0066007400200045006400670065002E006C006E006B0000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBEEA00DD0121E0D9011C001A0000001D00EFBE02004D005300450064006700650000001C0000009C0000001C000000010000001C0000002D000000000000009B0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C4D6963726F736F667420456467652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA5831EF36144CEE11AE90000C29335CED3AEC768D387A5741A7D5E116AEF015FA5831EF36144CEE11AE90000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000EA00DD0121E0D9015961DF0121E0D901A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D9015961DF0121E0D901140056003100000000002557E88D11005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A7085A005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBE2557E88D2557E88D2E000000D8990100000007000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE5961DF0121E0D9011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA5931EF36144CEE11AE90000C29335CED3AEC768D387A5741A7D5E116AEF015FA5931EF36144CEE11AE90000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000" /f - reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "00560100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D901EA00DD0121E0D901140056003100000000002557E88D10005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A8B26A005400610073006B0042006100720000001600C4003200860900002557698D20004D4943524F537E312E4C4E4B0000560009000400EFBE2557E88D2557E88D2E000000D6990100000004000000000000000000000000000000B37BD2004D006900630072006F0073006F0066007400200045006400670065002E006C006E006B0000001C00120000002B00EFBEEA00DD0121E0D9011C001A0000001D00EFBE02004D005300450064006700650000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C00000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D9015961DF0121E0D901140056003100000000002557E88D11005461736B42617200400009000400EFBE2557E88D2557E88D2E000000D4990100000006000000000000000000000000000000A7085A005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBE2557E88D2557E88D2E000000D8990100000007000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE5961DF0121E0D9011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" /f - ) - - if "%input%" == "Brave" ( - reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "C40200004C0000000114020000000000C000000000000046830080002000000038DCEBF8DDE0D9018F25810DDEE0D9018F25810DDEE0D9017809000000000000010000000000000000000000000000003A013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90138DCEBF8DDE0D9018F25810DDEE0D9011400560031000000000026578C8210005461736B42617200400009000400EFBE26577C8226578C822E000000D499010000000C000000000000000000000000000000E3721D005400610073006B0042006100720000001600A80032007809000026578F82200042726176652E6C6E6B00440009000400EFBE26577C8226578F822E0000005E62060000000700000000000000000000000000000071751D00420072006100760065002E006C006E006B0000001800220000001E00EFBE02005500730065007200500069006E006E006500640000001800120000002B00EFBE8F25810DDEE0D9011800180000001D00EFBE020042007200610076006500000018000000930000001C000000010000001C0000002D00000000000000920000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C42726176652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FAB2E44312214CEE11AE92000C29335CED3AEC768D387A5741A7D5E116AEF015FAB2E44312214CEE11AE92000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" /f - reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "003A0100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90138DCEBF8DDE0D9018F25810DDEE0D9011400560031000000000026578C8210005461736B42617200400009000400EFBE26577C8226578C822E000000D499010000000C000000000000000000000000000000E3721D005400610073006B0042006100720000001600A80032007809000026578F82200042726176652E6C6E6B00440009000400EFBE26577C8226578F822E0000005E62060000000700000000000000000000000000000071751D00420072006100760065002E006C006E006B0000001800120000002B00EFBE8F25810DDEE0D9011800180000001D00EFBE02004200720061007600650000001800220000001E00EFBE02005500730065007200500069006E006E006500640000001800000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" /f - ) - - if "%input%" == "Waterfox" ( - reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "E70200004C0000000114020000000000C00000000000004683008000200000003D9CA75CE60CDA01EAE0A75CE60CDA01EC6B1558E60CDA01CF03000000000000010000000000000000000000000000005A013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000B7D01F849F07DA016E4824AA9F07DA01EAE0A75CE60CDA011400560031000000000061573D8911005461736B42617200400009000400EFBE5A574500615740892E0000004CB80100000002000000000000000000000000000000A0A418005400610073006B0042006100720000001600C8003200CF0300006157568920005761746572666F782E6C6E6B00004A0009000400EFBE61575989615759892E00000019480100000004000000000000000000000000000000141627015700610074006500720066006F0078002E006C006E006B0000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBEEAE0A75CE60CDA011C002E0000001D00EFBE0200360046003900340030004100430032003700410039003800440044003600310000001C000000960000001C000000010000001C0000002D000000000000009500000011000000030000003BDA87161000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C5761746572666F782E6C6E6B000060000000030000A058000000000000006465736B746F702D767374726D7464007C2BDE4447FEA44CA2303A644D62D9812938C4831978EE11AFFA000C290329287C2BDE4447FEA44CA2303A644D62D9812938C4831978EE11AFFA000C2903292845000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D00000068000000004800000032AD577505D8114988A52C1801858012000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000DA1129AA9F07DA0107732BAA9F07DA015CF4E1FBD161D801970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000B7D01F849F07DA016E4824AA9F07DA0107732BAA9F07DA01140056003100000000005A57450011005461736B42617200400009000400EFBE5A5745005A5745002E0000004CB80100000002000000000000000000000000000000F9792D005400610073006B00420061007200000016000E01320097010000A754662A200046494C4545587E312E4C4E4B00007C0009000400EFBE5A5745005A5745002E0000004EB80100000002000000000000000000520000000000A413A200460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE07732BAA9F07DA011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A00000011000000030000003BDA87161000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D767374726D7464007C2BDE4447FEA44CA2303A644D62D981B21C7C929273EE11AFF6000C290329287C2BDE4447FEA44CA2303A644D62D981B21C7C929273EE11AFF6000C2903292845000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D00000068000000004800000032AD577505D8114988A52C1801858012000000000000000000000000" /f - reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "005A0100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000B7D01F849F07DA016E4824AA9F07DA01EAE0A75CE60CDA011400560031000000000061573D8911005461736B42617200400009000400EFBE5A574500615740892E0000004CB80100000002000000000000000000000000000000A0A418005400610073006B0042006100720000001600C8003200CF0300006157568920005761746572666F782E6C6E6B00004A0009000400EFBE61575989615759892E00000019480100000004000000000000000000000000000000141627015700610074006500720066006F0078002E006C006E006B0000001C00120000002B00EFBEEAE0A75CE60CDA011C002E0000001D00EFBE0200360046003900340030004100430032003700410039003800440044003600310000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE12000000B7D01F849F07DA016E4824AA9F07DA0107732BAA9F07DA01140056003100000000005A57450011005461736B42617200400009000400EFBE5A5745005A5745002E0000004CB80100000002000000000000000000000000000000F9792D005400610073006B00420061007200000016001201320097010000A754662A200046494C4545587E312E4C4E4B00007C0009000400EFBE5A5745005A5745002E0000004EB80100000002000000000000000000520000000000A413A200460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE07732BAA9F07DA011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" /f - ) - - if "%input%" == "Google Chrome" ( - reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "E60200004C0000000114020000000000C000000000000046830080002000000080E4020EB6E0D90180E4020EB6E0D9013AB600FBB5E0D901A0080000000000000100000000000000000000000000000054013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657185211005461736B42617200400009000400EFBE2557E88D265718522E000000D49901000000060000000000000000000000000000009CD11B015400610073006B0042006100720000001600C2003200A00800002657345C2000476F6F676C65204368726F6D652E6C6E6B00540009000400EFBE2657465C2657465C2E00000076780000000007000000000000000000000000000000C64BA80047006F006F0067006C00650020004300680072006F006D0065002E006C006E006B0000002000220000001E00EFBE02005500730065007200500069006E006E006500640000002000120000002B00EFBE80E4020EB6E0D90120001A0000001D00EFBE02004300680072006F006D0065000000200000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000BEE87AE81000000000433A5C55736572735C557365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C476F6F676C65204368726F6D652E6C6E6B000060000000030000A058000000000000006465736B746F702D31646C64346430003AEC768D387A5741A7D5E116AEF015FA933DA7E29E4CEE11AE93000C29335CED3AEC768D387A5741A7D5E116AEF015FA933DA7E29E4CEE11AE93000C29335CED45000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000E3F2055EF8D5A6499004604854A49D84000000000000000000000000320300004C0000000114020000000000C0000000000000468300800020000000549E39A5246AD8012B113CA5246AD801A8B6C6DADDACD501970100000000000001000000000000000000000000000000A0013A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016000E01320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00220000001E00EFBE02005500730065007200500069006E006E006500640000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C0000009B0000001C000000010000001C0000002D000000000000009A0000001100000003000000E4A63B761000000000433A5C55736572735C757365725C417070446174615C526F616D696E675C4D6963726F736F66745C496E7465726E6574204578706C6F7265725C517569636B204C61756E63685C557365722050696E6E65645C5461736B4261725C46696C65204578706C6F7265722E6C6E6B000060000000030000A058000000000000006465736B746F702D62356E36683339006E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A06E1A1EE27BFFA94ABB0361D86F25337E500764DB17D6EC11A598000C2907D6A045000000090000A03900000031535053B1166D44AD8D7048A748402EA43D788C1D000000680000000048000000CE2181FCD4BF31408F25FF009E4345CA000000000000000000000000" /f - reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "00540100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE120000001AA557D820E0D90158B7CE0121E0D90117C3C83EABE0D901140056003100000000002657185211005461736B42617200400009000400EFBE2557E88D265718522E000000D49901000000060000000000000000000000000000009CD11B015400610073006B0042006100720000001600C2003200A00800002657345C2000476F6F676C65204368726F6D652E6C6E6B00540009000400EFBE2657465C2657465C2E00000076780000000007000000000000000000000000000000C64BA80047006F006F0067006C00650020004300680072006F006D0065002E006C006E006B0000002000120000002B00EFBE80E4020EB6E0D90120001A0000001D00EFBE02004300680072006F006D00650000002000220000001E00EFBE02005500730065007200500069006E006E006500640000002000000000A40100003A001F80C827341F105C1042AA032EE45287D668260001002600EFBE1200000056F21270246AD8010F37A185246AD8012B113CA5246AD80114005600310000000000B154E29B11005461736B42617200400009000400EFBEB154C69BB154E29B2E000000F4940100000001000000000000000000000000000000D5BA89005400610073006B00420061007200000016001201320097010000874F0749200046494C4545587E312E4C4E4B00007C0009000400EFBEB154E29BB154E29B2E00000097900100000002000000000000000000520000000000589C4400460069006C00650020004500780070006C006F007200650072002E006C006E006B00000040007300680065006C006C00330032002E0064006C006C002C002D003200320030003600370000001C00120000002B00EFBE2B113CA5246AD8011C00420000001D00EFBE02004D006900630072006F0073006F00660074002E00570069006E0064006F00770073002E004500780070006C006F0072006500720000001C00260000001E00EFBE0200530079007300740065006D00500069006E006E006500640000001C000000FF" /f - ) - ) - ) - ) + set "userAppdata=%%b" + ) + + if [!userAppdata!]==[] ( + echo Couldn't find AppData value for "%%a"! + ) else ( + echo Setting "%input%" taskbar shortcut for "%%a"... + echo ------------------------------------------------------------------------------------------------------ + + echo Clear current shortcuts and copy File Explorer + rmdir /s /q "!userAppdata!\%taskBarLocation%" > nul + mkdir "!userAppdata!\%taskBarLocation%" > nul + copy /y "Shortcuts\File Explorer.lnk" "!userAppdata!\%taskBarLocation%" > nul + + if "%browser%"=="true" ( + echo Copy browser shortcut + copy /y "Shortcuts\%input%.lnk" "!userAppdata!\%taskBarLocation%" > nul + ) + + echo Set in Registry + reg add "HKU\%%a\%rootKey%" /v "FavoritesResolve" /t REG_BINARY /d "%favoritesResolve%" /f > nul + reg add "HKU\%%a\%rootKey%" /v "Favorites" /t REG_BINARY /d "%favorites%" /f > nul + ) + ) ) \ No newline at end of file diff --git a/src/playbook/Executables/THEME.cmd b/src/playbook/Executables/THEME.cmd index 7adc9b6173..2a8478a928 100644 --- a/src/playbook/Executables/THEME.cmd +++ b/src/playbook/Executables/THEME.cmd @@ -1,42 +1,9 @@ @echo off -for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 set "win11=true") for /f "usebackq tokens=2 delims=\" %%a in (`reg query "HKEY_USERS" ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( reg query "HKEY_USERS\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && ( - if "%%a" == "AME_UserHive_Default" ( - call :ALLUSERS "%%a" "%SystemDrive%\Users\Default\AppData\Roaming" - ) else ( - for /f "usebackq tokens=2* delims= " %%b in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "AppData" ^| findstr /r /x /c:".*AppData[ ]*REG_SZ[ ].*"`) do ( - call :ALLUSERS "%%a" "%%c" - ) - ) + if not "%%a" == "AME_UserHive_Default" reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\%%a" /v "RotatingLockScreenEnabled" /t REG_DWORD /d "0" /f > nul ) ) -:: Clear lockscreen cache -for /d %%a in ("%ProgramData%\Microsoft\Windows\SystemData\*") do ( - for /d %%c in ("%%a\ReadOnly\LockScreen_*") do ( - rd /s /q "%%c" > nul 2>&1 - ) -) - -:: set default lockscreen -:: https://admx.help/?Category=Windows_11_2022&Policy=Microsoft.Policies.ControlPanelDisplay::CPL_Personalization_ForceDefaultLockScreen -reg add "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v LockScreenImage /t REG_SZ /d "%windir%\AtlasModules\Wallpapers\lockscreen.png" /f - -exit /b - -:ALLUSERS -if defined win11 reg add "HKU\%~1\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes" /v "ThemeMRU" /t REG_SZ /d "%windir%\resources\Themes\atlas-dark.theme;%windir%\resources\Themes\atlas-light.theme;%windir%\resources\Themes\atlas-legacy.theme;" /f > nul - -:: Set sound scheme to 'No Sounds' -reg add "HKU\%~1\AppEvents\Schemes" /ve /d ".None" /f > nul -PowerShell -NoP -C "New-PSDrive HKU Registry HKEY_USERS; Get-ChildItem -Path 'HKU:\%~1\AppEvents\Schemes\Apps' | Get-ChildItem | Get-ChildItem | Where-Object {$_.PSChildName -eq '.Current'} | Set-ItemProperty -Name '(Default)' -Value ''" > nul - -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemProtectedUserData\%~1\AnyoneRead\Colors" /v "AccentColor" /t REG_DWORD /d "4290728257" /f > nul -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemProtectedUserData\%~1\AnyoneRead\Colors" /v "StartColor" /t REG_DWORD /d "4291969335" /f > nul - -del /q /f "%~2\Microsoft\Windows\Themes\TranscodedWallpaper" > nul 2>&1 -rmdir /q /s "%~2\Microsoft\Windows\Themes\CachedFiles" > nul 2>&1 - -if not "%~1" == "AME_UserHive_Default" reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\%~1" /v "RotatingLockScreenEnabled" /t REG_DWORD /d "0" /f > nul \ No newline at end of file +exit /b \ No newline at end of file diff --git a/src/playbook/Executables/Themes/atlas-legacy.theme b/src/playbook/Executables/Themes/atlas-solid.theme similarity index 91% rename from src/playbook/Executables/Themes/atlas-legacy.theme rename to src/playbook/Executables/Themes/atlas-solid.theme index a44026c98a..90626a4ed4 100644 --- a/src/playbook/Executables/Themes/atlas-legacy.theme +++ b/src/playbook/Executables/Themes/atlas-solid.theme @@ -1,9 +1,9 @@ [Theme] -DisplayName=Atlas Legacy +DisplayName=Atlas Solid ThemeId={1545A5F7-3E0C-4670-8A21-99FDEEA37AA5} [Control Panel\Desktop] -Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-legacy.png +Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-solid.png Pattern= MultimonBackgrounds=0 PicturePosition=4 diff --git a/src/playbook/Executables/Themes/atlas-dark.theme b/src/playbook/Executables/Themes/atlas-v0.3.x-dark.theme similarity index 91% rename from src/playbook/Executables/Themes/atlas-dark.theme rename to src/playbook/Executables/Themes/atlas-v0.3.x-dark.theme index b678eb1f8c..8172489d6a 100644 --- a/src/playbook/Executables/Themes/atlas-dark.theme +++ b/src/playbook/Executables/Themes/atlas-v0.3.x-dark.theme @@ -1,9 +1,9 @@ [Theme] -DisplayName=Atlas Dark +DisplayName=Atlas v0.3.x Dark ThemeId={FB5C68CD-E525-4324-9830-18BFE1746747} [Control Panel\Desktop] -Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-dark.png +Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-v0.3.x-dark.png Pattern= MultimonBackgrounds=0 PicturePosition=4 diff --git a/src/playbook/Executables/Themes/atlas-light.theme b/src/playbook/Executables/Themes/atlas-v0.3.x-light.theme similarity index 90% rename from src/playbook/Executables/Themes/atlas-light.theme rename to src/playbook/Executables/Themes/atlas-v0.3.x-light.theme index 30a2c6b6bc..47af94ce6a 100644 --- a/src/playbook/Executables/Themes/atlas-light.theme +++ b/src/playbook/Executables/Themes/atlas-v0.3.x-light.theme @@ -1,9 +1,9 @@ [Theme] -DisplayName=Atlas Light +DisplayName=Atlas v0.3.x Light ThemeId={9F1AEB0B-4DD7-44EF-8734-D4F82A341818} [Control Panel\Desktop] -Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-light.png +Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-v0.3.x-light.png Pattern= MultimonBackgrounds=0 PicturePosition=4 diff --git a/src/playbook/Executables/Themes/atlas-v0.4.x-dark.theme b/src/playbook/Executables/Themes/atlas-v0.4.x-dark.theme new file mode 100644 index 0000000000..a04f8a9ac4 --- /dev/null +++ b/src/playbook/Executables/Themes/atlas-v0.4.x-dark.theme @@ -0,0 +1,42 @@ +[Theme] +DisplayName=Atlas v0.4.x Dark +ThemeId={FB5C68CD-E525-4324-9830-18BFE1746747} + +[Control Panel\Desktop] +Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-v0.4.x-dark.png +Pattern= +MultimonBackgrounds=0 +PicturePosition=4 +WindowsSpotlight=0 + +[Control Panel\Cursors] +AppStarting=%windir%\cursors\aero_working.ani +Arrow=%windir%\cursors\aero_arrow.cur +Hand=%windir%\cursors\aero_link.cur +Help=%windir%\cursors\aero_helpsel.cur +No=%windir%\cursors\aero_unavail.cur +NWPen=%windir%\cursors\aero_pen.cur +SizeAll=%windir%\cursors\aero_move.cur +SizeNESW=%windir%\cursors\aero_nesw.cur +SizeNS=%windir%\cursors\aero_ns.cur +SizeNWSE=%windir%\cursors\aero_nwse.cur +SizeWE=%windir%\cursors\aero_ew.cur +UpArrow=%windir%\cursors\aero_up.cur +Wait=%windir%\cursors\aero_busy.ani +DefaultValue=Windows Default + +[Sounds] +SchemeName=No Sounds + +[VisualStyles] +Path=%windir%\resources\themes\Aero\Aero.msstyles +ColorStyle=NormalColor +Size=NormalSize +AutoColorization=0 +ColorizationColor=0XC44A51A8 +SystemMode=Dark +AppMode=Dark +VisualStyleVersion=10 + +[MasterThemeSelector] +MTSM=RJSPBS \ No newline at end of file diff --git a/src/playbook/Executables/Themes/atlas-v0.4.x-light.theme b/src/playbook/Executables/Themes/atlas-v0.4.x-light.theme new file mode 100644 index 0000000000..249a7594b8 --- /dev/null +++ b/src/playbook/Executables/Themes/atlas-v0.4.x-light.theme @@ -0,0 +1,42 @@ +[Theme] +DisplayName=Atlas v0.4.x Light +ThemeId={9F1AEB0B-4DD7-44EF-8734-D4F82A341818} + +[Control Panel\Desktop] +Wallpaper=%windir%\AtlasModules\Wallpapers\atlas-v0.4.x-light.png +Pattern= +MultimonBackgrounds=0 +PicturePosition=4 +WindowsSpotlight=0 + +[Control Panel\Cursors] +AppStarting=%windir%\cursors\aero_working.ani +Arrow=%windir%\cursors\aero_arrow.cur +Hand=%windir%\cursors\aero_link.cur +Help=%windir%\cursors\aero_helpsel.cur +No=%windir%\cursors\aero_unavail.cur +NWPen=%windir%\cursors\aero_pen.cur +SizeAll=%windir%\cursors\aero_move.cur +SizeNESW=%windir%\cursors\aero_nesw.cur +SizeNS=%windir%\cursors\aero_ns.cur +SizeNWSE=%windir%\cursors\aero_nwse.cur +SizeWE=%windir%\cursors\aero_ew.cur +UpArrow=%windir%\cursors\aero_up.cur +Wait=%windir%\cursors\aero_busy.ani +DefaultValue=Windows Default + +[Sounds] +SchemeName=No Sounds + +[VisualStyles] +Path=%windir%\resources\themes\Aero\Aero.msstyles +ColorStyle=NormalColor +Size=NormalSize +AutoColorization=0 +ColorizationColor=0XC41B345A +SystemMode=Dark +AppMode=Light +VisualStyleVersion=10 + +[MasterThemeSelector] +MTSM=RJSPBS \ No newline at end of file diff --git a/src/playbook/Executables/user.png b/src/playbook/Executables/user.png index 51b38f68dc..c482109ecd 100644 Binary files a/src/playbook/Executables/user.png and b/src/playbook/Executables/user.png differ diff --git a/src/playbook/Images/librewolf.png b/src/playbook/Images/librewolf.png new file mode 100644 index 0000000000..1c6872d4a5 Binary files /dev/null and b/src/playbook/Images/librewolf.png differ diff --git a/src/playbook/Images/mpc-hc.png b/src/playbook/Images/mpc-hc.png deleted file mode 100644 index 5e023ddab7..0000000000 Binary files a/src/playbook/Images/mpc-hc.png and /dev/null differ diff --git a/src/playbook/Images/mpv.png b/src/playbook/Images/mpv.png deleted file mode 100644 index 7de06d2f42..0000000000 Binary files a/src/playbook/Images/mpv.png and /dev/null differ diff --git a/src/playbook/Images/npp.png b/src/playbook/Images/npp.png deleted file mode 100644 index c94cd118ce..0000000000 Binary files a/src/playbook/Images/npp.png and /dev/null differ diff --git a/src/playbook/Images/vlc.png b/src/playbook/Images/vlc.png deleted file mode 100644 index f768fec664..0000000000 Binary files a/src/playbook/Images/vlc.png and /dev/null differ diff --git a/src/playbook/Images/vscode.png b/src/playbook/Images/vscode.png deleted file mode 100644 index 37a084767a..0000000000 Binary files a/src/playbook/Images/vscode.png and /dev/null differ diff --git a/src/playbook/Images/vscodium.png b/src/playbook/Images/vscodium.png deleted file mode 100644 index 237307ce2a..0000000000 Binary files a/src/playbook/Images/vscodium.png and /dev/null differ diff --git a/src/playbook/local-build.cmd b/src/playbook/local-build.cmd index 967820672b..b41c6b168f 100644 --- a/src/playbook/local-build.cmd +++ b/src/playbook/local-build.cmd @@ -25,13 +25,13 @@ $defaultConfig = @{ removeProductCode = $true } -$configPath = "$env:APPDATA\local-build\config.json" +$configPath = "$([Environment]::GetFolderPath('ApplicationData'))\local-build\config.json" # ------------- # # config system # # ------------- # -$shortcut = "$env:LOCALAPPDATA\Microsoft\WindowsApps\ame-lb-conf.lnk" +$shortcut = "$([Environment]::GetFolderPath('LocalApplicationData'))\Microsoft\WindowsApps\ame-lb-conf.lnk" function New-ConfigPathShortcut { $WshShell = New-Object -comObject WScript.Shell @@ -45,14 +45,39 @@ function CreateConfig($conf) { $conf | ConvertTo-Json -Depth 100 | Out-File $configPath } +function Write-BulletPoint($message) { + $message | Foreach-Object { + Write-Host " - " -ForegroundColor Green -NoNewline + Write-Host $_ + } + Write-Host "" +} + + +if (Get-Command '7z.exe' -EA SilentlyContinue) { + $7zPath = '7z.exe' +} elseif (Test-Path "$([Environment]::GetFolderPath('ProgramFiles'))\7-Zip\7z.exe") { + $7zPath = "$([Environment]::GetFolderPath('ProgramFiles'))\7-Zip\7z.exe" +} +if (!$7zPath) { + Write-Host "This script requires 7-Zip to be installed to continue." + Pause + exit 1 +} + if (!(Test-Path $configPath)) { Remove-Item -Force -Path $shortcut -EA SilentlyContinue - Write-Host "It seems like this is your first time using AME Local Build.`n" -ForegroundColor Yellow - Write-Host "Setup`n---------------------------------" -ForegroundColor Green - Write-Host "Adding config to path would allow you to type 'ame-lb-conf' into Run (Win + R) or any other shell and open the config." -ForegroundColor Blue + Write-Host "It seems like this is your first time using AME Local Build.`n" -ForegroundColor Cyan + + Write-BulletPoint "Adding config to %PATH% would allow you to type 'ame-lb-conf' into Run or any other shell and open the config." + Write-BulletPoint "The configuration is in JSON, and explanations of those arguments are contained in the script." + Write-BulletPoint "You can change the config path by modifying the script." + + + Write-Host "`n---------------------------------------------------------------------------------------------------------`n" -ForegroundColor Magenta choice /c:yn /n /m "Would you like to add a shortcut to %PATH% for the configuration file? [Y/N]" - if ($LASTEXITCODE -eq 1) { New-ConfigPathShortcut} + if ($LASTEXITCODE -eq 1) { New-ConfigPathShortcut } choice /c:yn /n /m "Would you like to open the config file now? [Y/N]" CreateConfig $defaultConfig @@ -89,7 +114,8 @@ $defaultConfig.Keys | ForEach-Object { if ($config.Keys -notcontains $_) { $config = $config + @{ $_ = $defaultConfig.$_ - }; $updateConfig = $true + } + $updateConfig = $true } } if ($updateConfig) {CreateConfig $config} @@ -112,20 +138,18 @@ if (!(Test-Path -Path "playbook.conf")) { } # check if old files are in use +$num = 1 if (($replaceOldPlaybook) -and (Test-Path -Path $apbxFileName)) { try { $stream = [System.IO.File]::Open($apbxFileName, 'Open', 'Read', 'Write') $stream.Close() } catch { - Write-Host "The current playbook in the folder ($apbxFileName) is in use, and it can't be deleted to be replaced." -ForegroundColor Red - Write-Host 'Either configure "$replaceOldPlaybook" in the script configuration or close the application its in use with.' -ForegroundColor Red - Start-Sleep 4 - exit 1 + while(Test-Path -Path "$fileName ($num).apbx") {$num++} + $apbxFileName = "$PWD\$fileName ($num).apbx" } Remove-Item -Path $apbxFileName -Force -EA 0 } else { if (Test-Path -Path $apbxFileName) { - $num = 1 while(Test-Path -Path "$fileName ($num).apbx") {$num++} $apbxFileName = "$PWD\$fileName ($num).apbx" } @@ -154,7 +178,7 @@ New-Item $configDir -ItemType Directory -Force | Out-Null try { $tempPlaybookConf = "$rootTemp\playbook\playbook.conf" - $ymlPath = "Configuration\atlas\start.yml" + $ymlPath = "Configuration\custom.yml" $tempStartYML = "$rootTemp\playbook\$ymlPath" # remove entries in playbook config that make it awkward for testing @@ -165,8 +189,10 @@ try { if ($removeWinverRequirement) {$patterns += "", "", ""} if ($removeProductCode) {$patterns += ""} - $newContent = Get-Content "playbook.conf" | Where-Object { $_ -notmatch ($patterns -join '|') } - $newContent | Set-Content "$tempPlaybookConf" -Force + if ($patterns.Count -gt 0) { + $newContent = Get-Content "playbook.conf"| Where-Object { $_ -notmatch ($patterns -join '|') } + $newContent | Set-Content "$tempPlaybookConf" -Force + } if ($removeDependencies -or $liveLog) { $startYML = "$PWD\$ymlPath" @@ -176,9 +202,9 @@ try { $content = Get-Content -Path $tempStartYML if ($liveLog) { - # uncomment the 8th line (7 in PowerShell because arrays are zero-based) - if ($content.Count -gt 7) { - $content[7] = $content[7] -replace ' #', '' + # uncomment the 8th line (6 in PowerShell because arrays are zero-based) + if ($content.Count -gt 6) { + $content[6] = $content[6] -replace ' #', '' } } @@ -203,36 +229,25 @@ try { $excludeFiles = @( "local-build.cmd", - "playbook.conf", "*.apbx" - ); if (Test-Path $tempStartYML) { $excludeFiles += "start.yml" } + ) + if (Test-Path $tempStartYML) { $excludeFiles += "custom.yml" } + if (Test-Path $tempPlaybookConf) { $excludeFiles += "playbook.conf" } # make playbook, 7z is faster - $filteredItems = @() - if (Get-Command '7z.exe' -EA SilentlyContinue) { - $7zPath = '7z.exe' - } elseif (Test-Path "$env:ProgramFiles\7-Zip\7z.exe") { - $7zPath = "$env:ProgramFiles\7-Zip\7z.exe" - } + if (Test-Path $apbxPath) { Remove-Item $apbxFileName -Force } - if ($7zPath) { - (Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName ` - | Resolve-Path -Relative | ForEach-Object {$_.Substring(2)} | Out-File "$rootTemp\7zFiles.txt" -Encoding utf8 - - & $7zPath a -spf -y -mx1 -tzip "$apbxPath" `@"$rootTemp\7zFiles.txt" | Out-Null - # add edited files - Push-Location "$rootTemp\playbook" - & $7zPath u "$apbxPath" * | Out-Null - Pop-Location - } else { - $filteredItems += (Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName + "$tempPlaybookConf" - if (Test-Path $tempStartYML) { $filteredItems = $filteredItems + "$tempStartYML" } - - Compress-Archive -Path $filteredItems -DestinationPath $zipFileName - Rename-Item -Path $zipFileName -NewName $apbxFileName - } + (Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName ` + | Resolve-Path -Relative | ForEach-Object {$_.Substring(2)} | Out-File "$rootTemp\7zFiles.txt" -Encoding utf8 + + & $7zPath a -spf -y -mx1 -tzip "$apbxPath" `@"$rootTemp\7zFiles.txt" | Out-Null + # add edited files + Push-Location "$rootTemp\playbook" + & $7zPath u "$apbxPath" * | Out-Null + Pop-Location - Write-Host "Completed." -ForegroundColor Green + Write-Host "Build successfully! Path: `"$apbxPath`"" -ForegroundColor Green + Start-Sleep 1 } finally { Remove-Item $rootTemp -Force -EA 0 -Recurse | Out-Null } \ No newline at end of file diff --git a/src/playbook/playbook.conf b/src/playbook/playbook.conf index e664f9ca91..9a6e9b69c0 100644 --- a/src/playbook/playbook.conf +++ b/src/playbook/playbook.conf @@ -4,10 +4,14 @@ Atlas AtlasOS Playbook v0.3.2 AtlasOS Playbook for Windows 10 and 11 - +Atlas makes your computer snappier and more private with lots of usability improvements.]]>
An open and lightweight modification to Windows, designed to optimize performance, privacy and security.
+ 0.3.2 19045 @@ -28,8 +32,8 @@ https://atlasos.net https://ko-fi.com/atlasos - - + + Enable Defender (recommended) @@ -42,8 +46,8 @@ - - + + Default Windows Mitigations (recommended) @@ -57,7 +61,7 @@ - + Disable Core Isolation (recommended) @@ -70,11 +74,11 @@ - + - Remove Microsoft Edge - uninstall-edge + Disable Printing + disable-printing Disable Bluetooth @@ -87,16 +91,43 @@ - + + + + Disable Hibernation + disable-hibernation + + + Disable Automatic Updates + disable-auto-updates + + + Remove Snipping Tool App + remove-snipping-tool + + + + + + + + Disable Notifications + disable-notifications + + + Remove Microsoft Edge + uninstall-edge + + + Install a Browser + install-another-browser + + + + + + - - - Firefox - browser-firefox - firefox - #4676ed - #acf5fe - Brave browser-brave @@ -105,68 +136,28 @@ #3b3e4f - Chrome - browser-chrome - chrome - #e33b2e - #E38A84 - - - - - - - - - mpv - player-mpv - mpv - #4676ed - #acf5fe - - - MPC-HC - player-mpchc - mpc-hc - #131524 - #3b3e4f - - - VLC - player-vlc - vlc - #e33b2e - #E38A84 + LibreWolf + browser-librewolf + librewolf + #057DB6 + #86D8FF - - - - - - - Notepad++ - editor-npp - npp - #4676ed - #acf5fe - - - Visual Studio Code - editor-vscode - VSCode - #131524 - #3b3e4f + Firefox + browser-firefox + firefox + #FF3647 + #FFC742 - VSCodium - editor-vscodium - VSCodium - #e33b2e - #E38A84 + Chrome + browser-chrome + chrome + #7E7E7E + #D0D0D0 - + diff --git a/src/release-zip/Bypass Windows 11 Requirements.cmd b/src/release-zip/Bypass Windows 11 Requirements.cmd deleted file mode 100644 index 5edb99185a..0000000000 --- a/src/release-zip/Bypass Windows 11 Requirements.cmd +++ /dev/null @@ -1,74 +0,0 @@ -@echo off - -title Bypass Windows 11 Requirements -cd /d "%~dp0" - -fltmc > nul 2>&1 || ( - echo Administrator privileges are required. - PowerShell Start -Verb RunAs '%0' 2> nul || ( - echo You must run this script as admin. - exit /b 1 - ) - exit /b -) - -:: set ANSI escape characters -cd /d "%~dp0" -for /f %%a in ('forfiles /m "%~nx0" /c "cmd /c echo 0x1B"') do set "ESC=%%a" -set "right=%ESC%[C" -set "bullet= %ESC%[34m-%ESC%[0m" - -:main -mode con: cols=51 lines=18 -chcp 65001 > nul -echo] -echo %ESC%[31m Are you sure you want to bypass requirements? -echo โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€%ESC%[0m -echo Bypassing Windows 11 requirements %ESC%[4misn't%ESC%[0m -echo %ESC%[4mrecommended%ESC%[0m, and you could encounter issues in -echo the future, e.g. anticheats or other features. -echo] -echo %ESC%[7mSoftware that needs the requirements:%ESC%[0m -echo %bullet% Vanguard/VALORANT -echo %bullet% Core isolation -echo %bullet% Windows Hello -echo %bullet% BitLocker -echo] -echo This list could expand in the future and might -echo not cover everything. -echo] -=2%%ESC%[1m%ESC%[33mType 'I understand' to continue: %ESC%[0m - -:: This forces the user to type 'I understand' on the same line -setlocal EnableDelayedExpansion -set "str=I understand" -for /l %%a in (0 1 12) do ( - if not "!str:~%%a,1!" == "" call :xcopyInput "!str:~%%a,1!" -) -endlocal -echo] -echo %ESC%[2A%ESC%[?25l - -:runCommands -reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f > nul -reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f > nul - -echo %ESC%[32m Completed! %ESC%[0mPress any key to exit... %ESC%[1A -pause > nul -exit /b - -::::::::::::::::::::::::::::::::::::::::::::: -:: -------------- FUNCTIONS -------------- :: -::::::::::::::::::::::::::::::::::::::::::::: - -:xcopyInput <"key"> -set "key=" -for /f "delims=" %%a in ('2^>nul xcopy.exe /w /l "%~f0" "%~f0"') do if not defined key set "key=%%a" -set "key=%key:~-1%" -if /i "%key%" == "%~1" ( - if "%~1" == " " ( - =1% - ) else