Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Write an Event-Driven Script?

(image)   (image) Hey, Scripting Guy! I have a problem at work. It is not with the pointy-headed boss, but I believe the problem is probably related to him anyway. There is this application that runs on a workstation in our computer room. It is not a client server application, and of course the workstation is not really a ...

Hey, Scripting Guy! How Can I Back Up a Database’s Data Folder While the Database Is Running?

(image) Hey, Scripting Guy! I have a problem. I am trying to script the backup of a data folder used by our database application. The problem is that as long as the database service is running, the files that are used are locked, and I am unable to copy them. I have found the service that runs the database, and when I use WMI to stop the ...

Hey, Scripting Guy! How Do I Display a Message and the Time a Process Was Terminated?

(image) Hey, Scripting Guy! We have this application that is supposed to run all the time. It is constantly giving us headaches and crashing. The applications vendor evidently expects it to crash all the time and has a thread that will restart it three times. After that, it is pretty much down for the count. The problem is that we never know...

Hey, Scripting Guy! How Can I Be Notified When a Process Begins?

(image) Hey, Scripting Guy! I need to be notified when a process begins. I would like to use Windows PowerShell to do this, but it does not seem to work. While I could do this in VBScript, I prefer to use Windows PowerShell. Can this be done?- NL(image) (image) Hi NL, Because we have access to the .NET Framework in Windows PowerShell, it ...

How Can I Check Every 30 Minutes to See If a File Has Been Modified?

(image) Hey, Scripting Guy! How can I monitor an application’s log file and issue an alert if the timestamp on that file hasn’t changed in the last 30 minutes?-- JA (image) (image) (image) Hey, JA. You know that’s a very interesting question, and one that – say, wait a second. You’re not JA from Stanwood, WA are you? Are you sure...