创建 Windows 7 任务栏图标

发布于 2024-09-28 23:30:24 字数 329 浏览 1 评论 0原文

我的目标


我希望在第一次运行时,我的程序将使其图标出现在 Windows 7 任务栏中。我知道图标文件是 C:\Users\USERNAME\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar 中的快捷方式,并且最想知道这一点:

我的问题


  1. 如何,在 Java 中,我可以创建一个快捷方式文件 (.lnk)
  2. 是否可以在没有管理员权限的情况下访问该文件?

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 Questions


  1. How, in Java, can I create a shortcut file (.lnk)
  2. Is it possible to even access that without admin privileges?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

地狱即天堂 2024-10-05 23:30:24

您不需要管理员权限,但您确实需要在任务栏被更改的用户上下文中执行此操作。

这是一个可以满足您需求的库: http://alumnus.caltech.edu/~jimmc/jshortcut /

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/

听不够的曲调 2024-10-05 23:30:24

有一个 Java 库为 Java 提供了新的 Windows 7 功能。它被称为 J7Goodies,由 Strix 代码。使用它的应用程序可以正确固定到 Windows 7 任务栏。您还可以创建自己的跳转列表等。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文