Pin this program to taskbar option missing in my C# application

我们两清 提交于 2019-12-22 05:18:14

问题


All programs I have tried so far in Windows 7 have a 'Pin this program to taskbar' item when right-clicking them in the task bar. I have a C# program that only shows 'Close Window' and nothing else. It is build with C# 2010 Express, and targets .NET 3.5 framework.

I can't find any reason why no other options show up or any properties I could change. Does anyone know what property could affect this option?


回答1:


http://www.west-wind.com/weblog/posts/2009/Oct/08/Application-that-wont-Pin-to-Taskbar-in-Windows-7




回答2:


There could be one of a few reasons for this:

  • Executables located on remote locations (i.e. a server share) cannot be pinned; only local executables can be pinned
  • Certain strings in the shortcut or executable name cause that program to be excluded from pinning. These restricted values are determined by a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames and has these default values: Documentation;Help;Install;More Info;Readme;Read me;Read First;Setup;Support;What's New;Remove



回答3:


this also has something to do with the location of your EXE as well. my problem was that my EXE was being run from a network location. if i moved it to the local drive then all was right with the world.




回答4:


This can sometimes be caused by a "feature" in Windows 7, some filenames are reserved and dont get taskbar status in Windows7, try renaming your .exe file to something else also could you post the name of your .exe?

And if you dont want to rename the file if you browse using the registry to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames

You will see a delimited string with the reserved names.




回答5:


Check your registry for HKEY_CLASSES_ROOT\Applications\[exe name] . Remove that key and you should have the pinning options again (without logging out or restarting too!)

In my scenario, my installer file (created by InstallAware) has the same name as the program launcher exe. I am guessing that when I run the installer the installer exe name gets added to that registry location so you can't use the pinning options. I changed my installer file output name with InstallAware and that solved the issue. It is not enough to do a simple rename.




回答6:


For exe. files only With a problem like this the easy way is to; 1. Open properties of program 2. Open file location 3. Rename file (first copying name just in case) 4. Then right click on file and pin to taskbar should be there 5. If this doesn't work try another name

If this fails you can always rename the exe. to its original

This as always worked for me



来源:https://stackoverflow.com/questions/3871022/pin-this-program-to-taskbar-option-missing-in-my-c-sharp-application

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