locked
Metro UI Shortcuts to Desktop Items Rules

    Question

  • So the shortcuts to desktop apps that show up in the metro ui go here:

    C:\ProgramData\Microsoft\Windows\Start Menu\Programs

    I've installed a few of our applications on Windows 8 and sometimes the shortcuts we create there show up in the metro ui and sometimes they don't.  What are the explicit rules here?  It appears that shortcuts to applications (.exe) will show up, but others (such as shortcuts to .bat files) do not.  Strangely, I've dragged a shortcut to notepad.exe and that doesn't appear there either.  Can anyone explain or point to a doc?  Haven't been able to locate one.  Thanks.

    Patrick

    Thursday, December 8, 2011 7:16 PM

Answers

  • Double posting with a solution:

    Add a "cmd.exe /c" prefix to the shortcut target.  For instance, a target of:

    "C:\Program Files\company\product\some.bat"

    becomes

    cmd.exe /c "C:\Program Files\company\product\some.bat"

    The shortcut will now show up in Metro (as it targets a .exe (cmd.exe)) instead of the .bat itself.

    • Marked as answer by Patrick Coyne Saturday, December 10, 2011 12:21 AM
    Saturday, December 10, 2011 12:21 AM

All replies

  • I've dragged a shortcut to notepad.exe and that doesn't appear there either.


    Notepad is already there.   E.g. just press Win- and start typing...  ; )

    However, to make it into a tile IIRC I dragged it from Search Results and then it stuck on my first page.   I don't think I paid any attention to whether I was copying or moving with my drag operation.   I'm not on W8 ATM to be able to check.

    One thing to be aware of though, whenever you add stuff it goes right to the very end of the list, so might get obscured by not visiting that area of your Start Screen very often.   Then you could just press End occasionally to do that and see what's new there.    ; )

     

    ---

    Thursday, December 8, 2011 9:48 PM
  • to make it into a tile 


    What a bad recollection.   Evidently I had to find it, right-click pin it, get back into the Start Screen, find it pinned, e.g. using End (that at least was accurate) then drag it.   So no concern about move versus copy there.   Maybe Notepad wasn't there at first after all?  

     

    ---

    Thursday, December 8, 2011 10:02 PM
  • Thanks for the replies, Robert.  I should have been more specific in that I'm looking for a programmatic solution to the problem that one of the products I work on creates several shortcuts at install time that are not showing up on the Metro UI.  I would like them to show up.

    I've done a few more tests:

    - installed notepad++: the exe shortcut showed up in Metro

    - downloaded procexp.exe, created a shortcut, dragged the shortcut to Start Menu\Programs: the shortcut showed up in Metro

    Since the product I'm referring to currently creates shortcuts to .bat files (which do not show up in Metro), the likely solution seems to be to write up a small exe that does the work of the bat files and create shorcuts to that instead.  That should get our shortcuts representation in Metro.

    Patrick

    Friday, December 9, 2011 6:43 PM
  • Double posting with a solution:

    Add a "cmd.exe /c" prefix to the shortcut target.  For instance, a target of:

    "C:\Program Files\company\product\some.bat"

    becomes

    cmd.exe /c "C:\Program Files\company\product\some.bat"

    The shortcut will now show up in Metro (as it targets a .exe (cmd.exe)) instead of the .bat itself.

    • Marked as answer by Patrick Coyne Saturday, December 10, 2011 12:21 AM
    Saturday, December 10, 2011 12:21 AM
  • shortcuts to .bat files (which do not show up in Metro)


    When I first read this I was on W7 but wondered if you had tried searching for them.   Now, I'm back on W8 and perhaps see what you mean.   E.g. you can search for them but can't pin them?   Bizarre.   Security/obscurity?   Even stranger then I can't pin .txt files.   What could be more innocuous than that?  And sometimes useful.

    FWIW the example that serendipitously occurred was searching for  vcvarsall.bat   I had been thinking that it might be necessary to give the full name, e.g. including extension, for the search to find it but it narrows in on it quite quickly.   The surprise was that I have the PSCX package of PowerShell cmdlets installed too and it just happens to refer to that .bat file in its ReleaseNotes.txt!   So search found that too and that's how I found out that you can't pin either .bat or .txt files.   ; ]

    I wonder if we need to make Desktop shortcuts for them to be pinned?  E.g.  .lnk  files.   Why?   Using what mechanism?   As a result of trying to right-click on the .txt file I opened it so there is a shortcut to it in Recent Items.   Search ignores that one and still just gives me the real file?   I wish it was clear to me what they were trying to implement; then I would know whether I had found a bug or not.   ; ]

    I have the idea that they want to make anything that was in the Start Menu or All Programs list accessible (and hopefully pinnable) for the STart Screen.   If so then that might limit us to pinning  .lnk  files, since that is (mostly) what is in those lists.   So let's test that idea.   I installed SQL Server 2012 RC0 and can find a load of  .lnk  files it must have installed using this (cmd window) command line:

    C:\>dir/a/b/s | findstr /i "sql.*lnk$"

    In fact, that shows that some which were installed into either C:\ProgramData or C:\Users\All Users\   Start Menu  have created tiles (at the back of the list).    But there are other  .lnk  files that I can find but can't do anything with.   WTH?   ; p

     

    Robert
    ---

    Saturday, December 10, 2011 2:47 AM