Hi,
How would I test if the process javaw is in memory then killing it?
Thanks,
There are multiple ways. Check out the AppExist function:
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_A__005.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_A__005.htm)
Another approach is to use the Process Extender's tListProc function:
https://docs.winbatch.com/mergedProjects/Process/Process/PROCESS_T__002.htm (https://docs.winbatch.com/mergedProjects/Process/Process/PROCESS_T__002.htm)
There are other approaches as well.
Hi,
And what would be the correct way to kill that process?
Thanks,
If you look in the Consolidated WIL Help file on your computer in the table of contents under "Windows Interface Language Reference -> Functions -> By Type -> Process Control", you will notice the function "TerminateApp". Assuming you have the correct process name or window name and your process is a regular Windows application, it should be suggestive...
Also, if you need to kill the process without using the process name The Process Extender has the "tKillProc" function. There are several other approaches including using WIL CLR hosting capabilities and the "System.Diagnostics.Process" class.