### PowerShell Script using $args: Winget Bulk Install Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md This PowerShell script performs a bulk installation of packages using winget. It utilizes the $args automatic variable to access command-line arguments, specifically for the option and the list of package IDs. The script parses input provided as space, comma, or newline-separated values. ```powershell # Description: Winget bulk install # Category: Post # Host: log # Options: Install packages # Input: true # InputPlaceholder: Enter package IDs separated by space/comma/newline $option = $args.Count -ge 1 ? $args[0] : $null $text = $args.Count -ge 2 ? $args[1] : $null if ($option -ne 'Install packages') { throw "Unknown option: $option" } $ids = $text -split "[\r\n,; ]+" | ? { $_ } | % { $_.Trim() } foreach ($id in $ids) { Write-Output "Installing: $id" winget install $id -e --accept-source-agreements --accept-package-agreements } ``` -------------------------------- ### Winslop Plugin Structure Example (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/plugins.md This example demonstrates the basic structure of a Winslop plugin, including the required [Commands] section with Info, Check, Do, and Undo keys, and the optional [Expect] section for validation. The script itself is a PowerShell script. ```powershell # Disable Bing Search.ps1 [Commands] Info=Disables Bing integration in Windows Search Check=reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled Do=reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 0 /f && echo BingSearchEnabled set to 0 Undo=reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 1 /f && echo BingSearchEnabled set to 1 [Expect] BingSearchEnabled=0x0 ``` -------------------------------- ### Disable Start Menu Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables recommendations and ads in the Start menu by setting a specific registry value. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Start_IrisRecommendations" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Install Packages with Winget using PowerShell Source: https://context7.com/builtbybel/winslop/llms.txt This PowerShell script installs packages using winget based on user input. It accepts package IDs as space, comma, or newline-separated arguments. The script requires the 'winget' command-line tool to be available. ```powershell # scripts/WingetBulkInstall.ps1 # Description: Winget bulk install # Category: Post # Host: log # Options: Install packages # Input: true # InputPlaceholder: Enter package IDs separated by space/comma/newline $option = $args.Count -ge 1 ? $args[0] : $null $text = $args.Count -ge 2 ? $args[1] : $null if ($option -ne 'Install packages') { throw "Unknown option: $option" } $ids = $text -split "[\r\n,; ]+" | ? { $_ } | % { $_.Trim() } foreach ($id in $ids) { Write-Output "Installing: $id" winget install $id -e --accept-source-agreements --accept-package-agreements } ``` -------------------------------- ### PowerShell Plugin File Format Example Source: https://context7.com/builtbybel/winslop/llms.txt This PowerShell script demonstrates the structure of a Winslop plugin. It includes an INI-style header with [Commands] for Info, Check, Do, and Undo operations, and an [Expect] section for validating registry values. The script body is optional and can contain additional logic. ```powershell # plugins/Disable Snap Assist Flyout (NX).ps1 # ================================================================================ # Disable Snap Assist Flyout Plugin # This plugin disables the Snap Assist Flyout feature in Windows 11. # ================================================================================ [Commands] Info=This plugin disables Snap Assist Flyout in Windows 11 Check=reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v EnableSnapAssistFlyout Do=reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v EnableSnapAssistFlyout /t REG_DWORD /d 0 /f && taskkill /f /im explorer.exe && start explorer.exe Undo=reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v EnableSnapAssistFlyout /t REG_DWORD /d 1 /f && taskkill /f /im explorer.exe && start explorer.exe [Expect] EnableSnapAssistFlyout=0x0 # Script Body (optional) Write-Host "Plugin 'DisableSnapAssistFlyout' executed." ``` -------------------------------- ### Update Apps with Winget Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Automatically checks for and installs available app updates using the Windows package manager 'winget'. This process cannot be undone. ```batch @echo off winget upgrade --include-unknown winget upgrade --all --include-unknown ``` -------------------------------- ### Configuring Host Mode Overrides for Options in PowerShell Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md Shows how to specify host mode overrides for individual options within the script metadata. This allows specific actions to run in different host environments (e.g., console, log, silent). ```powershell # Description: Example script with host overrides. # Options: Install (console); Update (log); Cleanup (silent) param([string]$Option) Write-Host "Running option: $Option" if ($Option -eq "Install") { Write-Host "Running in console mode..." } elseif ($Option -eq "Update") { Write-Host "Running in log mode..." } elseif ($Option -eq "Cleanup") { Write-Host "Running in silent embedded mode..." } ``` -------------------------------- ### Execute and Manage PowerShell Plugins (C#) Source: https://context7.com/builtbybel/winslop/llms.txt The PluginManager class in C# handles the execution of PowerShell scripts. It starts a new PowerShell process, redirects output, and waits for the process to exit. It also includes methods for loading plugins into a TreeView and analyzing/fixing/restoring plugin states, though the implementation for the latter is omitted. ```csharp public static class PluginManager { // Execute a PowerShell script and capture output public static async Task ExecutePlugin(string pluginPath) { using (var process = new Process()) { process.StartInfo.FileName = "powershell.exe"; process.StartInfo.Arguments = $'-NoProfile -ExecutionPolicy Bypass -File "{pluginPath}"'; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.OutputDataReceived += (s, e) => { if (!string.IsNullOrEmpty(e.Data)) Logger.Log($"[PS Output] {e.Data}"); }; process.Start(); process.BeginOutputReadLine(); await Task.Run(() => process.WaitForExit()); } } // Load plugins from the 'plugins' folder into TreeView public static void LoadPlugins(TreeView treeView) { string pluginsFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins"); foreach (var scriptPath in Directory.GetFiles(pluginsFolder, "*.ps1")) { var scriptNode = new TreeNode { Text = Path.GetFileNameWithoutExtension(scriptPath), Tag = scriptPath, Checked = false }; pluginsNode.Nodes.Add(scriptNode); } } // Analyze plugin by running Check command and comparing to [Expect] public static async Task AnalyzePlugin(TreeNode node) { /* ... */ } // Apply fix using Do command public static async Task FixPlugin(TreeNode node) { /* ... */ } // Revert using Undo command public static async Task RestorePlugin(TreeNode node) { /* ... */ } } ``` -------------------------------- ### Define Script Metadata in PowerShell Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md Demonstrates how to define metadata for a PowerShell script to be recognized by the Winslop Extensions system. This includes setting a description, category, host mode, and input options. ```powershell # Description: Installs Chocolatey package manager. # Category: Pre # Host: embedded # Input: true # InputPlaceholder: Enter package names separated by commas... param([string]$Option, [string]$ArgsText) Write-Host "Running Chocolatey Installation..." Write-Host "Selected Option: $Option" Write-Host "Additional Text: $ArgsText" # Script logic here... ``` -------------------------------- ### PowerShell Plugin Example: Disable Bing Search Source: https://context7.com/builtbybel/winslop/llms.txt This PowerShell script provides a complete example of a Winslop plugin designed to disable Bing search integration. It follows the Check/Do/Undo pattern and includes registry validation within the [Expect] section. ```powershell # plugins/Disable Bing Search.ps1 [Commands] Info=Disables Bing integration in Windows Search Check=reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled Do=reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 0 /f && echo BingSearchEnabled set to 0 Undo=reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 1 /f && echo BingSearchEnabled set to 1 [Expect] BingSearchEnabled=0x0 ``` -------------------------------- ### Accessing Script Arguments in PowerShell Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md Illustrates how to access arguments passed to a PowerShell script from the Winslop Extensions system. Arguments can be accessed via named parameters or the $args array. ```powershell param([string]$Option, [string]$ArgsText) # Accessing arguments using named parameters Write-Host "Option from param: $Option" Write-Host "ArgsText from param: $ArgsText" # Accessing arguments using the $args array Write-Host "Option from $args[0]: $($args[0])" Write-Host "ArgsText from $args[1]: $($args[1])" ``` -------------------------------- ### FeatureBase Abstract Class Definition and Telemetry Feature Implementation (C#) Source: https://context7.com/builtbybel/winslop/llms.txt Defines the abstract `FeatureBase` class for creating Windows tweaks in Winslop. Includes an example implementation for a 'Turn off Telemetry data collection' feature, demonstrating how to interact with Windows Registry settings to check, apply, and revert changes. ```csharp // Winslop/Features/FeatureBase.cs public abstract class FeatureBase { public abstract string ID(); // Display name for the feature public abstract string GetFeatureDetails(); // Registry paths/values description public abstract Task CheckFeature(); // Returns true if already configured public abstract Task DoFeature(); // Apply the recommended setting public abstract bool UndoFeature(); // Revert to default Windows behavior public virtual string HelpAnchorId() => ID(); // Anchor for online documentation } // Example: Implementing a Telemetry feature // Winslop/Features/Privacy/Telemetry.cs public class Telemetry : FeatureBase { private const string dataCollection = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection"; private const string diagTrack = @"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DiagTrack"; public override string ID() => "Turn off Telemetry data collection"; public override string GetFeatureDetails() => $"{dataCollection} | {diagTrack}"; public override Task CheckFeature() { return Task.FromResult( Utils.IntEquals(dataCollection, "AllowTelemetry", 0) && Utils.IntEquals(diagTrack, "Start", 4) ); } public override Task DoFeature() { try { Registry.SetValue(dataCollection, "AllowTelemetry", 0, RegistryValueKind.DWord); Registry.SetValue(diagTrack, "Start", 4, RegistryValueKind.DWord); return Task.FromResult(true); } catch (Exception ex) { Logger.Log("Code red in " + ex.Message, LogLevel.Error); return Task.FromResult(false); } } public override bool UndoFeature() { try { Registry.SetValue(dataCollection, "AllowTelemetry", 1, RegistryValueKind.DWord); Registry.SetValue(diagTrack, "Start", 2, RegistryValueKind.DWord); return true; } catch (Exception ex) { Logger.Log("Code red in " + ex.Message, LogLevel.Error); return false; } } } ``` -------------------------------- ### PowerShell Script with Options and Input: ViVeTool Management Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md A PowerShell script designed to manage feature IDs using ViVeTool. It supports multiple options (Enable, Disable, Query, Open GitHub Releases) and accepts user input for feature IDs. The script includes a helper function to parse comma-separated IDs and demonstrates how to interact with external executables. ```powershell # Description: Manage feature IDs via ViVeTool # Category: Post # Host: log # Options: Enable IDs; Disable IDs; Query IDs; Open GitHub Releases # Input: true # InputPlaceholder: Enter comma-separated IDs (e.g., 123,456,789) param([string]$Option, [string]$ArgsText) # positions 0 and 1 function Parse-Ids($s) { if ([string]::IsNullOrWhiteSpace($s)) { return @() } $s.Split(',') | % { $_.Trim() } | ? { $_ -match '^\d+$' } | % { [int]$_ } } switch ($Option) { 'Open GitHub Releases' { Start-Process 'https://github.com/thebookisclosed/ViVe/releases'; break } 'Enable IDs' { $ids = Parse-Ids $ArgsText if ($ids.Count -eq 0) { throw "No valid IDs" } & "ViVeTool.exe" '/enable' ("/id:{0}" -f ($ids -join ',')) } # ... Disable / Query similar } ``` -------------------------------- ### PowerShell Script with Options: File Explorer Tweaks Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md This PowerShell script allows users to tweak File Explorer settings through a dropdown of options. It defines multiple options and uses a switch statement to execute different actions based on the selected option. It requires a single string parameter for the selected option. ```powershell # Description: File Explorer tweaks # Category: Post # Host: embedded # Options: Show file extensions; Hide file extensions; Open This PC (console) param([string]$Option) # position 0 switch ($Option) { 'Show file extensions' { Write-Output "Enabling extensions..."; # ... } 'Hide file extensions' { Write-Output "Disabling extensions..."; # ... } 'Open This PC' { Start-Process "explorer.exe" "shell:MyComputerFolder" } default { Write-Error "Unknown option: $Option" } } ``` -------------------------------- ### Simple PowerShell Script: Clear Temp Files Source: https://github.com/builtbybel/winslop/blob/main/docs/extensions.md A basic PowerShell script that clears temporary files. It requires no parameters, options, or input, making it a straightforward utility. The script uses Write-Output to indicate its action. ```powershell # Description: Clears temp files # Category: Post # Host: embedded # No param() needed — runs with zero positional arguments Write-Output "Cleaning temp..." # your logic here ``` -------------------------------- ### Common Registry Tweaks for Windows Source: https://context7.com/builtbybel/winslop/llms.txt This collection of PowerShell commands modifies common Windows registry values. These tweaks are used to disable telemetry, Copilot, Recall, Bing search, speed up shutdown, and disable ads in the Start Menu and File Explorer. ```powershell # Disable Telemetry reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f reg add "HKLM\SYSTEM\ControlSet001\Services\DiagTrack" /v Start /t REG_DWORD /d 4 /f # Disable Copilot in Taskbar reg add "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f # Disable Recall (Windows 11 24H2) reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" /v AllowRecallEnablement /t REG_DWORD /d 0 /f # Enable Full Context Menus (Windows 11) reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f # Disable Bing Search reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 0 /f # Speed Up Shutdown reg add "HKLM\SYSTEM\ControlSet001\Control" /v WaitToKillServiceTimeout /t REG_SZ /d "1000" /f # Disable Start Menu Ads reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f # Disable File Explorer Ads reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSyncProviderNotifications /t REG_DWORD /d 0 /f ``` -------------------------------- ### Optimize System Responsiveness Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Prioritizes CPU resources for foreground applications to enhance overall system responsiveness. ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile] "SystemResponsiveness"=dword:0000000a ``` -------------------------------- ### Restore All Built-in Windows Apps (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This script attempts to restore and re-register all built-in Windows applications for all users. It uses the Add-AppxPackage command with the -Register flag. Note that some apps may require the Microsoft Store or additional components depending on the Windows version. ```powershell # Example snippet for re-registering AppX packages Add-AppxPackage -Register "C:\Windows\AppxManifest.xml" -DisableDevelopmentMode ``` -------------------------------- ### Create System Restore Point (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Creates a System Restore Point named 'Bloatynosy NueEx Restore Point'. This operation requires Administrator privileges and uses WMI to create the restore point, displaying progress and completion. ```powershell $restorePoint = New-Object -ComObject SystemRestore $restorePoint.CreateRestorePoint("Bloatynosy NueEx Restore Point", 0, 0) ``` -------------------------------- ### Disable Welcome Experience Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables 'Welcome experience' suggestions and ads by modifying a specific registry value. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-310093Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Create System Restore Point with PowerShell Source: https://context7.com/builtbybel/winslop/llms.txt This PowerShell script creates a system restore point. It requires administrator privileges to run. The script demonstrates progress reporting during the restore point creation process and shows a message box upon completion. ```powershell # plugins/Create Restore Point.ps1 # Run as Admin if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Warning "You need to run this script as an Administrator!" exit } Add-Type -AssemblyName System.Windows.Forms $description = "Winslop Restore Point" $restorePointType = 12 # MODIFY_SETTINGS function Create-RestorePoint { Write-Host "Starting to create restore point..." -ForegroundColor Yellow for ($i = 0; $i -le 100; $i += 10) { Write-Progress -Activity "Creating Restore Point" -Status "$i% Complete" -PercentComplete $i Start-Sleep -Milliseconds 300 } $restorePoint = Get-WmiObject -List Win32_SystemRestore | ForEach-Object { $_.CreateRestorePoint($description, $restorePointType, 100) } Write-Host "Restore point created successfully." -ForegroundColor Green [System.Windows.Forms.MessageBox]::Show("Restore point created!", "Complete", "OK", "Information") } Create-RestorePoint ``` -------------------------------- ### Disable General Tips and Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables general tips, suggestions, and content delivery notifications by modifying a registry value. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Uninstall OneDrive (Command Line) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This utility uninstalls Microsoft OneDrive and attempts to remove any remaining integration files or registry entries. Administrator privileges are recommended for a complete removal. The undo action involves manually reinstalling OneDrive. ```bash # Example for per-machine uninstall (may vary) "C:\Program Files\Microsoft OneDrive\OneDriveSetup.exe" /uninstall # Example for per-user uninstall (may vary) "C:\Users\%USERNAME%\AppData\Local\Microsoft\OneDrive\OneDriveSetup.exe" /uninstall ``` -------------------------------- ### Disable Lock Screen Tips and Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables lock screen tips, overlays, and related content delivery by modifying registry values. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenOverlayEnabled" -Value 0 -PropertyType DWORD -Force | Out-Null New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Perform Basic Disk Cleanup Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Deletes temporary files from the user's Temp folder and runs the built-in Disk Cleanup utility. This action is not supported for undo. ```batch @echo off DEL /Q /F /S %LOCALAPPDATA%\Temp\*.* cleanmgr.exe /sageset:1 cleanmgr.exe /sagerun:1 cleanmgr.exe /verylowdisk ``` -------------------------------- ### Download and Execute Remote Script (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Downloads and executes a PowerShell script from a remote URL. Requires an internet connection and trust in the script source. This command runs remote code directly. ```powershell irm christitus.com/win | iex ``` -------------------------------- ### Speed Up Menu Show Delay Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Reduces the delay before menus and submenus appear when hovering over them, making navigation feel faster. ```reg Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Desktop] "MenuShowDelay"="10" ``` -------------------------------- ### Uninstall Default Windows Apps (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This script uninstalls a comprehensive list of built-in Windows applications (Appx) for all users. It also removes provisioned packages and disables the re-installation or suggestion of these apps through registry modifications. This requires elevated privileges. ```powershell # Example snippet for removing Appx packages Get-AppxPackage *AppName* | Remove-AppxPackage -AllUsers # Example snippet for removing provisioned packages Remove-AppxProvisionedPackage -Online -PackageName "*AppName*" # Example registry modification (conceptual) Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\WindowsStore" -Name "AutoDownload" -Value 2 Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Value 1 ``` -------------------------------- ### Advanced PowerShell Script for File Explorer Tweaks Source: https://context7.com/builtbybel/winslop/llms.txt This PowerShell script demonstrates an advanced extension for Winslop, allowing for customizable file explorer settings. It accepts an 'Option' parameter to control features like showing/hiding file extensions or opening 'This PC' in a console. The script is designed to be placed in the '.\scripts\' folder and includes metadata headers for description, category, host, and options. ```powershell # scripts/FileExplorerTweaks.ps1 # Description: File Explorer tweaks # Category: Post # Host: embedded # Options: Show file extensions; Hide file extensions; Open This PC (console) param([string]$Option) # position 0 switch ($Option) { 'Show file extensions' { Write-Output "Enabling extensions..." reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f } 'Hide file extensions' { Write-Output "Disabling extensions..." reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f } 'Open This PC' { Start-Process "explorer.exe" "shell:MyComputerFolder" } default { Write-Error "Unknown option: $Option" } } ``` -------------------------------- ### Toggle User Account Control (UAC) Settings (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This script modifies User Account Control (UAC) behavior by changing specific registry values. Key values include 'EnableLUA', 'ConsentPromptBehaviorAdmin', and 'PromptOnSecureDesktop'. A reboot may be required for changes to take full effect. The undo action restores the original UAC settings. ```registry Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLUA"="1" "ConsentPromptBehaviorAdmin"="5" "PromptOnSecureDesktop"="1" ``` -------------------------------- ### Configure BSOD Display Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Modifies registry settings to display detailed Blue Screen of Death (BSOD) information instead of a simplified sad face. ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CrashControl] "DisplayParameters"=dword:00000001 "DisableEmoticon"=dword:00000001 ``` -------------------------------- ### Disable Tailored Experiences (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables personalized tips, ads, and recommendations that use diagnostic data by modifying a registry value. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Privacy" -Name "TailoredExperiencesWithDiagnosticDataEnabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Enable Verbose Logon Status Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Enables detailed status messages during system logon and shutdown, showing processes that might be causing delays. ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "VerboseStatus"=dword:00000001 ``` -------------------------------- ### Manage Features (Load, Analyze, Apply) - C# Source: https://context7.com/builtbybel/winslop/llms.txt The FeatureNodeManager is a static class for batch operations on features. It handles loading features into a TreeView, analyzing their current state, applying fixes, and restoring default settings. It utilizes the FeatureLoader and interacts with UI elements and a logger. ```csharp public static class FeatureNodeManager { // Load all features into a TreeView control public static void LoadFeatures(TreeView tree) { var features = FeatureLoader.Load(); tree.Nodes.Clear(); foreach (var feature in features) AddNode(tree.Nodes, feature); tree.ExpandAll(); } // Analyze all checked features and log issues public static async Task AnalyzeAll(TreeNodeCollection nodes) { ResetAnalysis(); foreach (TreeNode node in nodes) await AnalyzeCheckedRecursive(node); Logger.Log("ANALYSIS COMPLETE", LogLevel.Info); Logger.Log($"Summary: {TotalChecked - IssuesFound} of {TotalChecked} OK; {IssuesFound} require attention."); } // Apply fixes to all checked features public static async Task FixChecked(TreeNode node) { if (node.Tag is FeatureNode fn && !fn.IsCategory && node.Checked && fn.Feature != null) { bool result = await fn.Feature.DoFeature(); Logger.Log(result ? $"Fixed: {fn.Name}" : $"Fix failed: {fn.Name}"); } foreach (TreeNode child in node.Nodes) await FixChecked(child); } // Restore all checked features to defaults public static void RestoreChecked(TreeNode node) { if (node.Tag is FeatureNode fn && !fn.IsCategory && node.Checked && fn.Feature != null) { bool ok = fn.Feature.UndoFeature(); Logger.Log(ok ? $"Restored: {fn.Name}" : $"Restore failed: {fn.Name}"); } foreach (TreeNode child in node.Nodes) RestoreChecked(child); } // Single feature operations public static async void AnalyzeFeature(TreeNode node) { /* ... */ } public static async Task FixFeature(TreeNode node) { /* ... */ } public static void RestoreFeature(TreeNode node) { /* ... */ } } ``` -------------------------------- ### Remove 'Ask Copilot' Context Menu Entry (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Removes the 'Ask Copilot' context menu entry by adding a specific CLSID to the Shell Extensions 'Blocked' list in the registry. The undo operation deletes this CLSID. ```powershell New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{CB3B0003-8088-4EDE-8769-8B354AB2FF8C}" -Force | Out-Null ``` -------------------------------- ### JavaScript Version Comparison and Update Check Source: https://github.com/builtbybel/winslop/blob/main/docs/update.html This JavaScript code compares the user's Winslop application version with the latest available version. It parses version strings, determines if the user's version is outdated, up-to-date, or a newer development build, and updates the UI accordingly. It also includes functionality to open the changelog in a new window. ```javascript const latestVersion = "0.51.148"; function compareVersions(v1, v2) { const a = v1.split(".").map(Number); const b = v2.split(".").map(Number); for (let i = 0; i < Math.max(a.length, b.length); i++) { if ((a[i] || 0) < (b[i] || 0)) return -1; if ((a[i] || 0) > (b[i] || 0)) return 1; } return 0; } function openChangelog(version) { // point to Winslop tag const url = `https://github.com/builtbybel/Winslop/releases/tag/${version}`; window.open( url, "changelogWindow", "width=800,height=600,resizable=yes,scrollbars=yes" ); } const params = new URLSearchParams(window.location.search); const userVersion = params.get("version"); const status = document.getElementById("status"); if (!userVersion) { status.innerText = "❓ No version found. Please open this page from the Winslop app."; } else { const result = compareVersions(userVersion, latestVersion); if (result < 0) { status.innerHTML = ` ⚠️ Your version (${userVersion}) is outdated.
Latest version: ${latestVersion}
⬇️ Download here  |  📄 View Changelog `; } else if (result === 0) { status.innerHTML = `✅ Your version (${userVersion}) is up to date.`; } else { status.innerHTML = `✅ Your version (${userVersion}) is newer than the official release (${latestVersion}).
Note: You may be using a development build.`; } } ``` -------------------------------- ### Remove 'Edit with Notepad' Context Menu Entry (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Removes the 'Edit with Notepad' context menu entry by adding a specific CLSID to the Shell Extensions 'Blocked' list in the registry. The undo operation deletes this CLSID. ```powershell New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{CA6CC9F1-867A-481E-951E-A28C5E4F01EA}" -Force | Out-Null ``` -------------------------------- ### Enable 'End Task' Context Menu Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Adds an 'End Task' option to the Windows 11 taskbar context menu for quickly closing unresponsive applications. ```reg Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings] "TaskbarEndTask"=dword:00000001 ``` -------------------------------- ### Load Features into Categories - C# Source: https://context7.com/builtbybel/winslop/llms.txt The FeatureLoader class organizes available features into a hierarchical structure. It groups related tweaks into categories and defines default checked states for UI display. This is a static class with a single method, Load, returning a list of FeatureNode objects. ```csharp public static class FeatureLoader { public static List Load() { return new List { new FeatureNode("Issues") { Children = { new FeatureNode(new BasicCleanup()), new FeatureNode(new WingetUpgradeAll()) { DefaultChecked = false }, } }, new FeatureNode("System") { Children = { new FeatureNode(new BSODDetails()), new FeatureNode(new VerboseStatus()), new FeatureNode(new SpeedUpShutdown()), new FeatureNode(new NetworkThrottling()), new FeatureNode(new SystemResponsiveness()), new FeatureNode(new MenuShowDelay()), new FeatureNode(new TaskbarEndTask()), new FeatureNode(new DisableHibernation()), } }, new FeatureNode("Privacy") { Children = { new FeatureNode(new ActivityHistory()), new FeatureNode(new LocationTracking()), new FeatureNode(new PrivacyExperience()), new FeatureNode(new Telemetry()), } }, new FeatureNode("AI") { Children = { new FeatureNode(new CopilotTaskbar()), new FeatureNode(new Recall()), new FeatureNode(new ClickToDo()) { DefaultChecked = false }, } }, // Additional categories: MS Edge, UI, Gaming, Ads... }; } } ``` -------------------------------- ### Disable Settings Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables suggestions and ads within the Settings app by modifying specific registry values. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338393Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353694Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353696Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Win95 Classic CSS Variables and Styles Source: https://github.com/builtbybel/winslop/blob/main/docs/log-inspector/index.html This CSS defines the visual theme for the Winslop Log Inspector, mimicking a Windows 95 classic interface. It uses CSS variables for colors and fonts, and styles various elements like headers, buttons, text areas, and output sections to achieve the retro look. It also includes responsive adjustments for smaller screens. ```css :root { --face: #c0c0c0; --face2: #d4d0c8; --shadow: #808080; --dark: #404040; --hilite: #ffffff; --title: #000080; --title2: #000060; --titleText: #ffffff; --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --ui: "MS Sans Serif", Tahoma, Verdana, Arial, sans-serif; } * { box-sizing: border-box; } body { margin: 0; background: var(--face); color: #000; font-family: var(--ui); font-size: 12px; } /* Header -> Win95 titlebar */ header { background: linear-gradient(90deg, var(--title), var(--title2)); color: var(--titleText); padding: 6px 8px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #000; user-select: none; } header h1 { margin: 0; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; } .badge { font-weight: 400; font-size: 11px; padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); } /* Top-right links */ .actions { display: flex; gap: 6px; } .actions a { color: #000; text-decoration: none; background: var(--face2); padding: 2px 8px; border: 2px solid var(--hilite); border-right-color: var(--shadow); border-bottom-color: var(--shadow); } .actions a:active { border: 2px solid var(--shadow); border-right-color: var(--hilite); border-bottom-color: var(--hilite); padding: 3px 7px 1px 9px; } /* Layout */ main { padding: 12px; max-width: 920px; margin: 0 auto; } .card { background: var(--face2); padding: 10px; border: 2px solid var(--shadow); border-right-color: var(--hilite); border-bottom-color: var(--hilite); } .hint { margin: 0 0 8px 0; line-height: 1.4; color: #111; } .footnote { margin-top: 6px; color: #222; font-size: 11px; } textarea { width: 100%; height: 220px; resize: vertical; font-family: var(--mono); font-size: 12px; padding: 8px; background: #fff; outline: none; border: 2px solid var(--shadow); border-right-color: var(--hilite); border-bottom-color: var(--hilite); } .btn-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } button { font-family: var(--ui); font-size: 12px; padding: 4px 10px; background: var(--face2); border: 2px solid var(--hilite); border-right-color: var(--shadow); border-bottom-color: var(--shadow); cursor: pointer; } button:active { border: 2px solid var(--shadow); border-right-color: var(--hilite); border-bottom-color: var(--hilite); padding: 5px 9px 3px 11px; } button.secondary { filter: grayscale(10%); } .result { margin-top: 10px; background: #fff; padding: 8px; min-height: 120px; overflow: auto; border: 2px solid var(--shadow); border-right-color: var(--hilite); border-bottom-color: var(--hilite); font-family: var(--mono); } .section-title { font-family: var(--ui); font-weight: 700; margin: 0 0 6px 0; } .row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px dotted #ddd; } .row:last-child { border-bottom: none; } .tag { font-family: var(--ui); font-size: 11px; padding: 1px 6px; border: 1px solid #999; background: #f3f3f3; white-space: nowrap; } .tag.issue { background: #ffe6e6; border-color: #cc6666; } .tag.ok { background: #e7ffe7; border-color: #66aa66; } .tag.plugin { background: #e7f0ff; border-color: #6688cc; } /* Styles for elements your JS injects */ .issue, .key, .plugin { padding: 4px 6px; margin: 4px 0; border-left: 3px solid #999; background: #fafafa; word-break: break-word; } .issue { border-left-color: #b00020; background: #ffecec; } .key { border-left-color: #333; background: #f4f4f4; } .plugin { border-left-color: #1e4e80; background: #ecf3ff; } #output h3 { font-family: var(--ui); font-size: 12px; margin: 8px 0 6px 0; } #output hr { border: 0; border-top: 1px solid #cfcfcf; margin: 10px 0; } @media (max-width: 520px) { .actions { display: none; } } ``` -------------------------------- ### Control File Extensions and Hidden Files Visibility (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Hides known file extensions and disables viewing of super hidden files by modifying registry values and restarting Explorer. Checks 'HideFileExt' and 'ShowSuperHidden'. ```powershell New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 1 -PropertyType DWORD -Force | Out-Null New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSuperHidden" -Value 0 -PropertyType DWORD -Force | Out-Null Stop-Process -Name explorer -Force ``` -------------------------------- ### Speed Up System Shutdown Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Reduces the time Windows waits for services to shut down, potentially speeding up the shutdown process. ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control] "WaitToKillServiceTimeout"="1000" ``` -------------------------------- ### Restart Windows Explorer (PowerShell) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This script restarts the Windows Explorer process (explorer.exe). It is useful for applying registry changes immediately. The process is first stopped forcefully and then restarted. ```powershell Stop-Process -Name explorer -Force Start-Process explorer.exe ``` -------------------------------- ### Disable Personalized Ads (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Disables personalized ads by turning off the advertising ID in the registry. Recommended value is 0, undo value is 1. ```powershell New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -Value 0 -PropertyType DWORD -Force | Out-Null ``` -------------------------------- ### Hide Sponsored Links in Edge New Tab Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md Configures Microsoft Edge to hide sponsored content and default top sites on the new tab page. ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge] "NewTabPageHideDefaultTopSites"=dword:00000001 ``` -------------------------------- ### Remove Edit with Photos Context Menu Entry (Registry) Source: https://github.com/builtbybel/winslop/blob/main/docs/features.md This script modifies the Windows Registry to remove the 'Edit with Photos' context menu entry. It adds a specific CLSID to the 'Blocked' Shell Extensions key. The undo action simply deletes this CLSID value. ```registry Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked] "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}"="" ```