Jump to content

Issues with ProcessList on 2008 Terminal Server

Recommended Posts

I think I may have reasoned this out already, but I'll pass it on here as well.

I've been writing a script that was calling ProcessList() and then trying to figure out if another instance of the AutoIt script was already running. This was to be run on a Win2008 Terminal Server (30+ users) and it seemed to work fine to begin with. The odd thing really was that I had developed it and tested it one day in the afternoon close to 5pm-ish and then the next day it started to give the the error "<script>.exe has stopped responding..." I isolated the problem to the ProcessList() function call. I even copy and pasted the ProcessList() example from the function documentation and it gave the same error. Well, as I was fighting with it, 5pm rolled back around and then ... it just started working again! No changes whatsoever ...

Thus I reasoned that it probably had some kind of upper limit to the number of processes returned by the function. As since I was testing it close to 5pm enough users had already logged off so that the process list was small. Probably for memory concerns, but still not quite documented (unless I just missed that somewhere). Is this my problem? :) If that is the case, how about a feature request for a parameter to only list processes owned by the user or session (in a TS environment at least)?

Actually, thinking about that, it seems that ProcessList wouldn't have been the right choice anyway because it would have listed all processes for every user anyway and I only needed it to detect if the same user had ran it twice. I got around it by just not caring if the user ran it twice, but it was pretty frustrating for a while. ;)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...