Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need script that WORKS to pin apps to the start menu and task bar for Windows 7

Posted on 2011-09-22
11
Medium Priority
?
1,191 Views
Last Modified: 2012-05-12
I've been looking over code, scripts, and web pages that claim to pin things to the start menu and taskbar.  I need something that will work.  I'm not a coder.  I keep getting error messages and I don't have the luxury of figuring out why one part of a script fails while another doesn't.

I have Windows 7 Profesional 32 bit.  I'm trying to pin Outlook 2007, Excel 2007, Word 2007, and and a program called Zscope. (the shortcut for Zscope is listed in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\zScope\Express 3270 v6.2\zScope Express 3270 v6.2.lnk)

Can someone PLEASE help me with this?

0
Comment
Question by:cknoderer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 66

Expert Comment

by:johnb6767
ID: 36581352
Coming from MS, I would think this one WOULD work....

Pin Items to the Start Menu or Windows 7 Taskbar via Script
http://blogs.technet.com/b/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx

Haven't tested personally.....

FYI, nice write up on the details on the Taskbar pinning here.... (for a mandatory profile, but the basics in the FileSystem/Registry are the same....) Could help you maybe configure them via GPP?

http://www.bdts.com.au/tips/50-windows-7/143-pinned-taskbar-icons-for-network-users.html
0
 
LVL 1

Author Comment

by:cknoderer
ID: 36581948
As I had written, I am not a coder. I really am not in a position to sit down and figure this out due to the busy work schedule I have. I was hoping someone could help explain this better or be able to provide a template code that I could EASILY modify to pin the specific programs I have listed.  
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36582076
I should have clarified... In the .zip file there are sample scripts already there. Inside PinItem.VBS, at the top, there is usage instructions.....

'* Usage:  cscript PinItem.vbs /item:<path to exe>
'*                 [/taskbar] [/?]
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 65

Expert Comment

by:RobSampson
ID: 36584015
Hi, see if this works for you.

Regards,

Rob.
arrFileNames = Array( _
	"C:\Program Files\Microsoft Office\Office14\winword.exe", _
	"C:\Program Files\Microsoft Office\Office14\winword.exe", _	
	"C:\Program Files\Microsoft Office\Office14\winword.exe", _
	"C:\Program Files\Microsoft Office\Office14\winword.exe" _
	"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\zScope\Express 3270 v6.2\zScope Express 3270 v6.2.lnk" _
	)
	
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShellApp = CreateObject("Shell.Application")
Set objShell = CreateObject("WScript.Shell")
For Each strFilePath In arrFileNames
	Set objFile = objFSO.GetFile(strFilePath)
	Set objFolder = objShellApp.Namespace(objFile.Parent)
	Set objFolderItem = objFolder.ParseName(objFile.Name)
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb In colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
	Next
Next

Open in new window

0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36989384
The code I provided has worked in another EE question, so it should work fine here.  Comment ID 36584015

Rob.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36989751
Works for me....
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 37022851
Here's a slight modification, allowing for Start Menu and Taskbar pinning.

Rob.
arrFileNames = Array( _
	"C:\Program Files\Microsoft Office\Office14\winword.exe", _
	"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\zScope\Express 3270 v6.2\zScope Express 3270 v6.2.lnk" _
	)
	
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShellApp = CreateObject("Shell.Application")
Set objShell = CreateObject("WScript.Shell")
For Each strFilePath In arrFileNames
	If objFSO.FileExists(strFilePath) = True Then
		Set objFile = objFSO.GetFile(strFilePath)
		Set objFolder = objShellApp.Namespace(objFile.ParentFolder & "\")
		Set objFolderItem = objFolder.ParseName(objFile.Name)
		Set colVerbs = objFolderItem.Verbs
		For Each objVerb In colVerbs
			If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
			If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
		Next
		WScript.Echo strFilePath & " has been pinned."
	Else
		WScript.Echo "Could not find " & strFilePath
	End If
Next

Open in new window

0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 37052281
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

705 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