Scripting Blog [archived]

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

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 ...

Hey, Scripting Guy! How Can I Modify the Footers of an Office Excel Spreadsheet?

(image) Hey, Scripting Guy! I have a simple question for you: How can I modify the footers in an Office Excel spreadsheet?- MN(image) (image) Hi MN, I have a simple answer for you as well. You assign a value to the appropriate footer property of the pagesetup object. If you would prefer a longer answer, read on. Today, we have a script ...

Hey, Scripting Guy! How Do I Center Contents of a Column in Office Excel?

(image) Hey, Scripting Guy! When I add data to an Office Excel spreadsheet, it always seems to put stuff on the right side of the column. I would like to know how to center the contents of a column. I do not think it should be that hard, but I just cannot figure it out. - LK(image) (image) Hi LK, Did you try Open Sesame? I can certainly ...