Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Run a Command-Line Tool Multiple Times and Save the Output to a Text File?

(image) Hey, Scripting Guy! I’m trying to write a script that will run Fsutil.exe against all the drives on a computer. That’s pretty easy. However, I’d like to have all the output written to a text file rather than displayed on screen; that’s the part that I haven’t had much luck with. Any help here would be greatly appreciated...

Hey, Scripting Guy! How Can I Get a Script to Pick Up Where It Left Off After a Reboot?

(image) Hey, Scripting Guy! I would like to write a script, with a number of sequential actions, that can continue where it left off after a reboot. How can I do that?-- GS(image) (image) (image) Hey, GS. By the way, what are you doing at 10:00 AM Eastern Daylight Time today? Nothing? Great; then we’ll see you at the Orange County ...

Hey, Scripting Guy! How Can I Pass Command-Line Arguments to a Batch File Started From a Script?

(image) Hey, Scripting Guy! I am trying to write a script that requests multiple pieces of information from a user; I then want to call a batch file, using each piece of information as a separate command-line argument. Unfortunately, though, I can’t get this to work correctly. Can you help?-- BP(image) (image) (image) Hey, BP. You know, ...

Hey, Scripting Guy! How Can I Start a Remote Process Under CScript If the Script Path Contains Blank Spaces?

(image) Hey, Scripting Guy! I’m trying to create a process that runs a script under the CScript script host. However, I keep running into problems because there are spaces in the script path name. How can I use WMI’s Win32_Process class to run a script under CScript when there are spaces in the script path name?-- TA(image) (image) (...