“Wrong” app gets pinned to taskbar (Windows 7) RRS feed

  • Question

  • I have an application that gets started via a shortcut. This application than starts a Java GUI application (javaw.exe) with CreateProcess().

    When the Java application gets pinned to the taskbar the javaw.exe gets pinned to the taskbar instead of the "expected" shortcut. Only the native executable which launches Java can be modified - the shortcut has to stay.

    What has to be done so that the shortcut gets pinned?


    Tuesday, August 11, 2009 10:45 AM

All replies

  • Hi DWIW, As for the taskbar pinned item behavior you mentioned, I think it is likely due to how the windows system will generate the shortcut(path) from the application(you want to pin on taskbar). I think it will inspect the certain application's process and get the image(exe file)'s path and add that as the shortcut link. For your case, since the shortcut triggers your program which use createProcess to start a java program, the final applicaiton that be pinned on taskbar is the application associated with the java process. Since the image path of the java program is (javaw.exe), the taskbar use it as the link address. I suggest you use processexplorer to verify the image path of your java program. If you want to customize that pinned taskbar entry, you can navigate to the following folder which stores those pinned taskbar items on your windows 7 system. c:\USERS\[USERNAME]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Ronnie VernonMVP Thursday, August 13, 2009 7:47 AM
    • Unmarked as answer by DWIW Button Friday, August 14, 2009 8:39 AM
    Thursday, August 13, 2009 7:36 AM
  • He Steven,
    Thanks a lot for your response!
    I did a few experiments with my application which starts the java application. I do no longer create the STARTUPINFO but I use GetStartupInfo() to fill this structure which is then passed to CreateProcess().
    With this it happens now:
    - when you start the app with the shortcut, the app gets pinned correctly (with all the parameters from the shourtcut)
    - when the app is started directly (no shortcut) than pinning pins the javaw.exe to the taskbar

    Any idea?

    Thursday, August 13, 2009 2:20 PM