Hi,
let me first explain what my problem is all about: I have a third-party
application, which does not allow multiple instances of itself. As I
need to run the application in multiple instances (it is processing
data, a job which can be neatly parallelized) I have created five user
accounts on my XP Home system, log in as every one of these users and
launch the application in each session, which works fine. (BTW: is the
number of users that can be logged in at the same time on XP Home
limited in some way? Apparently only 6 users can be logged in at the
same time, but I cannot switch between users anymore unless I log out
the sixth user. Is this restriction an XP restriction, a memory
problem, or what else?).
Unfortunately, the third-party application obviously has a bug that
causes it to freeze at some point or another (this doesn't have
anything to do with the application being started five times on the
same machine, as it freezes when run alone, too). This can happen after
a few minutes or after several hours. So I need to check whether the
application is still running, and restart it if necessary. This calls
for automation, of course (currently I do an IsResponding test on the
according process, which is performed by a "control"-application I have
specifically written for this purpose).
Now managing the start of the application is somewhat tedious, as I
have to repeat it several times a day. I wonder: is there a way to
automate the creation of the five user session and the start of the
applications?
I have something along the following lines in mind: I log in as the
administrator and launch an application that gives me control about how
many user sessions to create. The sessions are then created as if one
would do manually and the third-party application is started in each
session, after which I get switched back to the administrator account,
where I can now monitor the status of the third-party application on
the different accounts and restart or stop the application to my
liking.
I took a look at the Impersonation classes, but I am not sure whether
they do what I want or whether this is possible at all. So I would be
grateful if anyone could guide me into a way of automating the task at
hand.
BTW: there is no way of forcing an application into multiple instances,
by creating an entirely own process space or anything like that, is
there (and no, I do not want to use VMWare for this, seems like
overkill to me ;))
And, finally, to clear out the obvious: the third-party application is
no longer supported and cannot be changed in any way :(
Thanks in advance,
Ron Nanko