howtogeek — 2014-05-12T12:40:02-04:00 — #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 — 2014-05-13T11:41:43-04:00 — #2
Is there anyway to get the batch file to put a particular icon on the shortcut created?
bytehead — 2014-05-14T00:18:19-04:00 — #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 — 2014-05-14T00:27:41-04:00 — #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 — 2014-05-14T03:43:53-04:00 — #5
Correct bytehead. That one nearly caught me too but I sorted it also.
gadgetman496 — 2014-05-14T03:45:45-04:00 — #6
Of course bytehead, I never thought of changing the icon in the template file lol... Sorted
jacob_zinicola — 2014-05-14T16:27:33-04:00 — #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 — 2014-05-14T20:54:24-04:00 — #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 — 2014-05-15T08:42:27-04:00 — #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 — 2014-05-15T10:07:14-04:00 — #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 — 2014-05-15T10:38:29-04:00 — #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 — 2014-05-22T12:40:01-04:00 — #12
This topic was automatically closed after 10 days. New replies are no longer allowed.