Rem: Updating Pinned Start Menu Shortcuts

Upgrading to Office 2003 needn't play havoc with pinned XP shortcuts.

Bill Stewart

October 9, 2005

2 Min Read
ITPro Today logo in a gray background | ITPro Today


My company currently uses Microsoft Office XP. I've pinned shortcuts to winword.exe and excel.exe on the Start menu, then renamed those shortcuts Word 2002 and Excel 2002, respectively. We're in the process of upgrading to Microsoft Office 2003. The upgrade removes the old Office components but doesn't remove the items pinned to the Start menu. I know there's a script method to pin a file to the Start menu, but what I want is a script that will remove the old pinned items from the Start menu, install Office 2003, then pin new Office 2003 Word and Excel shortcuts to the Start menu. Any suggestions?

For those unfamiliar with the term, pinning an item to the Start menu is a Windows XP feature that lets you make a program permanently appear above the Start button (rather than letting the program appear or disappear depending on usage). In a nutshell, pinning or unpinning a shortcut from a script involves the following steps:

As you're aware, when you pin a shortcut to the Start menu and later delete that shortcut, the pinned item isn't automatically removed from the Start menu. Therefore, I recommend unpinning the existing shortcuts before you do anything else. Listing 2 shows a sample script, UnpinWord.vbs, that unpins Word 2003 from the Start menu. First, the script uses the WshShell object's Environment object to determine which directory contains the Office 2003 shortcuts. Then, it uses the four-step process I mentioned earlier to unpin the shortcut, as callout A in Listing 2 shows. You can modify this script to unpin the Word and Excel shortcuts for your Office XP installation.

When you upgrade to Office 2003, I recommend that you use the Office 2003 Custom Installation Wizard (CIW), which you can find in the Office 2003 Resource Kit (ORK—http://www.microsoft.com/office/orkarchive/2003ddl.htm), to customize your installation. The CIW lets you add shortcuts, named whatever you like, to the default Office 2003 installation. After installing Office, you can use a script to pin the required shortcuts to the Start menu. Listing 3 shows a sample script, PinFromDesktop.vbs, that pins a Word shortcut found on the desktop.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like