Creating a Windows 7 Taskbar Icon
My Goal
I want to make it so that, on first run, my program will make its icon appear in the Windows 7 Taskbar. I know that the icon files are shortcuts in C:\Users\USERNAME\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
and mostly want to know this:
My Qu开发者_如何学编程estions
- How, in Java, can I create a shortcut file (
.lnk
) Is it possible to even access that without admin privileges?
You should not need admin privileges but you do need to do this in context of the user whose taskbar is being changed.
Here's a library which does what you want: http://alumnus.caltech.edu/~jimmc/jshortcut/
There is a Java library providing the new Windows 7 features for Java. It's called J7Goodies by Strix Code. Applications using it can be properly pinned to the Windows 7 taskbar. You can also create your own jump lists, etc.
精彩评论