Scripting Blog [archived]

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

How Can I Determine the Default Script Host on a Computer Before I Run a Script?

(image) Hey, Scripting Guy! I know that when I run a script I can use code to determine whether the script is running under WScript or CScript. What I can’t figure out is this: how can I determine the default script host on a computer before I run a script?-- AT(image) (image) (image) Hey, AT. You know, it’s not very often that people ...

How Can I Retrieve a List of the Commands Typed Into the Run Dialog Box?

(image) Hey, Scripting Guy! Sometimes I type commands in the Run dialog box that I’d like to retrieve later on. I know the most recent commands I used are cached somewhere; that’s because they show up when I start typing in the Run dialog box. How can I use a script to retrieve these commands?-- KJ(image) (image) (image) Hey, KJ. You ...

How Can I Start Windows Explorer Opened to a Specific Folder?

(image) Hey, Scripting Guy! How can I start Windows Explorer opened to a specific folder?-- CD(image) (image) (image) Hey, CD. We’re going to let you in on one of the Scripting Guys’ most sordid secrets: sometimes the Scripting Guys don’t agree with each other. No, it’s true; really. For example, some of the Scripting Guys think ...

How Can I Configure the Screensaver Used When No One is Logged On to a Computer?

(image) Hey, Scripting Guy! I recently downloaded your Script Center screensaver, and it works great as long as someone is logged on to the computer. However, when no one is logged on the computer uses a different screensaver. How can I get the computer to use the Script Center screensaver when no one is logged on?-- RF(image) (image) (image...

How Can I List All the Items in the Run Key in the Registry?

(image) Hey, Scripting Guy! How can I list all the items in the Run key in the registry?-- JW(image) (image) (image) Hey, JW. How can you list all the items in the Run key in the registry? Well, to be honest, we’re not going to tell you. Nope, sorry. Not because we don’t like you, but because we think we have a better answer for you. (...