Solved

Automate Quick Launch Pinned Items at Logon

Posted on 2014-09-16
8
272 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 12

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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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 12

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 12

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

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.

Question has a verified solution.

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

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 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