I recently needed to delete all the pinned taskbar shortcuts on multiple Windows 8 computers on a domain. I couldn’t use a batch file since editing the registry via batch was disabled via GPO. The only option I really had was to write a basic VBS script to do this for me.

For reference, the folder that stores the actual .lnk shortcuts is:

%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\

and the registry key is:


Below is the VBS file that deletes the shortcut files. You will not notice an effect until you either log off/log on again or restart explorer.exe. A VBS to do that can be found on the TechNet site here: https://gallery.technet.microsoft.com/scriptcenter/Refresh-Windows-Explorer-0a7f8ea1

On Error Resume Next  
Const HKEY_CURRENT_USER = &H80000001  
' Remove shortcuts ready for recreation

' Create objects for file system  
Set oShell = CreateObject( "WScript.Shell" )  
' Variables  
appdata = oShell.ExpandEnvironmentStrings("%APPDATA%")  
Dim fso  
Set fso = CreateObject("Scripting.FileSystemObject")  
fso.DeleteFile(appdata & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk")  
' Delete Registry Keys (http://technet.microsoft.com/en-us/magazine/2006.08.scriptingguy.aspx)  
strComputer = "."  
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" 

Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 

DeleteSubkeys HKEY_CURRENT_USER, strKeypath 

Sub DeleteSubkeys(HKEY_CURRENT_USER, strKeyPath)  
    objRegistry.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubkeys 

    If IsArray(arrSubkeys) Then 
        For Each strSubkey In arrSubkeys 
            DeleteSubkeys HKEY_CURRENT_USER, strKeyPath & "\" & strSubkey 
    End If 
    objRegistry.DeleteKey HKEY_CURRENT_USER, strKeyPath 
End Sub