Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- Const CSIDL_APPDATA = &H1A
- Dim objShell
- Dim objFolder
- Dim objFolderItem
- Dim objVerb
- Dim objCurrentUserAppData
- Dim strCurrentUserAppData
- Set objShell = CreateObject("Shell.Application")
- Set objCurrentUserAppData = objShell.NameSpace(CSIDL_APPDATA)
- strCurrentUserAppData = objCurrentUserAppData.Self.Path
- '===================''==================='
- ' - Remove All Taskbar Pinned Items -
- '===================''==================='
- Set objFolder = objShell.Namespace(strCurrentUserAppData & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar")
- For Each objFolderItem in objFolder.Items
- For Each objVerb in objFolderItem.Verbs
- If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
- Next
- Next
- '===================''==================='
- ' - Remove All Start Menu Pinned Items -
- '===================''==================='
- Set objFolder = objShell.Namespace(strCurrentUserAppData & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu")
- For Each objFolderItem in objFolder.Items
- For Each objVerb in objFolderItem.Verbs
- If Replace(objVerb.name, "&", "") = "Unpin from Start Menu" Then objVerb.DoIt
- Next
- Next
Advertisement
Add Comment
Please, Sign In to add comment