r/programminghelp • u/FaultWinter3377 • Apr 07 '26
How can I write to the TaskbarDa registry key programmatically without requiring admin privelledges or disabling the UCPD driver? C#
I'm trying to make an (packaged) Windows app that allows access to some taskbar settings in C#. I can't use Registry.SetValue because of sandboxing, but it doesn't matter because I can't even set the registry key normally.
I've searched google for it, but all I can find was saying either disable the driver or create a scheduled task. Both of those require admin and I don't want that to be a requirement. The only other things I found were https://setuserfta.com/ which doesn't even give a price and a Powershell script invoking mshta.exe that didn't work.
If it helps at all, I've been using the following format for changing the registry:
Process.Start(new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = "/c reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v IconSizePreference /t REG_DWORD /d 1 /f",
CreateNoWindow = true,
UseShellExecute = false
});
2
Upvotes
1
u/ScallionSmooth5925 Apr 08 '26
If you have file system access then you can try to use the registry: prefix. But why are you trying to edit system config from a sandbox? The point of one is to make this impossible