开发者

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

All programs I have tried so far in Windows 7 have a 'Pin this program t开发者_运维百科o 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?


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


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.


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜