asked on
Place shortcut from batch file to Windows 10 taskbar
Hi Expert!
I think I have placed this question before, but I cannot find it (sorry). I am trying to place a shortcut to a batch file to the task bar (no success so far). The batch file apps contains the following instruction (just in case needed):
@echo off
if exist Q:\FOLDERNAME (
start "" "c:\path\path\path\APPS-NAME.EXE"
) else (
echo !! You Must Have Q: Available !!
pause
)
The properties of said batch file is as follows:
This shortcut works perfect from desktop and anywhere else, but how can I place it in the task bar?
This shortcut works perfect from desktop and anywhere else, but how can I place it in the task bar?
%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
is that the path you are looking for?
ASKER
Hi MASQ, thanx u for locating it! (I thought it was for taskbar but that question was for "verify existence of X drive")
Hi, Seth Simmons, will try
ASKER
Hi Seth Simmons, didn't work. I copied the shortcut there and my Taskbar didn't show it
ASKER
No MASQ, will try
Hi Seth Simmons, didn't work. I copied the shortcut there and my Taskbar didn't show it
Did you reboot, or kill and restart Explorer process, I think that is required…
~bp
ASKER
ASKER
I don't see it
ASKER
Can u give an example of yours?
Add a pause command to the batch file (line 8) - start the batch file. The running (cmd) application should now be shown on the taskbar. Right click the (running) application on the taskbar and select 'Pin to taskbar'. Then remove the pause command from the batch file again.
ASKER
MASQ, that is what I have in my entry, my question there is after I pin-to-start, where does it appear? (I don;t see in the taskbar)
Hi Gerwin Jansen, I placed a pause as recommended, but what it does it display the CMD window, not the apps that it;s suppose to run.
ASKER
Thank u very much! "Pin to Taskbar" worked!
last inquiry prior closing the question, when I "Pin to Start", where can I see the icon?.
ASKER
Thank u very much!
ASKER
(while awarding I nonticed that u have mention "pin to taskbar" (sorry didn't see it)
ASKER
Guys, I know I closed the question, but I just noticed I need some info on the subject:
Without "cmd.exe /k" there is no "Pin to Start/Taskbar", but when I placed the CMD as recommended, the "Pin" appears - Why?
Windows won't pin a file that isn't executable (.exe) so the workaround is to get the shortcut to point at CMD which is executable (even though if you launch a batch file it opens with CMD!). (The shortcut says "Open CMD and then use it to open this batch file)
My guess is Microsoft don't want people filling up the taskbar/Start menu with Pinned batch files but frankly who knows why this limitation is there :)
ASKER
Thank u very much!
Was this the question you were looking for?
https://www.experts-exchange.com/questions/29140983/Batch-file-to-verify-existence-of-a-drive-then-execute-a-windows-apps.html