Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Open an Excel Workbook and Retrieve the Names of All the Worksheets?

(image) Hey, Scripting Guy! How can I open an Excel workbook and retrieve the names of all the worksheets?-- JG(image) (image) (image) Hey, JG. It’s the first day back after a three-day weekend, and this morning all the Scripting Guys stumbled into the office and just stared blankly into space. (All in all, pretty much business as usual...

How Can I Change the “Copy Music to This Location Folder” in Windows Media Player?

(image) Hey, Scripting Guy! How can I change the Copy music to this location folder in Windows Media Player?-- BD(image) (image) (image) Hey, BD. You know, a lot of people think that the reason we Scripting Guys don’t do very much work is because we’re just plain lazy. Those people are right. However, what we tell our bosses is this: ...

How Can I Get Just the User Name When Using the Win32_ComputerSystem Class?

 (image) Hey, Scripting Guy! I’m using the Win32_ComputerSystem class to get the name of the logged-on user. The name comes back formatted like this: Domain\Name. How can I extract just the user name?-- KW(image) (image) (image) Hey, KW. As our much-beloved and highly-respected editor reminded us the other day, instead of spending ...

How Can I Use ADO to Open a Text File That has Spaces in the File Name?

(image) Hey, Scripting Guy! How can I use ADO to open a text file that has spaces in the file name?-- TL(image) (image) (image) Hey, TL. You might not even remember sending us this question; to say it’s been awhile would be an understatement. (You should have seen all the dust and cobwebs we had to brush off this question before we could...