By default changes to the Quick Access links are not persistent.


To make Quick Access links persistent, you have to follow these steps:


  1. Create a PowerTag on the app/server/cluster where you want the Quick Access links to be persistent:
    !GRACEFULDISCOSEC=5
    This is the precondition to run the StartupGracefulDisco.ps1 script (see: Graceful application closing)

  2. Create a PowerShell script with the name StartupBefore.ps1in %PROGRAMDATA%\Cameyo with the following content:
    $QuickAccess = New-Object -ComObject shell.application
    if ($env:CAMEYO_QUICKACCESSPERSISTENCE -eq "0") {
        $quicklinks = Get-Content $env:USERPROFILE\QuickAccess.json | ConvertFrom-Json
        $existing = $QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | Select Name
        foreach ($link in $quicklinks | Where IsFolder -eq $true) {
            if ($existing.Name -notcontains $link.Name ) {
                $QuickAccess.Namespace($link.Path).Self.InvokeVerb("pintohome")
            }
        }
    }

    This will restore the saved Quick Access icons upon session start


  3. Create a PowerShell script with the name StartupGracefulDisco.ps1 in %PROGRAMDATA%\Cameyo with the following content:
    $QuickAccess = New-Object -ComObject shell.application
    $QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | Select Name, Path, IsFolder, IsFileSystem| ConvertTo-Json | Out-File $env:USERPROFILE\QuickAccess.json

    This will save all Quick Access links upon session disconnection