locked
Changing taskbar location through command line? RRS feed

  • Question

  • Hello, moderator from win7 forums pointed me here to see if I can get my answer here, hope this is the right forum :)

    Is there a way to change the taskbar location on the screen through command line? I know the way to manually change it through properties, dragging and registry, these are not it. I've got a tablet and trying to make a script to rotate the screen, part of it should be moving the taskbar to right-hand side or bottom (depending on position).

    Thanks in advance

    Tuesday, December 15, 2009 2:46 PM

Answers

  • Hi

    The only way I'm aware of to accomplish this is with the registry. The Taskbar location is defined in the registry.

    You may be able to call a registry file in the script to change the location. This would also require stopping and restarting the Explorer.exe process to refresh the location.

    See Method 3 in the following tutorial. This has the registry files for all 4 positions for the Taskbar.

    Taskbar - Move Location on Desktop Screen

    You could also use the command  'reg add' to change the registry value.

    Reference:
    Technet: Reg Command

    Any way you use to accomplish this, besides the GUI methods, is going to require refreshing the Explorer.exe process.

    You can use the taskkill command to stop explorer.exe and then simply  explorer.exe  to restart the process.

    eg:

    Taskkill /IM explorer.exe /F   (ENTER)

    Explorer.exe  (ENTER)

    Reference:
    Technet: Taskkill

    Hope this helps.

    Thank You for using Windows 7

    Ronnie Vernon MVP

    • Marked as answer by Robinson Zhang Friday, December 18, 2009 1:51 AM
    Tuesday, December 15, 2009 8:00 PM
  • Based on my known, currently we only can do this job by modifying registry.

    Thanks.
    Friday, December 18, 2009 1:51 AM

All replies

  • Hi

    The only way I'm aware of to accomplish this is with the registry. The Taskbar location is defined in the registry.

    You may be able to call a registry file in the script to change the location. This would also require stopping and restarting the Explorer.exe process to refresh the location.

    See Method 3 in the following tutorial. This has the registry files for all 4 positions for the Taskbar.

    Taskbar - Move Location on Desktop Screen

    You could also use the command  'reg add' to change the registry value.

    Reference:
    Technet: Reg Command

    Any way you use to accomplish this, besides the GUI methods, is going to require refreshing the Explorer.exe process.

    You can use the taskkill command to stop explorer.exe and then simply  explorer.exe  to restart the process.

    eg:

    Taskkill /IM explorer.exe /F   (ENTER)

    Explorer.exe  (ENTER)

    Reference:
    Technet: Taskkill

    Hope this helps.

    Thank You for using Windows 7

    Ronnie Vernon MVP

    • Marked as answer by Robinson Zhang Friday, December 18, 2009 1:51 AM
    Tuesday, December 15, 2009 8:00 PM
  • Thank you for the reply, I was really jhoping to avoid the registry trick :\
    Maybe anyone is aware of the alternate solution? IE have a different taskbar location based on resolution and/or rotation?
    Wednesday, December 16, 2009 2:49 PM
  • Based on my known, currently we only can do this job by modifying registry.

    Thanks.
    Friday, December 18, 2009 1:51 AM
  • Not the answer I wanted, but we hardly ever get those :)
    Thanks a lot for the info, I guess I will have to play arround with the registry :\
    Friday, December 18, 2009 3:17 PM