ListRunningScripts.vbs

 

4 thoughts on “ListRunningScripts.vbs

  1. Great script! I’d love to use it but when I have a script running under a different account at the same time, the script gives an error message. Any way to limit the scripts listed/seen to just those running under the same account as the one that ran this?

    • Very interesting, It appears certain properties of the win32_process class are returning as null if they are running as a different user on a local machine. I’m looking for a proper fix to this, but I have modified the script to handle this issue in the mean time

  2. Thanks for the fast workaround, Brian. 🙂 I’m making a throttling sub/function, and the logic in your script to identify the script filename running is absolute key to making it work properly. Awesome – thanks!!

    FWIW, I noticed this script no longer gives scripts running under different creds, which works great for me.

    • The issue is due to the script not running elevated as an administrator because of UAC. Since it is not running as an administrator, it does not have access to the CommandLine property of the WIN32_Process class, and returns the default value of NULL. You will not see this issue on a remote computer because you need to be an administrator on it and RPC is running it elevated. I’m doing a slight update on the script, which will note that to run it elevated. You can resolve the issue by opening a command prompt using “Run as Administrator”, and launch the script from the command line. In addition, I just put together this script which will launch scripts with elevated permissions. There are some other options on running the scripts with elevated permissions, which I just outlined in an article because of this post (http://sigkillit.com/2013/01/26/running-vbscripts-with-uac-elevation/) Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *