Need 'Pin To Taskbar' Option ...

Page 1 of 2 12 LastLast

  1. Posts : 526
    Windows 10 (22H2)
       #1

    Need 'Pin To Taskbar' Option ...


    ... or something's not right.

    I created a shortcut that points to a batch file. The shortcut works great.

    HOWEVER : On r-clik I am NOT seeing a 'pin to taskbar' option and I want to pin it to the taskbar. Others shortcuts have it.

      My Computer


  2. Posts : 13,903
    Win10 Version 22H2 Pro and Home, Win11 Pro and Home
       #2

    After I create shortcuts on the desktop I can drag as desired to the Taskbar. The available on the right-click context menu Pin to Start is a different thing. Batch .bat files can't be done, needs to be an actual shortcut pointing to them.
      My Computers


  3. Posts : 56,807
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #3

    I just tried that with a .bat and a shortcut to the .bat. No r-click option on either, and drag and drop prohibited. I forced the extension to .exe as a test and all options are there. So, it is a Windows limitation and restriction based on file extension.
      My Computers


  4. Posts : 526
    Windows 10 (22H2)
    Thread Starter
       #4

    Berton said:
    After I create shortcuts on the desktop I can drag as desired to the Taskbar.
    This shortcut was not created on the desktop. However, dragging it to the taskbar is not the same as 'pin' and not the request.
    Berton said:
    The available on the right-click context menu Pin to Start is a different thing.
    Obviously.
    Berton said:
    Batch .bat files can't be done, needs to be an actual shortcut pointing to them.
    I know, read the op ...
    MourningStar said:
    I created a shortcut ...
      My Computer


  5. Posts : 56,807
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #5

    This shortcut was not created on the desktop. However, dragging it to the taskbar is not the same as 'pin' and not the request.
    Actually, it is. I grabbed the CCleaner shortcut on my desktop and dragged it down to the taskbar, not letting go. This is what it said, then I let go and it did. I then right clicked the taskbar entry and un-pinned it.

    Need 'Pin To Taskbar' Option ...-2021-07-27_13h11_46.jpg
      My Computers


  6. Posts : 526
    Windows 10 (22H2)
    Thread Starter
       #6

    ^
    The topic is shortcut to a bat file pinned to the taskbar. My statement remains valid. And you have confirmed it's validation thus:
    f14tomcat said:
    I just tried that with a .bat and a shortcut to the .bat. No r-click option on either, and drag and drop prohibited. I forced the extension to .exe as a test and all options are there. So, it is a Windows limitation and restriction based on file extension.
    good to know -thx. Anyone have a work-around to pin it on the taskbar?
      My Computer


  7. Posts : 42,738
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #7

    One way: Create a 1 line Autohotkey file to launch the bat file.

    Create a shortcut to its exe file. You can pin that.

    E.g. bat file mybatfile is on my desktop so Autohotkey line is

    run, "C:\Users\dalaw\Desktop\mybatfile.bat"

    in runmybatfile.ahk

    Rt click that, compile to get

    runmybatfile.exe

    I did suggest in your previous thread you might consider using Autohotkey for the script..
      My Computers


  8. Posts : 526
    Windows 10 (22H2)
    Thread Starter
       #8

    ^
    Thank you dalchina. Although I resist installing 3rd party s/w, I do so on occasion and Autohotkey is one of intergrity and have no problem with it. I have decided to assign one of the programmable keys on my keyboard for this task. In my haste I overlooked that I had one of them defined to turn off the internet so it just seemed logical to put this function next to it.

    I am sure this will surface again for me and, based on this Windows limitation as indicated by f14tomcat, I will bookmark this topic for when I won't want to commit a programmable key.

    Thx again all.
    Last edited by MourningStar; 27 Jul 2021 at 21:01.
      My Computer


  9. Posts : 30,531
    Windows 10 (Pro and Insider Pro)
       #9

    This has been discussed before... Pin Any File To Taskbar in Windows 10

    To pin any file to Taskbar (but Windows doesn't allow it), you have to:
    -rename the file (say into file.exe)
    -make a shortcut, and pin it to Taskbar
    -open shortcut properties, and in "Target" rename the file back to what it was i.e. file.bat
    -rename the original file back to file.bat (before you click apply in previous step)
      My Computers


  10. Posts : 2,177
    Windows 10 Pro 64-bit v22H2
       #10

    Running a batch file from shortcut
    Create shortcut to batch file
    Edit shortcut Target to have syntax: cmd.exe /c <path><batchfile>

    Running a batch as an administrator from shortcut
    Create shortcut to batch file
    Edit shortcut Target to have syntax: runas.exe /user:Administrator "cmd.exe /c <path><batchfile>"

    Note the second type will ask you to enter the administrator's password when run

    Examples shortcut targets:

    C:\Windows\System32\cmd.exe /c C:\Programs\dirc.bat

    C:\Windows\System32\runas.exe /user:Administrator "C:\Windows\System32\cmd.exe /c C:\Programs\FDResPub.bat"

    Here are the two examples on the task bar

    Need 'Pin To Taskbar' Option ...-2021_07_27_20_42_461.jpg

    References

    How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu?
    How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu? - Super User

    How do you run a command as an administrator from the Windows command line?
    cmd - How do you run a command as an administrator from the Windows command line? - Stack Overflow
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:18.
Find Us




Windows 10 Forums