solved
I am trying to disable FTH when clicking a button using registry, but I don't think it changes the enable value when clicked
Here is my code:
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH", "Enabled", 0, RegistryValueKind.DWord);
this is for when clicking a button.
31 Replies
are you sure it doesnt throw, ie you dont have sufficient permissions?
i can change it through the registry editor, but i cannot change it when clicking a button in visual studio. i have administrator perms in visual.
yeah, but when your program is launched, it might not inherit the admin rights?
if you launch it manually by right-clicking and elevating, does it work then?
nope
running it as an administrator doesnt change the value still
you need to verify your method is not throwing, still
That's the only other suggestion I have
im trying to change the value of enabled to 0 when disabling fault tolerant heap when clicking a button, but the value wont change, and it stays to 1.
yes, and now verify that the method doesnt throw...
wdym
sorry im new to visual studio
Registry.SetValue either works, or it throws an exception
$debug to verify that it doesnt throw
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
put a breakpoint on the call, then step-over to see what happens
alr ty
If something is thrown, studio will pause, and show a dialogue
alr
Otherwise the code will just move to the next line.
so uh i dont know what to pick
i need it to run as an administrator, so i can start debugging it
well thats saying you need to change in order to have admin
alr
no issues were found, nothing paused, but it doesnt change the value
I'm out of ideas, unless you typo'd something in the registry key
here is the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH
did you put a breakpoint on the method to ensure its being hit?
?
put a breakpoint on REgistry.SetValue
alr
like I said way up here, and then you said noproblems...
wait, now i have an error
that, err, doesnt look related
so it is harmless on my application?
thats a visual studio problem, not a 'your app' problem
alr
ty again
it might be an antivirus problem