Jump to content

How to get extra info about a process


Recommended Posts

Hi,

I have a java program that sometimes fails to close properly. Its window is closed but the corresponding process doesn't die. So whenever the user opens it up again it does not work properly (the program needs to communicate through the serial port, but the port is blocked).

I could easily make a small autoitscript that looks for javaw.exe and kills it. However I don't feel that it is safe, as the user could be running another unrelated java program and the script would kill it.

By using SysInternal's ProcessExplorer I can see the "zombie" process and I can get a lot of information about it, notable the actual path to the javaw.exe executable that was run. If I could get this info with AutoIt I would be able to distinguish betweeen that javaw.exe and any other one.

So, is there some way to get the full program path from a running process in AutoIt?

Any help would be greatly appreciated.

Thanks!

Angel

Link to comment
Share on other sites

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Thanks a lot gafrost. You are the :D!

I looked for "process details" on the forum but I did not find these useful threads! It'd be great if these functions made it as UDF into the "Process.au3" library!

I have a question though. What is the difference between using the wmi and using a call to kernel32.dll in WindowsNT (and I assume XP) systems? Would the wmi method work on older windows systems (such as 95 or 98), of which we still have some on the lab? Does the wmi method rely in some service or some user privileges to run? Would an antispyware tool block this? I ask because I want to make this as transparent to our users as possible.

Thanks,

Angel

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...