Bat file task popup, powerscript or autoHK?

Page 2 of 2 FirstFirst 12

  1. Posts : 3,279
    Win10
       #11

    Re: your side question.
    To pin a batch file shortcut to the Taskbar:
    Create a new Shortcut on the Desktop using the following Command line in "Type the Location of the item:" (replace "C:\Full Path to my BATCH file.BAT" with the exact path to your own batch file".

    Code:
    C:\Windows\System32\cmd.exe /c "C:\Full Path to my BATCH file.BAT"
    Are you able to then Right-Click the shortcut and select "Pin To Taskbar"?

    To create a shortcut to a Task Schedule, create Desktop Shortcut using the following Command line in "Type the Location of the item:".

    If the Task Schedule is in the main "Task Scheduler Library" use something along this line (replace My_TaskName with the exact name of your own Task).
    Code:
    C:\Windows\System32\schtasks.exe /run /tn "My_TaskName"
    OR:
    If the Task Schedule is in the sub-branch of "Task Scheduler Library" use something along this line (replace My_TaskName with the exact name of your own Task; and My Custom Library with your own sub branch name).
    Code:
    C:\Windows\System32\schtasks.exe /run /tn "\My Custom Library\My_TaskName"
    Hope that works for you.
      My Computers


  2. Posts : 197
    Win 7,8.1 ,10
    Thread Starter
       #12

    It refuses any shortcut that links to a bat or cmd file, there is also no option to pin when I right click. To get it on the start menu I have to add it manually. If I add it to the taskbar folder manually it dose not show up, even after reboot.

    After some testing, if I add a toolbar, then disable the text and folder name it will show on the taskbar.

    Any .exe file dose not have this problem just bat, cmd and steams weblinks.

    Now this is odd, I managed to trick it, I added the command prompt to taskbar, then went to the manually replaced it with the shortcut to my bat file.

    Could kaspersky or malware bytes be preventing bats being used with the taskbar?
      My Computer


  3. Posts : 3,279
    Win10
       #13

    It could be, but I have no experience of either of those products (I only use Windows Defender).
      My Computers


  4. Posts : 17,083
    Windows 10 Home x64 Version 22H2 Build 19045.4894
       #14

    ZippyDSMlee said:
    It refuses any shortcut that links to a bat or cmd file
    Please post the whole of the Target field of a batch file shortcut to which you had added cmd.exe /c yet which does not offer the choice of pinning it when you right click on it.


    Denis
      My Computer


  5. Posts : 197
    Win 7,8.1 ,10
    Thread Starter
       #15

    Try3 said:
    Please post the whole of the Target field of a batch file shortcut to which you had added cmd.exe /c yet which does not offer the choice of pinning it when you right click on it.


    Denis
    C:\Users\username\Documents\Linkbar-Taskkill.bat
      My Computer


  6. Posts : 17,083
    Windows 10 Home x64 Version 22H2 Build 19045.4894
       #16

    There is no cmd.exe in that.

    You need to change it to
    Code:
    cmd.exe /c C:\Users\username\Documents\Linkbar-Taskkill.bat
    or
    Code:
    cmd.exe /c C:\Users\%UserName%\Documents\Linkbar-Taskkill.bat

    You will then need to alter the properties to choose the icon you want again.

    Denis
      My Computer


 

  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 21:07.
Find Us




Windows 10 Forums