A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do you get this batch file shortcut in the task bar with an icon you want?



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old September 9th 18, 04:16 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

How do you get this batch file shortcut in the task bar with an icon you want?
(Please try the example before responding because intuitive answers fail!)

Some batch files work to put the icon in the task bar.
But this batch file does not work.

Why?

Here is how to reproduce exactly my problem.
001 I create a new desktop text file test.bat.txt
@echo off
echo "test"
pause
exit
002 I rename test.bat.txt to test.bat & I test by doubleclicking.
003 I create a shortcut to test.bat on the desktop
004 I change the icon of the test.bat shortcut from "gears" to "pages"
Shortcut to test.bat : Properties : Change Icon : OK :
Look for icons in this file: %SystemRoot%\System32\SHELL32.dll
I pick the very first icon which is a page icons, for this example
005 I now want to "pin to taskbar" that pages-icon shortcut

How?

Nothing here will work!
https://support.microsoft.com/en-us/...se-the-taskbar

00A Right clicking on the "Shortcut to test.bat" has no "Pin to taskbar"
00B Right or left click-&-hold the shortcut and sliding that shortcut
to the taskbar does nothing
00C If I doubleclick the shortcut so that the command is already open,
a command window icon shows up on the taskbar which I can right click
to "Pin to taskbar" but the resulting taskbar icon is the same icon
as every other batch file (which is a command window icon)
00D I can put it in the left side of the start menu by putting it here
C:\Users\name\AppData\Roaming\Microsoft\Windows\ Start Menu\Programs
Right clicking on that start menu item still has no "Pin to taskbar"
00E I can also right click on that left side start menu to "Pin to Start"
which will put it in the right side start menu but there still is no
option to "Pin to taskbar" when I right click on that start menu item

How do you get this batch file shortcut in the task bar with an icon you want?
(Please try the example before responding because intuitive answers fail!)
Ads
  #2  
Old September 9th 18, 04:44 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default How do you get this batch file shortcut in the task bar withan icon you want?

K120 wrote:
How do you get this batch file shortcut in the task bar with an icon you
want?
(Please try the example before responding because intuitive answers fail!)

Some batch files work to put the icon in the task bar.
But this batch file does not work.

Why?

Here is how to reproduce exactly my problem.
001 I create a new desktop text file test.bat.txt
@echo off
echo "test"
pause
exit
002 I rename test.bat.txt to test.bat & I test by doubleclicking.
003 I create a shortcut to test.bat on the desktop
004 I change the icon of the test.bat shortcut from "gears" to "pages"
Shortcut to test.bat : Properties : Change Icon : OK : Look for
icons in this file: %SystemRoot%\System32\SHELL32.dll
I pick the very first icon which is a page icons, for this example
005 I now want to "pin to taskbar" that pages-icon shortcut

How?

Nothing here will work!
https://support.microsoft.com/en-us/...se-the-taskbar


00A Right clicking on the "Shortcut to test.bat" has no "Pin to taskbar"
00B Right or left click-&-hold the shortcut and sliding that shortcut
to the taskbar does nothing
00C If I doubleclick the shortcut so that the command is already open,
a command window icon shows up on the taskbar which I can right click
to "Pin to taskbar" but the resulting taskbar icon is the same icon
as every other batch file (which is a command window icon)
00D I can put it in the left side of the start menu by putting it here
C:\Users\name\AppData\Roaming\Microsoft\Windows\ Start Menu\Programs
Right clicking on that start menu item still has no "Pin to taskbar"
00E I can also right click on that left side start menu to "Pin to Start"
which will put it in the right side start menu but there still is no
option to "Pin to taskbar" when I right click on that start menu item

How do you get this batch file shortcut in the task bar with an icon you
want?
(Please try the example before responding because intuitive answers fail!)


They have a workaround here. Since you can pin an app (.EXE), they
temporarily change the file extension to EXE long enough to pin it.

https://www.addictivetips.com/window...in-windows-10/

Paul
  #3  
Old September 9th 18, 11:52 AM posted to alt.comp.os.windows-10
John Doe[_8_]
external usenet poster
 
Posts: 2,378
Default How do you get this batch file shortcut in the task bar with an icon you want?

Paul wrote:

They have a workaround here. Since you can pin an app (.EXE), they
temporarily change the file extension to EXE long enough to pin
it.

https://www.addictivetips.com/window...o-the-taskbar-

in-windows-10/

Yep, that's how I put unconditional restart and shut down batch file
buttons on the taskbar. But now they are on the desktop. Besides
being easier, having them on the desktop might be better anyway.
Slam the pointer to the bottom right, click, and there they are.
  #4  
Old September 9th 18, 06:55 PM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sat, 08 Sep 2018 23:44:18 -0400, Paul said:

They have a workaround here. Since you can pin an app (.EXE), they
temporarily change the file extension to EXE long enough to pin it.

https://www.addictivetips.com/window...in-windows-10/

Paul


Either I did something wrong or that web page suggestion no longer works.
I'm on the latest Windows 10, "winver" version 1803 OS Build 17134.254

Can someone try this?
https://www.addictivetips.com/window...in-windows-10/

Here's what I did.
What did I do wrong in following exactly the instructions you provided?

001 Set Windows File Explorer "view" to show file name extensions
(it's already set)
002 On the desktop, create "test.bat"
@echo off
echo "test"
pause
exit
003 Doubleclick "C:\Users\user\Desktop\test.bat" to prove it works
004 On the desktop, change the file name of this new batch file
From: C:\Users\user\Desktop\test.bat
To: C:\Users\user\Desktop\test.exe
005 Doubleclick on this "test.exe" file to prove it no longer works
You get a blue warning "This app can't run on your PC"
006 Rightclick on test.exe & create a desktop shortcut
I'll use the words "shortcut to test.exe" to be clear it's a shortcut
but mine doesn't add the "shortcut to" prefix - but I'll use it here
C:\Users\user\Desktop\shortcut to test.exe
Actually this should really have a ".lnk" on the end but it's hidden
C:\Users\user\Desktop\shortcut to test.exe.lnk
007 Doubleclick on this "shortcut to test.exe" to prove it doesn't work
You get a blue warning "This app can't run on your PC"
008 Rightclick on "shortcut to test.exe" & change the icon to what you want
009 Rightclick on "shortcut to test.exe" to "Pin to taskbar"
This works perfectly to pin the shortcut icon to the taskbar
010 Doubleclick on the new tasbar icon to prove it doesn't work
You get a blue warning "This app can't run on your PC"
xxx The next steps are where the suggested web page fails me
xxx Did I do the next steps wrong?
011 On the desktop, change the original file name back
From: C:\Users\user\Desktop\test.exe
To: C:\Users\user\Desktop\test.bat
011 On the desktop, change the "Target" of the "shortcut to test.exe"
From: Target = C:\Users\user\Desktop\test.exe
To: Target = C:\Users\user\Desktop\test.bat
012 Run the three tests below
On the desktop, doubleclick "test.bat" (this works)
On the desktop, doubleclick "shortcut to test.exe" (this works)
Note the shortcut target is "C:\Users\user\Desktop\test.bat"
On the taskbar, click the newly placed icon (this fails)
Problem with Shortcut
The item "test.exe' that this shortcut refers to has been changed
or moved, so this shortcut will no longer work properly.
Do you want to delete this shortcut? Yes|No

Either I did something wrong or that web page suggestion no longer works.

Can someone try this to see if it works for you?
  #5  
Old September 9th 18, 07:00 PM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 10:52:16 -0000 (UTC), John Doe
said:

https://www.addictivetips.com/window...o-the-taskbar-

in-windows-10/

Yep, that's how I put unconditional restart and shut down batch file
buttons on the taskbar. But now they are on the desktop. Besides
being easier, having them on the desktop might be better anyway.
Slam the pointer to the bottom right, click, and there they are.


Are you sure you did it with a "batch" file?
A batch file ending in "*.bat"?

I tried and it failed on this simple desktop batch file.
== start test.bat ==
@echo off
echo "test"
pause
exit
== end test.bat ==

It worked to pin the shortcut icon to the task bar.
But the pinned shortcut was useless.

Either I did something wrong or that web page suggestion no longer works.
https://www.addictivetips.com/window...in-windows-10/

Can someone try this to see if it works for you?
  #6  
Old September 10th 18, 12:31 AM posted to alt.comp.os.windows-10
Gianni Turri
external usenet poster
 
Posts: 53
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 13:55:36 -0400, K120 wrote:

On Sat, 08 Sep 2018 23:44:18 -0400, Paul said:

They have a workaround here. Since you can pin an app (.EXE), they
temporarily change the file extension to EXE long enough to pin it.

https://www.addictivetips.com/window...in-windows-10/

Paul


Either I did something wrong or that web page suggestion no longer works.
I'm on the latest Windows 10, "winver" version 1803 OS Build 17134.254

Can someone try this?
https://www.addictivetips.com/window...in-windows-10/

Here's what I did.
What did I do wrong in following exactly the instructions you provided?

001 Set Windows File Explorer "view" to show file name extensions
(it's already set)
002 On the desktop, create "test.bat"
@echo off
echo "test"
pause
exit
003 Doubleclick "C:\Users\user\Desktop\test.bat" to prove it works
004 On the desktop, change the file name of this new batch file
From: C:\Users\user\Desktop\test.bat
To: C:\Users\user\Desktop\test.exe
005 Doubleclick on this "test.exe" file to prove it no longer works
You get a blue warning "This app can't run on your PC"
006 Rightclick on test.exe & create a desktop shortcut
I'll use the words "shortcut to test.exe" to be clear it's a shortcut
but mine doesn't add the "shortcut to" prefix - but I'll use it here
C:\Users\user\Desktop\shortcut to test.exe
Actually this should really have a ".lnk" on the end but it's hidden
C:\Users\user\Desktop\shortcut to test.exe.lnk
007 Doubleclick on this "shortcut to test.exe" to prove it doesn't work
You get a blue warning "This app can't run on your PC"
008 Rightclick on "shortcut to test.exe" & change the icon to what you want
009 Rightclick on "shortcut to test.exe" to "Pin to taskbar"
This works perfectly to pin the shortcut icon to the taskbar
010 Doubleclick on the new tasbar icon to prove it doesn't work
You get a blue warning "This app can't run on your PC"
xxx The next steps are where the suggested web page fails me
xxx Did I do the next steps wrong?
011 On the desktop, change the original file name back
From: C:\Users\user\Desktop\test.exe
To: C:\Users\user\Desktop\test.bat
011 On the desktop, change the "Target" of the "shortcut to test.exe"
From: Target = C:\Users\user\Desktop\test.exe
To: Target = C:\Users\user\Desktop\test.bat
012 Run the three tests below
On the desktop, doubleclick "test.bat" (this works)
On the desktop, doubleclick "shortcut to test.exe" (this works)
Note the shortcut target is "C:\Users\user\Desktop\test.bat"
On the taskbar, click the newly placed icon (this fails)
Problem with Shortcut
The item "test.exe' that this shortcut refers to has been changed
or moved, so this shortcut will no longer work properly.
Do you want to delete this shortcut? Yes|No

Either I did something wrong or that web page suggestion no longer works.

Can someone try this to see if it works for you?


You have missed this:

Next, right-click the file you pinned to the taskbar and select Properties from the context menu.
In the Properties window, go to the Shortcut tab.
Look for the target field and change the extension at the end from EXE to the file’s original extension.

--
Gianni
  #7  
Old September 10th 18, 01:49 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Mon, 10 Sep 2018 01:31:27 +0200, Gianni Turri
said:

You have missed this:

Next, right-click the file you pinned to the taskbar and select Properties from the context menu.
In the Properties window, go to the Shortcut tab.
Look for the target field and change the extension at the end from EXE to the file’s original extension.


Thanks for that advice - but it's confusing because I did EXACTLY what they
said to do.

Did this process actually work for anyone here?
I followed the instructions EXACTLY.

If I didn't - then I'm confused since only one thing has a Target, and I
changed that target (from exe back to bat).

It still didn't work.
I don't think it ever worked - unless someone tries it and proves it works
for them.

My explanation below is going to be confusing because I did *exactly* what
they said to do - where you said I didn't - so if I didn't - then I
misunderstood - where I admit I was confused about that sentence of the
"file pinned to the taskbar", since there was never ever a "file pinned to
the taskbar". That concept doesn't even exist.

There are only three things:
1. The original text file (originally *.bat, then *.exe, then *.bat)
2. The shortcut to that batch file (originally *.bat.lnk, then *.exe.lnk)
3. The icon that is on the task bar (which is not a file either)

So there is only one file, and it was never pinned to the taskbar.

1. Only one of those three things is a file
2. The other is a shortcut
3. The third is an icon inside the task bar

Since we pinned the shortcut to the taskbar, the concept of a file pinned
to the taskbar is meaningless. Did they mean "the shortcut pinned to the
taskbar?" Or did they mean the "icon that is in the taskbar?"

I don't know.
I assumed they meant the "shortcut which was pinned to the taskbar".
So that's what I changed the Target of.

(It's the only thing that has a target anyway.)

Nonetheless, the only "thing" left has to be the shortcut pinned to the
taskbar, which I did *exactly* what they said to do with "the file pinned
to the taskbar".

Are you saying that the shortcut that was pinned to the taskbar is not what
they mean by the "file pinned to the taskbar"?

I agree there is no file that was pinned to the taskbar, so that
instruction is ambiguous - but - there are only three "things", one of
which is a file, the other is a shortcut, and the other is an icon.

Hence, while the concept of a "file pinned to the taskbar" doesn't exist,
the only thing pinned to the task bar was the "shortcut".

And that's what I changed the Target of.

If that was the wrong "thing pinned to the taskbar", then I ask someone to
explain what they mean by "the file pinned to the taskbar" if it isn't that
shortcut (since there are only the three entities above in existence).

Did this process actually work for anyone here?
  #8  
Old September 10th 18, 02:01 AM posted to alt.comp.os.windows-10
Gianni Turri
external usenet poster
 
Posts: 53
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 20:49:44 -0400, K120 wrote:

On Mon, 10 Sep 2018 01:31:27 +0200, Gianni Turri
said:


You have missed this:

Next, right-click the file you pinned to the taskbar and select Properties from the context menu.
In the Properties window, go to the Shortcut tab.
Look for the target field and change the extension at the end from EXE to the file? original extension.


Thanks for that advice - but it's confusing because I did EXACTLY what they said to do.


I suspect it is not true.

Did this process actually work for anyone here?


Yes, I have tested it before answering you the first time, sorry I didn't mention it.

I followed the instructions EXACTLY.


If I didn't - then I'm confused since only one thing has a Target, and I changed that target (from exe back to bat).


It still didn't work.
I don't think it ever worked - unless someone tries it and proves it works for them.


My explanation below is going to be confusing because I did *exactly* what
they said to do - where you said I didn't - so if I didn't - then I
misunderstood - where I admit I was confused about that sentence of the
"file pinned to the taskbar", since there was never ever a "file pinned to
the taskbar". That concept doesn't even exist.


Is not the file that is pinned to the taskbar, is the shortcut, and the result is what you want.

There are only three things:
1. The original text file (originally *.bat, then *.exe, then *.bat)
2. The shortcut to that batch file (originally *.bat.lnk, then *.exe.lnk)
3. The icon that is on the task bar (which is not a file either)

So there is only one file, and it was never pinned to the taskbar.

1. Only one of those three things is a file
2. The other is a shortcut
3. The third is an icon inside the task bar

Since we pinned the shortcut to the taskbar, the concept of a file pinned
to the taskbar is meaningless. Did they mean "the shortcut pinned to the
taskbar?" Or did they mean the "icon that is in the taskbar?"

I don't know.
I assumed they meant the "shortcut which was pinned to the taskbar".
So that's what I changed the Target of.

(It's the only thing that has a target anyway.)

Nonetheless, the only "thing" left has to be the shortcut pinned to the
taskbar, which I did *exactly* what they said to do with "the file pinned
to the taskbar".

Are you saying that the shortcut that was pinned to the taskbar is not what
they mean by the "file pinned to the taskbar"?

I agree there is no file that was pinned to the taskbar, so that
instruction is ambiguous - but - there are only three "things", one of
which is a file, the other is a shortcut, and the other is an icon.

Hence, while the concept of a "file pinned to the taskbar" doesn't exist,
the only thing pinned to the task bar was the "shortcut".

And that's what I changed the Target of.

If that was the wrong "thing pinned to the taskbar", then I ask someone to
explain what they mean by "the file pinned to the taskbar" if it isn't that
shortcut (since there are only the three entities above in existence).

Did this process actually work for anyone here?

  #9  
Old September 10th 18, 02:07 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 20:49:44 -0400, K120 said:

So there is only one file, and it was never pinned to the taskbar.


I kept thinking of what you meant by the fact that I missed a step.
It had to be that what they said was a file wasn't a file after all.

Using the logic of throwing away what they said, since it made no sense,
and just looking at the three 'things', I figured out what the problem was
on my own.

The problem came about because the people who wrote the instructions never
clearly defined the three different entities clearly, only one of which was
a "file".

Nor did they describe the somewhat intricate "double-right-click" steps
involved in changing the target of the "thing" that I call the "icon" that
is on the taskbar.

Note that you have to double-right-click-then-immediately-left-click" to
see what you have to change. Never before, in Windows, since Win95 days,
have I ever had to right-click-right-click-left-click in sequence like
that!

So it wasn't explained well.
And it wasn't intuitive.

But now it works just fine!
So all is forgiven!

Here's the missing step, but first, there are only three "things".
1. The original text file. This is the only "file".
2. The shortcut to that original file. "This is a shortcut".
3. The icon in the task bar. I don't know what this is called.
For now, I'll call it the "icon that is in the taskbar".

Of those three things, two have "Targets", but one is hard to find.
2. The Target of the shortcut is easy to find.
3. The Target of the icon in the taskbar is not intuitive to find.

To find the Target field of the icon in the task bar, you need to follow
these steps exactly, which I summarize as
right-click-right-click-left-click:

001 Rightclick on the icon in the taskbar
002 You will only see two lines
test.exe
Unpin from taskbar

Up until now, I left it at that.
But there's more you can do.
You just have to know how to do it.

003 Whle you are right clicked, go ahead and Rightclick a second time, this
time on "test.exe"
004 Now you see three different lines
Open
Run as administrator
Properties

005 Left click on Properties
007 Change the Target of that icon on the taskbar
from: Target = C:\Users\user\Desktop\test.bat
to: Target = C:\Users\user\Desktop\test.bat

Now it finally works as advertised.

So the trick is that you have to rightclick, rightclick, leftclick, all on
the icon that is on the taskbar!

Thanks. I'll write this up in another post for posterity.
  #10  
Old September 10th 18, 02:13 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Mon, 10 Sep 2018 03:01:42 +0200, Gianni Turri
said:

Thanks for that advice - but it's confusing because I did EXACTLY what they said to do.


I suspect it is not true.


You were right.
We posted at the same time so I only see this now.

The problem is that you have to do something that you've possibly never
once done in your entire life, even if you've been on Windows since Windows
95 days!

You have to know the secret!
Right-click-right-click-left-click all in one smooth action!

Did this process actually work for anyone here?


Yes, I have tested it before answering you the first time, sorry I didn't mention it.


Thanks. I will write up the steps for others to do since the trick is that
you have to "double right click" and then instantly "left click" in order
to see a Target field in the thing that I will call the "icon in the
taskbar".


Is not the file that is pinned to the taskbar, is the shortcut, and the result is what you want.


Yup. I figured that out simply because there are only three "things"
1. the file
2. the shortcut
3. the icon in the taskbar

It wasn't intuitive that you right click and then right click and then left
click on the "icon in the taskbar", since I've never done that before in
Windows (and I've been on Windows since Windows 95 days).

I'll write it up so that everyone can follow more easily, where the main
mistake in the directions is that there is no such thing as a "file pinned
to the taskbar".

There is only one file, and it was never pinned to the task bar.
All is forgiven though (to the writers of the instructions as I figured it
out when you said I didn't follow directions EXACTLY.
  #11  
Old September 10th 18, 03:21 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sat, 8 Sep 2018 23:16:27 -0400, K120 said:

How do you get this batch file shortcut in the task bar with an icon you want?


Solved.
How to place an "icon in the taskbar" to a batch file, with a desired icon.
Thanks to Paul, Gianni Turri, and John Doe.

The actual steps are tricky, so let's agree on terminology first.
There are going to be three entities you will be dealing with.
1. The first entity is the text file that is your batch file ("test.bat").
2. The second entity is the shortcut to that text file ("test.bat.lnk").
3. The third entity is the icon that you will be placing in the taskbar.

During this sequence of steps, we'll be changing the names of the first two
entities, and we'll be changing the target in the third entity.

For consistency, we'll name each of those three entities the following:
1. The "file"
(either "test.bat or test.exe)
2. The "shortcut"
(either shortcut to test.bat.lnk or shortcut to test.exe.lnk")
3. The "icon in the taskbar"

With that terminology in mind, here are the steps:
001 Set Windows File Explorer "view" to show file name extensions
(it's already set that way for most of us, including me)
002 On the desktop, create a file named "test.bat"
=== begin test.bat ===
@echo off
echo "test"
pause
exit
=== end test.bat ===
003 Doubleclick "C:\Users\user\Desktop\test.bat" to prove it works
It should open a command window and say "test".
(You can kill the command window after this test.)
004 On the desktop, change the file name of this new batch file
- From: C:\Users\user\Desktop\test.bat
- To: C:\Users\user\Desktop\test.exe
(You will need to OK a warning prompt to allow the change.)
005 Doubleclick on this "test.exe" file to prove it no longer works
You get a blue warning "This app can't run on your PC"
(You can close that warning once you've seen it.)
006 Rightclick on test.exe & select "Create shortcut"
I'll use the words "shortcut to test.exe" to be clear it's a shortcut
but mine doesn't add the "shortcut to" prefix - but I'll use it here
- C:\Users\user\Desktop\shortcut to test.exe
Actually this should really have a ".lnk" on the end but it's hidden
- C:\Users\user\Desktop\shortcut to test.exe.lnk
007 Doubleclick on this "shortcut to test.exe" to prove it doesn't work
You get a blue warning "This app can't run on your PC"
(You can close that warning once you've seen it.)
008 Rightclick on "shortcut to test.exe" & select "Properties"
Then select "Change icon" & then "OK" & then "Choose an icon from".
Look for icons in this file = %SystemRoot%\System32\SHELL32.dll
Press OK.
(After you press OK, the icon of the shortcut should change.)
009 Rightclick on "shortcut to test.exe" & select "Pin to taskbar"
This will create the all-important "icon in the taskbar"
(Notice this "icon in the taskbar" displays with the desired icon!)
010 Doubleclick on the new "icon in the taskbar" to prove it doesn't work.
You get a blue warning "This app can't run on your PC"
(You can close that warning.)
011 On the desktop, change the original file name back to what it was
- From: C:\Users\user\Desktop\test.exe
- To: C:\Users\user\Desktop\test.bat
(You will need to OK a warning prompt to allow the change.)

This next step is unintuitive so be advised you'll be performing
a "double right click" action, and then a "left click" action
on the "icon in the taskbar".

012 Right click on the "icon in the taskbar".
You will only see two lines
- test.exe
- Unpin from taskbar
013 While you're still right clicked on the "icon in the task bar",
place your cursor on that first line item of "test.exe"
and right click again!
014 Now you see three different lines
- Open
- Run as administrator
- Properties
015 While you see those three items, left click on "Properties"
which will pop up a form called "test.exe Properties"
016 In that "test.exe Properties" form of the "icon in the taskbar",
in the "Shortcut" tab, change the Target of that "icon in the taskbar"
- From: Target = C:\Users\user\Desktop\test.exe
- To: Target = C:\Users\user\Desktop\test.bat
And press OK.

You're done!

017 If desired, you can now delete the shortcut on the desktop
- del C:\Users\user\Desktop\shortcut to test.exe
Actually, there is a hidden .lnk on the end, so it's really
- del C:\Users\user\Desktop\shortcut to test.exe.lnk
018 Test that both the remaining file and the "icon in the taskbar" work.
- Doubleclick the "file" C:\Users\user\Desktop\test.bat
- Click The "icon in the taskbar" named "test.exe"

Both should pop up the test command window.
  #12  
Old September 10th 18, 03:43 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 22:21:41 -0400, K120 said:

002 On the desktop, create a file named "test.bat"
=== begin test.bat ===
@echo off
echo "test"
pause
exit
=== end test.bat ===


The first practical use of this trick was on this thread from today
http://alt.comp.os.windows-10.narkiv...on-1809#post16

=== begin edgepvt.bat ===
@echo off
:: edgepvt.bat
%ComSpec% /c "start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8 bbwe!MicrosoftEdge -private"
exit
=== end edgepvt.bat ===
Where I chose to make the "icon in the taskbar" the Edge icon from here
C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wek yb3d8bbwe\MicrosoftEdge.exe

BTW, it would be nice if there is a cache of good icons in a single place!
  #13  
Old September 10th 18, 04:44 AM posted to alt.comp.os.windows-10
Jonathan N. Little[_2_]
external usenet poster
 
Posts: 1,133
Default How do you get this batch file shortcut in the task bar with anicon you want?

K120 wrote:

BTW, it would be nice if there is a cache of good icons in a single place!



imageres.dll, shell32.dll

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  #14  
Old September 10th 18, 05:12 AM posted to alt.comp.os.windows-10
K120
external usenet poster
 
Posts: 38
Default How do you get this batch file shortcut in the task bar with an icon you want?

On Sun, 9 Sep 2018 23:44:17 -0400, "Jonathan N. Little"
said:

BTW, it would be nice if there is a cache of good icons in a single place!



imageres.dll, shell32.dll


That imageres.dll is a beautiful stockpile of icons.

That makes these, so far, the best for icon sets.
C:\Windows\System32\SHELL32.dll
C:\Windows\system32\imageres.dll
C:\Windows\System32\mspaint.exe
C:\Windows\explorer.exe

(Use "control+a" & "control+v" to paste these paths into the icon search.)
  #15  
Old September 10th 18, 05:38 AM posted to alt.comp.os.windows-10
John Doe[_8_]
external usenet poster
 
Posts: 2,378
Default How do you get this batch file shortcut in the task bar with an icon you want?

K120 wrote:

John Doe said:
Paul wrote:


https://www.addictivetips.com/window...in-windows-10/


Yep, that's how I put unconditional restart and shut down batch
file buttons on the taskbar. But now they are on the desktop.
Besides being easier, having them on the desktop might be better
anyway. Slam the pointer to the bottom right, click, and there
they are.


Are you sure you did it with a "batch" file? A batch file ending
in "*.bat"?


I was doing batch files when you were in diapers.

Here is the target in Shortcut Properties...

"D:\software\system\shutdown windows\ShutdownWindows.bat"

Why did you remove Paul's attribute? Not a good sign for paying
attention to detail.
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 03:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.