🟣 C# / .NET 6+

Disable Remote Assistance (C#)

Disables the ability for others to remotely assist this PC (requires admin). Requires an elevated (Administrator) prompt. Applies the tweak via Microsoft.Win32.Registry.

By WindowsScripting.com · 581 B
SetDisableRemoteAssistance.cs
// SetDisableRemoteAssistance.cs
//
// Disable Remote Assistance.
// Disables the ability for others to remotely assist this PC (requires admin). Requires an elevated (Administrator) prompt.
//
// Usage: dotnet new console -o SetDisableRemoteAssistance, replace Program.cs with this
// file, then dotnet run.

using System;
using Microsoft.Win32;

using RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Control\Remote Assistance");
key.SetValue("fAllowToGetHelp", 0, RegistryValueKind.DWord);

Console.WriteLine("Disable Remote Assistance applied.");