Scripting Blog [archived]

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

How Can I Run a Script Against a Range of IP Addresses?

(image) Hey, Scripting Guy! I’d like to run a script against all the computers on a subnet. Is there a way to do that without having to hardcode all the IP addresses into the script?-- RB(image) (image) (image) Hey, RB. Based on your email, it sounds like you have a setup similar to this: you have a subnet with IP addresses ranging from ...

How Can I Pause a Script and Then Resume It When a User Presses a Key on the Keyboard?

(image) Hey, Scripting Guy! I would like to be able to pause my script, then have it resume as soon as the user presses any key on the keyboard. How do I do that?-- AL(image) (image) (image) Hey, AL. Boy, this question takes us back: “Press any key to continue,” along with “Abort, Retry, or Fail,” has to be one of the most famous ...

Can I Change the Command Window Title When Running a Script?

(image) Hey, Scripting Guy! When I run a batch file, I can use the Title command to change the caption of the command window. Can I change the caption of the command window from within a script?-- AA, Yokohama, Japan(image) (image) (image) Hey, AA. Well, yes, as long as you’re willing to open up a new command window. If you are, then you ...

Can I Change the Current Directory When Running a Script?

(image) Hey, Scripting Guy! Can I change the current directory while my script is running?-- KO, Kalispell, MT(image) (image) (image) Hey, KO. Yes, you can change the current directory while a script is running, provided you are running Windows Script Host 5.6, that is. To change the current directory, all you have to do is create an ...

How Can I Call the Dir Command?

(image) Hey, Scripting Guy! I’m trying to do something that seems pretty simple: call the dir command from a script. It doesn’t seem to work, though. How come?-- CR, Mexico City, Mexico(image) (image) (image) Hey, CR. It appears from your mail that you’re trying to do a simple thing like this: However, instead of getting a list of ...