Announcement

Collapse
No announcement yet.

Windows 10 and Shell.CreateShortcut

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows 10 and Shell.CreateShortcut

    Consider the following code example:

    ShortcutFolder = SessionVar.Expand("%StartProgramsFolderCommon%") .. "\\" .. SessionVar.Expand("%AppShortcutFolderName%");

    Shell.CreateShortcut(ShortcutFolder, "My App", AppFolder.."\\myapp.exe", "", AppFolder, "", 0, SW_SHOWNORMAL, nil, "");
    Shell.CreateShortcut(ShortcutFolder, "Uninstall My App", AppFolder.."\\myappuninstaller.exe", "/BTUNINST", AppFolder, "", 1, SW_SHOWNORMAL, nil, "");

    DocShortcutFolder = ShortcutFolder.."\\Documentation";
    Shell.CreateShortcut(DocShortcutFolder, "Doc1", AppFolder.."\\doc1.chm", "", AppFolder, "", 0, SW_SHOWNORMAL, nil, "");
    Shell.CreateShortcut(DocShortcutFolder, "Doc2", AppFolder.."\\doc2.chm", "", AppFolder, "", 0, SW_SHOWNORMAL, nil, "");
    Shell.CreateShortcut(DocShortcutFolder, "Doc3", AppFolder.."\\doc3.chm", "", AppFolder, "", 0, SW_SHOWNORMAL, nil, "");

    On windows 7, this creates a Start Menu folder of:

    My Product
    |- My App
    |- Uninstall My App
    | Documentation
    | - Doc 1
    | - Doc 2
    | - Doc 3

    When installed on Windows 10, you get:

    My Product
    |- My App
    | - Doc 1
    | - Doc 2
    | - Doc 3

    Questions:

    1.) Can I create sub-folders for the Windows 10 Start Menu like I did for Windows 7?
    2.) Why does Windows 10 auto-hide my uninstall from the Start Menu? Does it scan for "Uninstall" in the string and auto-hide those from the Start Menu? Can I force it to appear?

    Thanks!

  • #2
    1.) Can I create sub-folders for the Windows 10 Start Menu like I did for Windows 7?
    2.) Why does Windows 10 auto-hide my uninstall from the Start Menu? Does it scan for "Uninstall" in the string and auto-hide those from the Start Menu? Can I force it to appear?
    Windows software deployment guidelines prohibit the creation of shortcuts for uninstallers in the Start Menu / All Apps page. The proper location for the uninstaller is in the Control Panel applet - Programs and Features.

    This was explained on the Microsoft Windows Guidelines pages, at this address, but as current operating environments don't have a Start menu any longer, the docs referring to this item were deleted. You can still find the page in the Internet Archive, here:


    As you can see, the links to the documentation in CHM format are also in discordance with the guidelines, and shouldn't be created on the Start menu. And no, you shouldn't attempt to force an incorrect item to appear on the Start menu.

    Ulrich
    Last edited by Ulrich; 05-11-2016, 06:24 AM. Reason: Removed attachment, made image public

    Comment


    • #3
      What about the issue where subfolders are no longer created on Windows 10?

      Comment


      • #4
        Sub folders which were shown on the Start menu in Windows 7 already didn't show on the Start screen in Windows 8 / 8.1, instead everything is shown under the same parent on the All Apps screen. I don't think that sub folders will return once Windows 10 is officially released.

        Ulrich

        Comment

        Working...
        X