[[windows_wiki:vbscript_-_unpin_icons_to_start_menu]]

VBScript - Unpin Icons from Start Menu

General Information

How to un-pin icons from the start menu.

Checklist

  • OS: Windows XP/7

file startmenu_unpin.vbs
'' Name: Win7UnPinPrograms.vbs
'' Description: UnPins Programs from the Taskbar OR Start Menu
'' Modified: 12/21/2011
 
On Error Resume Next
 
Const CSIDL_COMMON_PROGRAMS = &H17 
Const CSIDL_PROGRAMS = &H2 
 
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objShell = CreateObject("Shell.Application") 
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS) 
Set objUsersProgramsFolder = objShell.NameSpace(CSIDL_PROGRAMS)
 
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
strUsersProgramsPath = objUsersProgramsFolder.Self.Path
 
' For Office 2010 Applications
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office") 
 
Set objFolderItem = objFolder.ParseName("Microsoft Outlook 2010.lnk") 
Set colVerbs = objFolderItem.Verbs 
For Each objVerb in colVerbs 
    If Replace(objVerb.name, "&", "") = "Unpin from Start Menu" Then objVerb.DoIt 
    ''If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt 
Next
  • windows_wiki/vbscript_-_unpin_icons_to_start_menu.txt
  • Last modified: 2019/05/26 03:50
  • (external edit)