That will probably kill the wrong notepad process, if there are more instances of it. Better use WMI to get the process IDs of all notepad.exe and the corresponding parent process IDs. Then compare the AutoIT PID with the parent process id. Only if those match, you know you've found the right process. You need to check that only once in the Adlib function (implement it via a global flag). Then check if the Process exists for a specified amount of time. If necessary kill it, as you've shown above.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post

Link to post

Share on other sites

Valik 467

lijun0238, since you used the "Report" feature to notify the moderators about this thread, I can only assume you want it locked. And if your intention, like I suspect, is to draw attention to this thread, then you deserve to have your thread locked.