Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Retrieve Information About Laptops Changing from Full Power to Minimal Power Usage?

(image)   (image) Hey, Scripting Guy! I have a number of users on our network that use laptops as their primary workstation. These users are constantly complaining that their screen goes dark on them, or that the computer is running slow. I think the problem is the laptops switching between battery and AC power, or maybe the computer ...

Hey, Scripting Guy! How Can I Be Notified When a USB Drive Is Plugged into My Computer?

(image)   (image) Hey, Scripting Guy! I would like to be notified when I plug in a USB drive into my computer. I have some cool ideas for using that, but I do not know how to detect when a USB drive is plugged in. I know I can run a script that loops through looking for all drives, and compares them with a previous collection of drives ...

Hey, Scripting Guy! Can I Start an Event Based on When a Registry Value Is Changed?

(image)   (image) Hey, Scripting Guy! I need to be notified when a particular registry key value gets changed. The registry value is in the HKEY_LOCAL_MACHINE hive. What I am trying to accomplish is this: I am using a script to install software. After the first piece of software is successfully installed, I want to install a ...

Hey, Scripting Guy! Can I Format a Portable Drive When It Is Inserted Into a Computer?

(image)   (image) Hey, Scripting Guy! I work with portable USB drives all the time. These are used for backup purposes, for temporary storage, for Sneakernet, and as a means to work with extremely large files that I do not want cluttering up the small hard disk drive on my corporate standard desktop. The problem is that I now have ...

Hey, Scripting Guy! Can I Be Informed When a Portable Drive Is Added by My Computer?

(image)   (image) Hey, Scripting Guy! I would love to be able to write a Windows PowerShell script that will inform me when a portable drive is added to my computer. Do you have ideas you could suggest? -- RC (image) Hello RC, Microsoft Scripting Guy Ed Wilson here. Well it has already been a rather interesting week. I bought a ...