Szukaj na tym blogu

poniedziałek, 27 maja 2013

Unpin shortcuts from Taskbar

Place this script in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"


Script:

On Error Resume Next
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set strLNKFilePath =  objShell.NameSpace("C:\Options\GoogleChrome\32")
           
            strLnkFile = strLNKFilePath.Self.Path & "\Gmail.lnk"
           
            Set GmailItems = strLNKFilePath.Items()
           
            For Each Item in GmailItems
                        If (Item.Name = "Gmail") Then
                                   For Each Verb in Item.Verbs
                                               If (Verb.Name = "Unpin from Tas&kbar") Then       Verb.DoIt
                                   Next
                        End If

            Next

Brak komentarzy:

Prześlij komentarz