_What is the expected result of the above steps?_
File gets updated immediately with "PowerToys Run":false.
_What is the actual result of the above steps?_
File takes a few seconds to get updated.
This bug seems to only occur for PT Run, and enabling works fine, its only disabling which has this delay. It seems like this happens because at the same time PowerLauncher.exe is loading, and it might be waiting for the load to complete for some reason. We should ideally ensure this update happens independently and isn't blocked by the update on PowerLauncher.
The end-user effect is that if a user disable PT Run and closes PT within 5 seconds the setting will not persist and PT Run will still be enabled on re-launching PT.
@crutkas @saahmedm @ryanbodrug-microsoft FYI
Is the enable disable bug fixed in master yet?
Not yet, but it's independent of that PR.
Look at #6620 and see what the impact of that fix will have on this.
Good to know, same area which is why I asked :)
I'm going to put this into the current release as it is unclear why this is having the issue but others are not which makes me wonder if there is some type of bug
@arjunbalgovind This issue is happening because WaitForSingleObject is used here , which blocks the calling thread until WPF app is terminated. Replacing it with RegisterWaitForSingleObject should fix this issue.
if that is the case, this should be a super easy fix if it is a single line #famousLastWords
Closing this as duplicate against #5860, since fixing that will also fix this issue.