0

I have several production machines and sometimes test operators will unfortunately make unwanted changes. I want to make sure the taskbar is on the bottom - one PC it keeps getting moved to the right hand side.

I found an article that explained which registry setting to modify. I can check that setting and set it, if needed, successfully HOWEVER it says in order to make the changes IMMEDIATELY take effect that the Explorer shell must be restarted.

So, my question is how can I do that? How can I PROGRAMMATICALLY make the taskbar move to the correct spot AFTER I modify the registry?

I usually write in Vb.Net but I could convert C# if needed.

I appreciate any help!

Jason Shoulders
  • 659
  • 1
  • 12
  • 24
  • Why do you want to do this programmatically? There is a policy that keeps the bar where you want it. See https://www.tenforums.com/tutorials/104325-enable-disable-moving-taskbar-location-screen-windows-10-a.html#option1 – Steve Jun 11 '20 at 16:13
  • 1
    Sounds like you need to set some group policies, then they can't do these things ! – Neil Jun 11 '20 at 16:13
  • I'm not a part of the IT department. I'm in engineering. Anything regarding group policies aren't options for me and I prefer not to go down that rabbit hole. – Jason Shoulders Jun 11 '20 at 16:41
  • Maybe it's your app that needs fixing. You shouldn't care about the position of the Shell Tray area. While most users keep it in the default position, some prefer a different position (at the top, for example). Maybe this can help: [How to obtain task bar Notification Area width in a C# program?](https://stackoverflow.com/a/52572859/7444103). – Jimi Jun 11 '20 at 18:05
  • Can you trying sending a `WM_SETTINGCHANGE` message to all windows or the root explorer window (e.g. `SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, ByVal 0)`? – NetMage Jun 11 '20 at 18:38
  • Me in you're situation, I would be talking to the IT Department. Not really a point in re inventing the wheel. That aside, wouldn't it be as simple as just killing the explorer process and letting windows clean up? – Hursey Jun 11 '20 at 20:17
  • Does this answer your question? [How to programmatically restart windows explorer process](https://stackoverflow.com/questions/565405/how-to-programmatically-restart-windows-explorer-process) – TnTinMn Jun 11 '20 at 21:48
  • I tried that link BEFORE I posted my question and it didn't work for me. Everything came back as "Access Denied". Also, I'm not sure if the windows explorer process is the same as the explorer shell. It may be but I don't know if that's necessarily true. – Jason Shoulders Jun 12 '20 at 15:03

0 Answers0