Jump to content

Recommended Posts

Posted

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?

Posted
Posted

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

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
×
×
  • Create New...