Pin programs via script or un pin
Moderator: DosItHelp
Re: Pin programs via script or un pin
You may try one of these solutions (hopefully one off these works):Krump wrote:But how Pin windows explorer?
https://social.technet.microsoft.com/Forums/windows/en-US/04628368-38ec-4fa5-bce9-655dba741765/cant-pin-windows-explorer-to-taskbar
You may watch the process/registry/file system activity using (so you may simulate it using batch):
https://technet.microsoft.com/en-us/library/bb896645.aspx
This is a "little bit" fiddling, but you may use this program for many similar tasks.
penpen
Edit: Removed the wrong solution "pin Batch files..." as they you cannot pin them (without changing the registry).
Last edited by penpen on 13 Mar 2015 12:32, edited 1 time in total.
Re: Pin programs via script or un pin
After i've installed my (new) win 8.1, 32 bit, i reviewed this topic.
If you want to save/recover/deploy a default setting to multiple computers then this might help you:
https://4sysops.com/archives/configure-pinned-programs-on-the-windows-taskbar-with-group-policy/
penpen
If you want to save/recover/deploy a default setting to multiple computers then this might help you:
https://4sysops.com/archives/configure-pinned-programs-on-the-windows-taskbar-with-group-policy/
penpen
Re: Pin programs via script or un pin
penpen wrote:If that is not the reason, maybe localization causes this issue, i've changed the vbs to list all verb names (untested, may contain flaws):Code: Select all
'************************************************
' Pin and unpin shortcuts to Windows 7/8 Taskbar
' ~DosProbie - 07.15.13
' Pin.vbs
'************************************************
' ### NOTES
' *** Usage - Pin.vbs
' *** WScript.exe "%~dp0\%~dp0\Pin.vbs" [drive:][path]filename [Argument]
' *** [Arguments] = 0 1 2
' *** 0 = Unpin from Taskbar
' *** 1 = Pin to Taskbar
' *** 2 = Install
' *** <no> = List all Verbs
Set objShell = CreateObject("Shell.Application")
Set filesystem = CreateObject("scripting.Filesystemobject")
If filesystem.FileExists(Wscript.Arguments(0)) Then
Set objFolder = objShell.Namespace(filesystem.GetParentFolderName(Wscript.Arguments(0)))
Set objFolderItem = objFolder.ParseName(filesystem.GetFileName(WScript.Arguments(0)))
Set colVerbs = objFolderItem.Verbs
If WScript.Arguments.Length = 1 Then
For Each objVerb in colVerbs
WScript.Echo Replace(objVerb.name, "&", "")
Next
ElseIf WScript.Arguments.Length > 1 Then
Select case WScript.Arguments(1)
case 0
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
case 1
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next
case 2
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Install" Then objVerb.DoIt
Next
End Select
End If
End If
Just call it using cscript within a batch:In that case you may replace the 3 Strings "Unpin from Taskbar", "Pin to Taskbar", and "Install" with the localized version.Code: Select all
@echo off
%~d0
cd %~d0%~p0
:: List all Verbs available for your file
CScript.exe "%~dp0Pin.vbs" "%userprofile%\Desktop\Builder CPP.exe"
penpen
I don't know if the author of the thread is still needs this but on my machines verbs look like : "Unpin from Start Men&u" ; "Unpin from Tas&kbar" ; "Pin to Start Men&u" ; "Pin to Tas&kbar" and without the "&"'s the actions cannot be performed. I've a jscript tool that pins /unpins items in start menu and the taskbar and it works on Win8 and Win7.
EDIT : Oh. you are removing the "&"...
Re: Pin programs via script or un pin
Hi penpen,
Yours link very help me. i use PowerShell script, and now my "big bat script" works perfect
Yours link very help me. i use PowerShell script, and now my "big bat script" works perfect
