Browse by Tags

Tagged Content List
  • Blog Post: How Can I Be Notified Any Time a Network Cable Gets Unplugged?

    Hey, Scripting Guy! Is there a way I can be notified any time a network cable gets unplugged on a computer? -- DD Hey, DD. A lot of people, when growing up, had a grandmother or an aunt or someone somewhere who had a house with a big attic, an attic overflowing with stuff. Admittedly, most of the...
  • Blog Post: Why Does My Performance Monitoring Script Keep Returning the Same Incorrect Values?

    Hey, Scripting Guy! I’m using a script to monitor process performance, but every time I run the script the percent processor time for all the processes comes out as 0. What am I doing wrong? -- JL Hey, JL. We’ve simplified your script a bit to better illustrate the problem you’re running into. (And...
  • Blog Post: How to Use VBScript to Run a PowerShell Script

    Summary : Microsoft Scripting Guy, Ed Wilson, shows you that it's easier than you think to use VBScript to run a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. Things are really heating up around here—and I am not just talking about the hot, humid weather down in Charlotte...
  • Blog Post: How Can I Start a Process and Then Wait For the Process to End Before Terminating the Script?

    Hey, Scripting Guy! How can I start a process and then wait until that process quits before terminating the script? -- FG Hey, FG. Before we answer your question, the Scripting Guy who writes this column has a confession to make: he’s the one who ruined Christmas for everyone. Not that he meant to...
  • Blog Post: How Can I Monitor Changes to a Registry Key?

    Hey, Scripting Guy! Is it possible to use a script to monitor changes to a registry key? I’d like to be notified any time someone makes changes to the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run key. -- SB Hey, SB. And by the way, thanks for wording the question the way you did...
  • Blog Post: How Can I Monitor the Event Logs for the Occurrence of a Specific Event?

    Hey, Scripting Guy! How can I monitor the event logs for the occurrence of a specific event? -- JP Hey, JP. Why, you use an event log monitoring script, of course. (Yes, it’s hard to believe, but they really do pay us to come up with brilliant answers like that.) OK, maybe we should be a little...
  • Blog Post: Learn How to Use VBScript to Create Permanent WMI Events

    Summary: Learn how to create permanent WMI events using VBScript in this foundational blog post that provides a basis for a monitoring solution. Hey, Scripting Guy! Over the years, I have read many Hey Scripting Guy! Blog posts. They are usually humorous, easy to read, and possess a certain amount...
  • Blog Post: How Can I Start a Process and Then Log the User Off When That Process Ends?

    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 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...
  • Blog Post: How Can I Receive Notification Any Time Something is Printed to a Particular Printer?

    Hey, Scripting Guy! How can I receive notification any time something is printed to a particular printer? -- IL Hey, IL. You know, one of the Scripting Guys once had a summer job in an organization where the only decent printer in the entire building was kept in the administrative assistant’s office...
  • Blog Post: How Can I Automatically Run a Script Any Time a File is Added to a Folder?

    Hey, Scripting Guy! Is it possible to have a script automatically run any time a file is added to a specific folder? -- MB Hey, WM. Yes, this is possible, thanks to the magic of WMI events, which allow you to write a script to monitor for something of interest (like a file being added to a folder...
  • Blog Post: How Can I Be Notified Any Time a Service Goes Down?

    Hey, Scripting Guy! How can I be notified any time a service goes down? -- RN Hey, RN. As usual, there are a couple different ways you can do this, but perhaps the simplest approach is to create a script that monitors WMI events. We don’t have time to do a detailed explanation of WMI events in this...
  • Blog Post: How Can I Check Every 30 Minutes to See If a File Has Been Modified?

    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 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...
  • Blog Post: How Can I Monitor for Different Types of Events With Just One Script?

    Hey, Scripting Guy! Is there any way to monitor a folder for file creations and deletions, all with just one script? -- HA Hey, HA. By the way, thanks for the question: you temporarily saved us from answering a different question, one that was proving a bit difficult thanks to some surprising differences...
  • Blog Post: How Can I Determine When a Removable Drive Gets Connected?

    Hey, Scripting Guy! How can I determine when a USB flash drive gets connected? -- PS Hey, PS. OK, we admit it: the Scripting Guys are lazy. (Especially on a Friday, which is the day when we have to write our Monday column.) There might be a way to monitor specifically for the insertion of a USB flash...
  • Blog Post: How Can I Monitor for the Creation of Different Processes?

    Hey, Scripting Guy! How can I use one script to monitor for the creation of four or five different processes? -- BC Hey, BC. You know, it’s too bad you didn’t ask how you could monitor four or five TV shows at the same time. Had you done that we would have had the perfect answer for you: get yourself...
  • Blog Post: How Can I Launch Two Applications, Wait Until One Program Ends, and Then Close the Other?

    Hey, Scripting Guy! Here’s what I’d like to do: I want a script that will launch two executable files. After the first application closes I’d like the script to close the second application and then quit. How can I do that? -- MK Hey, MK. You know, this is the kind of question...
  • Blog Post: How Can I Log the Start Time and the End Time of the Screensaver?

    Hey, Scripting Guy! How can I log the start time and the end time of the screensaver? -- JS Hey, JS. You know, one of the Scripting Guys (hey, who said “It must be Greg”?) is old enough to remember the days when screensavers first came out. Back then a script like this would have been meaningless...