Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Wait Until One Application Has Quit Before Starting a Second Application?

Hey, Scripting Guy! I have a script that starts two applications; however, the second application can not start until the first program has finished running. How can I ensure that my second program doesn’t start until the first one ends?-- OR Hey, OR. Not too long ago the Scripting Guy who writes this column read an article about Walter ...

How Can I Delete the First Line and the Last Line in a Text File?

Hey, Scripting Guy! How can I delete the first line and the last line in a text file?-- TF Hey, TF. We don’t know if anyone has ever noticed, but Hey, Scripting Guy! tends to meander from time-to-time; there are those occasions when it seemingly takes forever for us to get around to answering the question of the day. Up until now we ...

How Can I Change the Background Color of Spreadsheet Rows That Have a Date in a Specified Cell?

Hey, Scripting Guy! In an Excel spreadsheet, how can I change the color of a row if there is a date stored a particular cell in that row?-- GL Hey, GL. Some of you might have noticed that there was no Hey, Scripting Guy! column yesterday. Is that because the Scripting Guys are slacking off and shirking their responsibilities? Of course; ...

How Can I Export an HTA Table to Excel?

Hey, Scripting Guy! How can I put a button in an HTA that, when clicked, exports an HTML table to Excel?-- DW Hey, DW. You know, yesterday afternoon the Scripting Guy who writes this column went to get his hair cut, figuring he needs to look his best for TechEd 2007. (It was only after he got his hair cut that he realized what a futile ...

How Can I Compare the Contents of Two Text Files?

Hey, Scripting Guy! I have two separate text files. One file contains a list of MAC addresses taken from a network scan; the other contains a list of MAC addresses for our currently-managed devices. How can I compare these two files, and output a list of addresses that have no corresponding device to a third text file?-- SR Hey, SR. You ...

Feedback usabilla icon