oren Posted May 28, 2011 Share Posted May 28, 2011 (edited) Hello.. I've build something that automatically start a process when I dont use my PC.. And it kill's it when I move he mouse.. Now I start my process with $Pid = run(@scriptdir & "1.exe" ...) And I end it with processclose($Pid) My problem is that sometimes 1.exe start other processes and I need my program to end those process also when I move my mouse. Is there a wway to know what processes started by 1.exe , I mean with the processs $Pid Am I understood? I think there is no way right?> Edited May 28, 2011 by oren Link to comment Share on other sites More sharing options...
smartee Posted May 28, 2011 Share Posted May 28, 2011 hi,Try this ;To start $sPID=Run(@ScriptDir&"\1.exe") ;To close process and all child processes Run(@ComSpec & " /c taskkill /F /PID " & $sPID & " /T", @SystemDir, @SW_HIDE)Taken from found by searching the forums.-smartee Link to comment Share on other sites More sharing options...
oren Posted May 28, 2011 Author Share Posted May 28, 2011 Thank you it work 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