Taskbar icon for all users

帅比萌擦擦* 提交于 2020-01-01 12:30:08

问题


is it possible to create taskbar icons (shortcuts, shell links, whatever you want them to be named) in the installer in Windows 7? I know this is not possible with the quick launch toolbar in previous windows version, but maybe something has changed in windows 7?


回答1:


I'm assuming you want to pin an icon to the taskbar. No, that is not programmatically possible, and with good reason. It is your user's job to decide if your program is cool enough that they want it to be pinned to the taskbar.

If this is a corporate environment, note also that there is no group policy setting to affect a pinned item. If you Google around, there are some dirty hacks to get things pinned to the taskbar, but it involves overwriting all of the user's currently pinned items, which is a very bad idea. (I can see the helpdesk calls: "Where did my icons go??? I can't start the internet!")




回答2:


Yes, it is possible through a VBScript to pin for the current user

http://www.codeproject.com/Articles/185512/Programmatically-PIN-shortcut-onto-Taskbar-on-Win7.aspx

This script can also be created at runtime by this C# .NET Class:

http://blog.ananthonline.net/?p=37

If you are an OEM you can pin to all users during the DASH process with the following command

Reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TBDEn /v SBOEM0 /t REG_EXPAND_SZ /d “SomeFile.lnk” /f



回答3:


Windows 7 taskbar pinned icons are stored in the following locations:

File System: %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

Registry: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]

To deploy a pinned item, you can perform the following steps:

  1. Configure Pinned items on a Windows 7 system as a reference computer.
  2. Export Registry Key to pinned.reg file:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]

And copy items in the %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar to a shared folder.

  1. Create a logon script to deploy the registry keys and copy the corresponding files.

Please note that the %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned folder is only created after a user has pinned an icon to the taskbar. In the logon script, you will need to create the %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder if it does not exist.

PLEASE ALSO NOTE THIS REPLACES ALL ICONS CURRENTLY IN LOCATION!!! So, for me, this is suitable as it is only being used on our DR terminals where the users shouldn't be trying to personalise anything and are going to be moving from terminal to terminal on demand.

Finally: There is another way to do it using this VBS script, which allows you to add to the users current collection of pinned items:

http://blogs.technet.com/b/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx

I didn't like this method as it involves a logon script.




回答4:


There is no api available to pin an application to the taskbar because Microsoft doesn't want you to do that.

http://msdn.microsoft.com/en-us/library/dd378460(v=VS.85).aspx#unified



来源:https://stackoverflow.com/questions/5134556/taskbar-icon-for-all-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!