Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Start an Application From a Windows PowerShell Script, Then Pause the Script Until the Application Has Terminated?

(image) Hey, Scripting Guy! In Windows PowerShell, how can I start another application, then have my script pause until that application has terminated?-- AD(image) (image) (image) Hey, AD. Before we answer today’s question, we’d like to make an announcement: the Scripting Guys need friends! No, not those kind of friends. Well, come to...

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

(image) 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 (image) (image) (image) Hey, OR. Not too long ago the Scripting Guy who writes this ...

Hey, Scripting Guy! How Can I Delete All the Duplicates in a Set of Processes But Keep the Oldest Process?

(image) Hey, Scripting Guy! If I have a bunch of duplicate processes, how can I delete all of them except for the oldest one?-- IR(image) (image) (image) Hey, IR. We apologize for the delay in answering this question. Originally we thought it would be cute if we could get Peter Costantini, the oldest living Scripting Guy, to answer this; ...

How Can I Start a Process and Then Log the User Off When That Process Ends?

(image) Hey, Scripting Guy! How can I write a script that starts a process, waits until that process ends, and then logs the user off the computer?-- AG(image) (image) (image) Hey, AG. You know, the Scripting Guy who writes this column is never one to brag, mainly because he never has much of anything to brag about. In addition tot that, ...

How Can I Get a List of All the Users Who Have a Process Open on a Computer?

(image) Hey, Scripting Guy! How can I get a list of all the users who have a process open on a computer?-- RE (image) (image) (image) Hey, RE. You know, over the past 5 years the number of people who watch the news on the major networks (ABC, NBC, and CBS) has dropped precipitously; the number of people who read the newspaper each day has ...