Jump to content
Sign in to follow this  
rudi

Terminal Server 2k3: Get a ProcessList for "This-TS-Session"?

Recommended Posts

rudi

Hi.

I'd like to get a PID list (array) for "This, currently running Terminal Server session":

I want to end all running programs prior disconnecting the TS-Session (I do not want to logout from the TS-Session, as a reconnect is far faster than a new TS-Session logon)

I found these two postings 1 and 2, but wanted to ask if there is a easier way to get the list of all processes belonging to "This TS-Session"?

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
evilertoaster

I'd like to get a PID list (array) for "This, currently running Terminal Server session":

For clarification: Do you want a list of all running proccess on a remote machine (the one you have an open terminal session with)?

Share this post


Link to post
Share on other sites
rudi

For clarification: Do you want a list of all running proccess on a remote machine (the one you have an open terminal session with)?

No.

The script is running as a kind of "Prog-starter" for a given TS-Session in that TS-Session. Before disconnecting the TS-Session I want to terminate all programs opened within this TS-Session.

ProcessExists("SomeProgram.exe") is finding also the instances opened by other logons, from other TS-Sessions as well as from console login.

So what I'm looking for is some "Give me all programs started within THIS TS-Session".

Thanks for your answer,

regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
rudi

Bump.

Anybody out there with a simple way to get a list of "all process IDs, only of those programs startet within THIS TS-Session" ? (This user, this session ONLY)

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
rudi

Bumping once more: I need it again, no solution so far...

Anybody out there with a simple way to get a list of "all process IDs, only of those programs startet within THIS TS-Session" ? (This user, this session ONLY)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
JSThePatriot

It looks like you will need to do a search on some WMI functions, and maybe google what you're looking for, and this will help. If you can get some more specific questions on the individual steps, you will probably get more help.

Thanks,

Jarvis


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites
rudi

It looks like you will need to do a search on some WMI functions, and maybe google what you're looking for, and this will help.

:) WMI, well, basically... all I know that this is an acronym for "Windows Management Instrumentation" o:)

In postings of other forum members I'm surprised again and again, what's possible to do using WMI. But I have really no clue at all how I should *FIND* these WMI tricks demonstrated in sample scripts.

If you can get some more specific questions on the individual steps, you will probably get more help.

The most specific question I can ask is:

How to I get a list of all processes,

1.) started by THIS user

2.) started within THIS TS-Session

... in any way, either with a direct Autoit buildin I've missed, or with WMI, or whatsoever :)

Regards


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.