Scripting Blog [archived]

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

How Can I Display Multiple Lines of Output in a Web Page?

(image) Hey, Scripting Guy! How do I get multiple lines of output in a Web page using the Document.Body.InnerHTML property? I can only get one line of output on my page.-- CM(image) (image) (image) Hey, CM. Sounds like you’re creating an instance of Internet Explorer and trying to display script output in it. And we’re willing to bet you...

How Can I Determine if a Computer is a Laptop or a Desktop Machine?

(image) Hey, Scripting Guy! Is there any way to use WMI to determine whether a computer is a laptop or a desktop machine?-- CB(image) (image) (image) Hey, CB. You bet there is, although if you didn’t know that we have no idea how you’d figure it out on your own. It turns out there’s a goofy little WMI class called Win32_SystemEnclosure...

How Can I Tell if a Computer Has a DVD Drive Installed?

(image) Hey, Scripting Guy! How can I tell if a computer has a DVD drive installed?-- GC(image) (image) (image) Hey, GC. No doubt you’re hoping we’ll say something like, “Why, you just use the Win32_DVD class, of course.” Unfortunately, though, we can’t say that; that’s because there is no Win32_DVD class, or any class devoted to...