Scripting Blog [archived]

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

How Can I Write Binary Data to the Registry?

(image) Hey, Scripting Guy! How can I write binary data to the registry?-- FG(image) (image) (image) Hey, FG. WMI’s Standard Registry Provider includes a method - SetBinaryData - that makes it relatively easy to write binary data to the registry. There’s one little catch to be aware of, but we’ll let you know what that is. First, ...

How Can I Determine the System Time on a Computer?

(image) Hey, Scripting Guy! Is there any way to retrieve the system time as configured on a remote computer?-- JJ(image) (image) (image) Hey, JJ. There are at least two ways to do this, both using WMI. If you’re running Windows XP or Windows Server 2003, you can use the WMI class Win32_LocalTime. As you can see, that makes it pretty easy...

How Can I Tell Which Switches Were Used When Starting an Executable File?

(image) Hey, Scripting Guy! Is there any way to tell which command-line arguments (if any) were used when starting an executable file?-- TO(image) (image) (image) Hey, TO. We don’t mean to cause a scandal in the scripting world - well, OK, we don’t mean to cause any more scandals in the scripting world. But - gasp! - we’re going to ...