willj Posted April 30, 2009 Share Posted April 30, 2009 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 More sharing options...
CodyBarrett Posted April 30, 2009 Share Posted April 30, 2009 runas ??? [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
ResNullius Posted May 1, 2009 Share Posted May 1, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now