terrypin Posted October 19, 2009 Report Share Posted October 19, 2009 Here's an ultra-simple example. Open Notepad and run the following macro Terminate Process: NOTEPAD.EXE That works fine, closing Notepad. Now change the macro to the full path, the method used in the Help example : Terminate Process: C:\WINDOWS\NOTEPAD.EXE That fails here. There's some fleeting activity, but Notepad remains open. And after the macro stops, there's this baffling error message in Script Editor: "Line 1: Debug Error: The Process is not running" when it plainly is (as shown in Task Manager, apart from the prominence of the Notepad window itself.) Anyone able to confirm please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
kevin Posted October 19, 2009 Report Share Posted October 19, 2009 Terminate Process: C:\WINDOWS\NOTEPAD.EXE[/b] Once a program is running in memory all file path information about that program is meaningless. The 'C:\WINDOWS\' is only used to launch the program 'Notepad.exe'. The only way this program is referenced inside Windows as it is running is 'Notepad.exe'. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 19, 2009 Author Report Share Posted October 19, 2009 Once a program is running in memory all file path information about that program is meaningless. The 'C:\WINDOWS\' is only used to launch the program 'Notepad.exe'. The only way this program is referenced inside Windows as it is running is 'Notepad.exe'. So is the example in Help a mistake? And if I wanted to terminate a different program, D:\Program Files\Notepad.exe, how would ME Pro distinguish the two? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted October 19, 2009 Report Share Posted October 19, 2009 Looks like another error in the help file...................................... Ha! I never noticed that before, the graphic in the help file does show a complete path. You should write it up in a bugrep. What Kevin says is correct. The simplest way to see this is to go to the Task Manager and select the Processes tab. You want what appears in the "Image Name" column. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 19, 2009 Author Report Share Posted October 19, 2009 Looks like another error in the help file......................................Ha! I never noticed that before, the graphic in the help file does show a complete path. You should write it up in a bugrep. What Kevin says is correct. The simplest way to see this is to go to the Task Manager and select the Processes tab. You want what appears in the "Image Name" column. Thanks for checking and confirming. Any thoughts on my second point about distinguishing Path1\xyz.exe from Path2\xyz.exe? That's why I would have thought the path was necessary to avoid ambiguity. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
paul Posted October 19, 2009 Report Share Posted October 19, 2009 Any thoughts on my second point about distinguishing Path1\xyz.exe from Path2\xyz.exe? That's why I would have thought the path was necessary to avoid ambiguity. When you start a process, the system needs to know which process you want to start, so you specify the path in order to avoid any ambiguity. Once the process is running, there's no ambiguity any more because each process has a unique Id (PID). So you may have several processes running, all called xyz.exe. If you use Task Manager to kill one of these processes, you must manually select which process you mean. If you use a Kill utility, you'd use a PID, otherwise you'd likely kill all processes with that name (that's how PsKill works). With ME, you can specify a window name. If you use the process name instead, one of the named processes is terminated; I don't know if it's the first process found, or the first process started, or whatever. But the path used when starting the process is completely irrelevant to Windows. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 20, 2009 Author Report Share Posted October 20, 2009 Thanks Paul, understood. Looks like it's simply a badly-chosen Help example then, although no reply on that point from Kevin. I'm guessing it was pasted from another section. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Scruples98 Posted December 8, 2010 Report Share Posted December 8, 2010 Okay, I am having this problem as well. I seek to terminate a running process. I am using just the process name (not the image path). I can clearly see the process in my task manager. However, when I run the macro it gives me an error message "The process is not running". But I can that it is running. How do I enable Macro express to kill this process? Quote Link to comment Share on other sites More sharing options...
Cory Posted December 9, 2010 Report Share Posted December 9, 2010 Works for me. Make sure in the drop down you have selected the option "Process Name" and not "Window Title". If it still does it create a simple macro and just put in that one command and do a debug run (F9) on it and look at the messages pane in the bottom. What error did it give? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.