diff --git a/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.cmd b/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.cmd new file mode 100644 index 0000000..f00a921 --- /dev/null +++ b/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.cmd @@ -0,0 +1,2 @@ +@echo off +cscript "removepins.vbs" \ No newline at end of file diff --git a/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.vbs b/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.vbs new file mode 100644 index 0000000..a2efad7 --- /dev/null +++ b/mods/[all-based]/userSetup - remove IE and WMP pins/data/opus-nt/userSetup/removepins.vbs @@ -0,0 +1,41 @@ +Option Explicit + +Const CSIDL_COMMON_PROGRAMS = &H17 +Const CSIDL_PROGRAMS = &H2 +Const CSIDL_STARTMENU = &HB + +Dim objShell, objFSO +Dim objCurrentUserStartFolder +Dim strCurrentUserStartFolderPath +Dim objAllUsersProgramsFolder +Dim strAllUsersProgramsPath +Dim objFolder +Dim objFolderItem +Dim colVerbs +Dim objVerb + +Set objShell = CreateObject("Shell.Application") +Set objFSO = CreateObject("Scripting.FileSystemObject") +Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU) +strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path +Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS) +strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path + +'Internet Explorer +If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Internet Explorer.lnk") Then + Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs") + Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk") + Set colVerbs = objFolderItem.Verbs + For Each objVerb in colVerbs + If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt + Next +End If +'Windows Media Player +If objFSO.FileExists(strAllUsersProgramsPath & "\Windows Media Player.lnk") Then + Set objFolder = objShell.Namespace(strAllUsersProgramsPath) + Set objFolderItem = objFolder.ParseName("Windows Media Player.lnk") + Set colVerbs = objFolderItem.Verbs + For Each objVerb in colVerbs + If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt + Next +End If \ No newline at end of file