Link to home
Start Free TrialLog in
Avatar of cknoderer
cknoderer

asked on

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

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?

Avatar of johnb6767
johnb6767
Flag of United States of America image

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
Avatar of cknoderer
cknoderer

ASKER

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.  
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] [/?]
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

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

Rob.
Works for me....
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.