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 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 Retrieve the Path to the Program Files Folder on a Computer?

(image) Hey, Scripting Guy! How can I retrieve the path to the Program Files folder on a computer?-- CC(image) (image) (image) Hey, CC. How can you retrieve the path to the Program Files folder on a computer? Well, to be honest, not as easily as we thought you could. If you’re trying to retrieve the Program Files path on the local ...