Solved

Automate Quick Launch Pinned Items at Logon

Posted on 2014-09-16
8
264 Views
Last Modified: 2014-10-01
We have a group that wants certain pinned items (shortcut to apps) in their taskbar when they login to their Windows 7 Machine.  Is there a good way of doing this utilizing a script on Windows 7?  They want Microsoft Word, Excel, and other 3rd party apps pinned automatically without user intervention.
0
Comment
Question by:mystikal1000
8 Comments
 
LVL 50

Expert Comment

by:jcimarron
ID: 40326766
mystikal1000 --
I do not do script, but if you right click just about any .exe file you will be offered "Pin to Taskbar " and "Pin to Start Menu"

The location of those two items is
"C:\Users\EQUUS\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu"

"C:\Users\EQUUS\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
0
 
LVL 4

Expert Comment

by:Dash Amr
ID: 40326822
Windows 7 task-bar pinned icons are stored in the following locations:
 
File System:
%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

Registry:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
 
To deploy it, you can perform the following steps:
1.    Configure Pinned items on a Windows 7 system as a reference computer.

2.    Export Reigstry Key to pinned.reg file:
 
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
 
And copy items in the "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" to a shared folder.
 
3.    Create a logon script to deploy the registry keys and copy the corresponding files.

 Please note that the “%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned” folder is only created after a user has pinned an icon to the taskbar. In the logon script, you will need to create the “%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar” folder if it does not exist.

I hope this Helps :)
Reference:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/d172b4de-be7c-4149-8958-bebfe042ade1/forum-faq-how-to-deploy-windows-7-taskbar-pinned-icons-by-group-policy?forum=winserverGP
0
 
LVL 11

Accepted Solution

by:
zalazar earned 500 total points
ID: 40326832
The following visual basic script will pin Word 2010 and Excel 2010 to the taskbar.
You can easily modify the path for e.g. Word or Excel 2013 or add extra 3rd party apps.
'*********************************************************************
'* Pin Shortcuts
'*********************************************************************
Const PinTask = "Pin to Taskbar"
Const PinStart = "Pin to Start Menu"
Const UnpTask = "Unpin from Taskbar"
Const UnpStart = "Unpin from Start Menu"

Dim fso, objShell, strShortcut

Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")

' Pin Word 2010 to taskbar
strShortcut = "C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE"
call PinItem(strShortcut, PinTask)

' Pin Excel 2010 to taskbar
strShortcut = "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE"
call PinItem(strShortcut, PinTask)


Set objShell = Nothing
Set fso = Nothing

Wscript.quit 0
'---------------------------------------------------------------------
' --------  SUBS  --------
'---------------------------------------------------------------------
Sub PinItem(sShortcut, sPinType)
  Dim sFolderPath, sFileName
  Dim objFolder, objFolderItem, colVerbs, objVerb

  If fso.FileExists(sShortcut) = False Then
    Exit Sub
  End If

  sFolderPath = fso.GetParentFolderName(sShortcut)
  sFileName = fso.GetFileName(sShortcut)

  Set objFolder = objShell.Namespace(sFolderPath)
  Set objFolderItem = objFolder.ParseName(sFileName)
  Set colVerbs = objFolderItem.Verbs
  For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = sPinType Then objVerb.DoIt
  Next

  Set colVerbs = Nothing
  Set objFolderItem = Nothing
  Set objFolder = Nothing
End Sub

Open in new window

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 65

Expert Comment

by:RobSampson
ID: 40329295
Hi, check out the article here as well:

Pin and Unpin Start Menu and Taskbar Items in Windows 7
http://blog.experts-exchange.com/ee-blog/pin-unpin-start-menu-taskbar-items-windows-7/

It's a pretty flexible method that should work for you.

Regards,

Rob.
0
 
LVL 11

Expert Comment

by:zalazar
ID: 40346862
Hello mystikal1000, good that you have a solution.
Was my script not suitable for the task you requested ?
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 40350684
Zalazar - whoops I wanted to give you the points, that's my mistake.
0
 
LVL 11

Expert Comment

by:zalazar
ID: 40351110
Hello mystikal1000, thanks for your response and good to know that the script is suitable.
Thanks also for creating the "Request For Attention".
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question