shaamaan Posted July 18, 2006 Share Posted July 18, 2006 hi, i would like to find out path of process... for example: i have process named "process.exe" and how can i find out which prog creates this process and what is the path to this prog? it is possible in AutoIt? thanx Link to comment Share on other sites More sharing options...
jvanegmond Posted July 18, 2006 Share Posted July 18, 2006 I think, with a search, AutoIt could give you all the possible entries that may be the exe. I don't think Windows links the processes with pathnames.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
GaryFrost Posted July 18, 2006 Share Posted July 18, 2006 I think, with a search, AutoIt could give you all the possible entries that may be the exe. I don't think Windows links the processes with pathnames..might want to rethink that http://www.autoitscript.com/forum/index.ph...st&p=200047 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 More sharing options...
shaamaan Posted July 18, 2006 Author Share Posted July 18, 2006 but for example sysinternals process explorer can find out the path of process... it is possible in autoit with dllcall or plugin (or something like that)? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 18, 2006 Moderators Share Posted July 18, 2006 but for example sysinternals process explorer can find out the path of process... it is possible in autoit with dllcall or plugin (or something like that)?Going to assume you didn't try Gary's code, and Larry has an option for it too somewhere. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
shaamaan Posted July 18, 2006 Author Share Posted July 18, 2006 might want to rethink that http://www.autoitscript.com/forum/index.ph...st&p=200047thanx a lot! i have adapt the script to my needs:CODE$title = WinGetTitle("winTitle...", "") ;first chars of full winTitle$path = _WinGetPath($title) ;if process/win does not exists then return = 0MsgBox(0, "Path of process", $path)Func _WinGetPath($title, $strComputer='localhost') $pid = WinGetProcess($title) $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE ProcessId = " & $pid, "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems If $objItem.ExecutablePath Then Return $objItem.ExecutablePath Next EndIfEndFunc 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