locked
Windows 10 - Programmatically use Quick Access RRS feed

  • Question

  • Apparently Microsoft has (sort of) replaced the "Favorites" Windows explorer item with the Quick Access item. But I haven't been able to find a way to programmatically add folders to it (neither on Google not MSDN). Is there no way to do this yet?
    Tuesday, May 5, 2015 12:09 PM

Answers

  • HI conectionist,

    >>But I haven't been able to find a way to programmatically add folders to it (neither on Google not MSDN). Is there no way to do this yet

    Indeed, there is no related document about how manipulate the Quick Access item in Win10, because the latest Win10 dev tool is a preview version, some APIs related to Win10 features are not public.

    If you have a platform capability or API suggestion, please continue to post them to the Windows platform developer UserVoice site. Please note that Microsoft will be updating this site to reflect the new capabilities of Windows 10.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 6, 2015 7:13 AM

All replies

  • HI conectionist,

    >>But I haven't been able to find a way to programmatically add folders to it (neither on Google not MSDN). Is there no way to do this yet

    Indeed, there is no related document about how manipulate the Quick Access item in Win10, because the latest Win10 dev tool is a preview version, some APIs related to Win10 features are not public.

    If you have a platform capability or API suggestion, please continue to post them to the Windows platform developer UserVoice site. Please note that Microsoft will be updating this site to reflect the new capabilities of Windows 10.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 6, 2015 7:13 AM
  • Since I ran into the same problem, i created an idea on that UserVoice Site.

    https://wpdev.uservoice.com/forums/253374-missing-platform-apis/suggestions/7874598-api-access-for-quick-access-area-in-file-explorer

    Feel free to vote up :)

    Friday, May 8, 2015 11:01 AM
  • HI conectionist,

    >>But I haven't been able to find a way to programmatically add folders to it (neither on Google not MSDN). Is there no way to do this yet

    Indeed, there is no related document about how manipulate the Quick Access item in Win10, because the latest Win10 dev tool is a preview version, some APIs related to Win10 features are not public.

    If you have a platform capability or API suggestion, please continue to post them to the Windows platform developer UserVoice site. Please note that Microsoft will be updating this site to reflect the new capabilities of Windows 10.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Is this API public yet? It really should be added to GPO / GPP.
    Friday, April 22, 2016 10:52 PM
  • Don't know if this thread is dead but I'd also be interested in the public API if it existed!
    Wednesday, June 22, 2016 12:45 PM
  • Yes, me too! Franklin Chen, any news on it?
    Wednesday, October 5, 2016 9:30 AM
  • I also suffered from this feature change for a recent Remote Desktop migration. As a work around, I developed the following script to convert .lnk files in %userprofile%\Links dir and remap them into quick access.

    Please note that if any links reference a mapped drive you will need to reformat this to a UNC share.

    In my instance I ran a robocopy to migrate existing Links data followed by the script below. If running from a batch file it can be a hassle so copy the ps1 to the local powershell modules dir and run the following command.

    powershell -executionpolicy bypass -file "C:\Program Files (x86)\WindowsPowerShell\Modules\ConvertFavoritestoQuckAccess.ps1"
    # Created by Chris Taylor #
    
    $sh = New-Object -COM WScript.Shell
    $o = New-Object -COM shell.application
    
    #Define user profile Links directory
    $filedirectory = "$env:USERPROFILE\Links\*.lnk"
    
    ForEach ($file in Get-ChildItem $filedirectory) {
        #Extract link path from link file
        $targetPath = $sh.CreateShortcut($file).TargetPath
        #If links contain paths to mapped drives, replace drive letter to UNC path. S used as example.
        If ($targetPath -like 'S:\*') {
        $newPath = $targetPath.Replace("S:\", "\\Your UNC Path")
        }
        #Pin file path to Quick Access
        $o.Namespace($newPath).Self.InvokeVerb(“pintohome”)
    }

    Hopefully this helps someone until Microsoft provide a better solution.

    Monday, June 12, 2017 6:00 AM
  • Rivercity Chris, where did you find the documentation about that verb "pintohome"? I'd like to be able to "unpin" also.

    This is a great solution. Thanks!


    • Edited by kenneth.lefebvre Thursday, June 29, 2017 2:03 PM I didn't realize the reply wasn't threaded!
    Thursday, June 29, 2017 2:03 PM
  • Hi Kenneth,

    I believe you can just use "unpinfromhome".

    https://stackoverflow.com/questions/30051634/is-it-possible-programmatically-add-folders-to-the-windows-10-quick-access-panel

    Monday, August 21, 2017 3:39 AM
  • I have worked out a shell32 solution.

    You need to include "Microsoft Shell Controls and Automation" reference

        //add
        Type shellAppType = Type.GetTypeFromProgID("Shell.Application");
        Object shell = Activator.CreateInstance(shellAppType);
        Shell32.Folder2 f = (Shell32.Folder2)shellAppType.InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { "C:\\temp" });
        f.Self.InvokeVerb("pintohome");
    
        //remove
        Type shellAppType = Type.GetTypeFromProgID("Shell.Application");
        Object shell = Activator.CreateInstance(shellAppType);
        Shell32.Folder2 f2 = (Shell32.Folder2)shellAppType.InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { "shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}" });
        Console.WriteLine("item count: " + f2.Items().Count);
        foreach (FolderItem fi in f2.Items())
        {
            Console.WriteLine(fi.Name);
            if (fi.Name == "temp")
            {
                ((FolderItem)fi).InvokeVerb("unpinfromhome");
            }
        }

    • Proposed as answer by tajbender Sunday, October 13, 2019 6:23 PM
    Wednesday, April 25, 2018 11:01 PM
  • How do i add that reference ?
    Thursday, August 16, 2018 6:33 AM
  • This is a bit late, but...

    in visual studio it is a com reference, just type in "shell" into the search and you should find it.

    Thursday, May 2, 2019 11:13 PM