howtogeek at May 12th, 2014 12:40 — #1
Originally published at: http://www.howtogeek.com/188920/how-to-put-short-notes-in-the-windows-taskbar/
There’s plenty of third-party programs and other widgets that may help you keep information close at hand. Here’s a neat trick to keep short notes or other small pieces of information accessible from the taskbar without any extra software.
gadgetman496 at May 13th, 2014 11:41 — #2
Is there anyway to get the batch file to put a particular icon on the shortcut created?
bytehead at May 14th, 2014 00:18 — #3
One little nit. In your code example, you end up using smart quotes, and those need to be changed to dumb ASCII quotes. Otherwise the command doesn't work.
bytehead at May 14th, 2014 00:27 — #4
You can assign an icon to the template.lnk file by right clicking it in Explorer, choosing Properties, and choosing Change Icon in the Shortcut (default) tab. Can it be changed programmatically? Possibly, but I don't see it via a batch file. If you have a limited number of icons that you want to chose, you can just make copies of the batchfile using different template files, and set your template files up with different icons.
SET /P X=Text for note:
COPY "E:\Users\Bryan\Documents\Notes\Template1.lnk" "E:\Users\Bryan\Documents\Notes\Notes\%X%.lnk"
SET /P X=Text for note:
COPY "E:\Users\Bryan\Documents\Notes\Template2.lnk" "E:\Users\Bryan\Documents\Notes\Notes\%X%.lnk"
And so on.
You could call one makephone.cmd to make a phone icon, makeemail.cmd to make an email icon, and so forth.
gadgetman496 at May 14th, 2014 03:43 — #5
Correct bytehead. That one nearly caught me too but I sorted it also.
gadgetman496 at May 14th, 2014 03:45 — #6
Of course bytehead, I never thought of changing the icon in the template file lol... Sorted
jacob_zinicola at May 14th, 2014 16:27 — #7
As @bytehead said, there's really not a way to arbitrarily choose icons via a Batch file. Though PowerShell has many more features and capabilities, I doubt it's easy (if at all possible) to do it there, either.
The easiest thing to do if you want an icon choice is to create multiple template files with icons you expect to use often, and make a separate batch file for each template. You could also use a CHOICE command in your batch file to enable selection of a template without having to have separate batch files for each. (You'd still need separate templates for each preferred icon though.)
bytehead at May 14th, 2014 20:54 — #8
Yeah, if you want to get into PowerShell or VBS (I really was only looking at CMD.EXE...), you can manipulate the icon. If you know what you are doing.
Editing shortcut (.lnk) properties with PowerShell
You can stuff the icon and icon number in.
$shell = New-Object -COM WScript.Shell
$shortcut = $shell.CreateShortcut('c:\Fully\Qualified\Location\of\linkfile.lnk')
would set the icon to that used in the example in Windows 7.
Playing around with this has shown me that:
$shortcut = $shell.CreateShortcut('.\tempfile.lnk')
Will actually create the link on the root of C: drive. E:.\tempfile.lnk will put it on the root of E:
I really think one would be better off with multiple template files.
gadgetman496 at May 15th, 2014 08:42 — #9
I took mine just one little step further. I use a Desktop Prog for texting via my mobile provider without having to go to their Website, it's called Cabbage. I included the path to that Prog in my Template file so when I open my Taskbar contact list, if I click on any of the numbers it opens the Cabbage Prog. Not perfect but at least I get a little more millage out of the shortcuts.
jacob_zinicola at May 15th, 2014 10:07 — #10
Have you looked into the documentation for the program? It might have a command-line option that allows you to shortcut creation of a new text (i.e.: pre-fill the phone number).
If so, you could use PowerShell per the instructions linked in @bytehead's post to custom-build those shortcuts. Alternatively, you could actually use a batch script to build other batch scripts (instead of shortcuts) that will do the same job. Or you could use a batch script to write those batch scripts, and put them into another folder, then make pretty shortcuts to the batch scripts in your taskbar folder.
bytehead at May 15th, 2014 10:38 — #11
What Jacob says. Command line options might make using Cabbage in this manner easier. Even if you have to manually manipulate the shortcuts after you create them, it's a one and done deal. Just make sure that you back them up once you've got them the way you want them.
system at May 22nd, 2014 12:40 — #12
This topic was automatically closed after 10 days. New replies are no longer allowed.