Jump to content

Terminal Server script


 Share

Recommended Posts

I wrote a script that starts an application and then using the ProcessWaitClose upon closure of the app the I run the logoff command. The script is run via GPO at logon. This worked great in testing. Now having several users running this at one time and it quit working. Troubleshooting I found that the Process WaitClose was looking at the first instance of the application on the TS. Since it was not closed the logoff never happened. (Verified this by grabbing process id). I am trying to figure out how to get the command to look at the correct process id. Thoughts?

Link to comment
Share on other sites

Link to comment
Share on other sites

I wrote a script that starts an application and then using the ProcessWaitClose upon closure of the app the I run the logoff command. The script is run via GPO at logon. This worked great in testing. Now having several users running this at one time and it quit working. Troubleshooting I found that the Process WaitClose was looking at the first instance of the application on the TS. Since it was not closed the logoff never happened. (Verified this by grabbing process id). I am trying to figure out how to get the command to look at the correct process id. Thoughts?

Are you returning a PID from the launch of the application to use with ProcessWaitClose()?

Or just trying with the process name? Using the PID should work.

If not, you might want to look at MrCreatoR's _ProcessCloseByOwner() function:

http://www.autoitscript.com/forum/index.ph...st&p=312935

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...