Sunday, September 12, 2004

 

Office Shortcut bar lives!

Does anyone remember the screen saver button we used to have in the Office Shortcut Toolbar? In fact does anyone remember the Office Shortcut Toolbar? This handy little application was removed somewhere between Office XP and Office 2003. The only reason I can think of for this was the inclusion of toolbars in Windows XP in the Task bar to allow you to create your own Shortcut bar in Windows XP. Using this Toolbar feature on the Task bar in Windows XP or Windows 2003 Server for that matter we can re-create the Office Toolbar along with that special Screen Saver button we all miss.

Once you have moved the toolbar to the correct location it should be displaying all the Office icons. We now need to make some touch ups.

Now for the reason I was posting this blog entry in the first place ;-) - The Screen Saver button! Now we need to fire up trusty notepad and run through the following code:

Set oShell = WScript.CreateObject ("WSCript.shell")

Set WMIService = GetObject("winmgmts:")

Set colComputerSystem = WMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")

For Each objProperty in colComputerSystem

strUsername = replace(objProperty.UserName, "\","\\")

Next

strWQL = "SELECT * FROM Win32_Desktop WHERE Name='" & strUserName & "'"

Set colDesktopItems = WMIService.ExecQuery(strWQL)

For Each objDesktopItem in colDesktopItems

oShell.run bjDesktopItem.ScreenSaverExecutable

Next

In this script it is just a matter of finding the current user logged on to a Windows system and then looking up that users Desktop settings and running the Screen Saver entry. It's that simple.

So save this file and add it as a shortcut into the folder we have selected for our toolbar. Once this is done you can edit you scripts shortcut and change the icon associated with the script.


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?