🟣 C# / .NET 6+
Show Hidden Files (C#)
Makes File Explorer always show hidden files and folders. Applies the tweak via Microsoft.Win32.Registry.
SetShowHiddenFilesGlobal.cs
// SetShowHiddenFilesGlobal.cs
//
// Show Hidden Files.
// Makes File Explorer always show hidden files and folders.
//
// Usage: dotnet new console -o SetShowHiddenFilesGlobal, 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("Hidden", 1, RegistryValueKind.DWord);
Console.WriteLine("Show Hidden Files applied.");