🟣 C# / .NET 6+
Disable Taskbar Widgets Icon (C#)
Removes the Widgets icon from the Windows 11 taskbar. Applies the tweak via Microsoft.Win32.Registry.
SetDisableTaskbarWidgets.cs
// SetDisableTaskbarWidgets.cs
//
// Disable Taskbar Widgets Icon.
// Removes the Widgets icon from the Windows 11 taskbar.
//
// Usage: dotnet new console -o SetDisableTaskbarWidgets, replace Program.cs with this
// file, then dotnet run.
using System;
using Microsoft.Win32;
using RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced");
key.SetValue("TaskbarDa", 0, RegistryValueKind.DWord);
Console.WriteLine("Disable Taskbar Widgets Icon applied.");