Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Use a Disconnected Recordset in Windows PowerShell?

(image) Hey, Scripting Guy! How can I use a disconnected recordset in Windows PowerShell? I’m able to create the recordset without any problem, but I can’t figure out how to reference the fields and values in that recordset.-- JVDL(image) (image) (image) Hey, JVDL. Well, we must say, we’re impressed by how cool, calm, and collected ...

How Can I Run a Subroutine in an HTA After a Set Amount of Time?

(image) Hey, Scripting Guy! I have an HTA that asks users to either click a button to install some software or click Cancel. Sometimes, though, users don’t do either one; they just let the HTA sit there. Is there any way to show the HTA for a set amount of time and then, if nothing happens, have it go ahead and install the software?-- TN(...

Hey, Scripting Guy! How Can I Convert Pacific Standard Time to My Local Time?

(image) Hey, Scripting Guy! I really enjoyed the 2007 Winter Scripting Games, but one thing I noticed is that you listed the deadlines for all the events using Redmond time. I understand that you can’t list deadlines using the local time for every time zone in the world; however, maybe you could show us how to write a script that could ...

Hey, Scripting Guy! How Can I Use Windows PowerShell to Sort a CSV File?

(image) Hey, Scripting Guy! have a comma-separated values file that includes several different fields. I’d like to be able to read this file from Windows PowerShell and then sort the information on one (or maybe more) of these fields. However, I can’t seem to get this to work. Any suggestions?-- DW(image) (image) (image) Hey, DW. ...

Hey, Scripting Guy! How Can I Remove Extraneous Spaces From Fields in a Text File?

(image) Hey, Scripting Guy! I have a text file in which each field has a bunch of extra spaces tacked on to the end. How can I remove all those extra spaces?-- GC(image) (image) (image) Hey, GC. Well, today is Monday, February 11th, which can mean only one thing: the 2008 Winter Scripting Games are just a few days away. But we didn’t ...