Where is the Windows 8.1 Pinned TaskBar info stored?

I am referring to the bottom icons we can set and also click on to either start a new instance of that program or bring its open window into the main view.

enter image description here

I assume somewhere in the registry there maybe some entries which link to a image icon and the location the program it represents is stored at.

I want to know this so I can preset these easy on another machine rather than manually setting them.


Solution 1:

The information about pinned items on the Start screen and the Taskbar are stored in the following keys:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{...}\Count

and

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TaskBand

Unfortunately, all the key values are encrypted binary blobs so you can't edit them directly. Furthermore, there is no group policy that controls it. Microsoft did this deliberately to discourage app vendors from pinning their crapware in your face. I find this excuse laughable, since it doesn't stop shady programmers from behaving badly at all, but does make it a pain for you to carry out a legitimate administrative function.

Modifying the task bar programmatically requires you to write a script that simulates a right-click of the item on the Start Menu and hitting "Pin/Unpin from Taskbar" like so:

Dim objShellApp
Dim objWMI
Dim objVerb
Dim objScreen
Dim objProcess
Dim colVerbs
Dim colScreens
Dim colProcesses

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set objShellApp = CreateObject("Shell.Application")
Set objWMI = GetObject("winmgmts:\\.\root\CIMV2")

'Remove Windows Media Player from Taskbar
If objFS.FileExists(objShell.SpecialFolders("AllUsersPrograms") & "\Windows Media Player.lnk") Then
    Set colVerbs = objShellApp.Namespace(objShell.SpecialFolders("AllUsersPrograms")).ParseName("Windows Media Player.lnk").Verbs
    For Each objVerb in colVerbs
        If objVerb.Name = "Unpin from Tas&kbar" Then
            objVerb.DoIt
            Exit For
        End If
    Next
End If

'Add Microsoft Outlook to Taskbar
If objFS.FileExists(objShell.SpecialFolders("AllUsersPrograms") & "\Microsoft Office\Microsoft Outlook 2010.lnk") Then
    Set colVerbs = objShellApp.Namespace(objShell.SpecialFolders("AllUsersPrograms") & "\Microsoft Office").ParseName("Microsoft Outlook 2010.lnk").Verbs
    For Each objVerb in colVerbs
        If objVerb.Name = "Pin to Tas&kbar" Then
            objVerb.DoIt
            Exit For
        End If
    Next
End If

Modify the script for whatever items you want pinned/unpinned. You'll need this script to run in the context of each user's logon. You can't do it in bulk. Therefore, you'll have to dump this script into the RunOnce registry key in each user's registry hive.

Or, you could add a line at the end of the script file to have it commit suicide when it's done and place it in the Startup folder of every user (including the default user so it applies when new users sign in).

objFS.DeleteFile WScript.ScriptFullName

Either way, you do not want to put it in the All Users profile. You need to ensure that it runs only once for each person in their own user context and never run it again (lest it destroy their customizations).