Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can't RUN taskkill.exe from macro
#1
I tried to execute the command:

run "C:\Windows\System32\taskkill.exe /f /im notepad.exe"

but I get an error saying that Windows can't find "C:\Windows\System32\taskkill.exe /f /im notepad.exe"

If I execute "C:\Windows\System32\taskkill.exe /f /im notepad.exe" from the command prompt it works correctly and terminates notepad.exe with no errors so I'm not sure why the run command doesn't work.
#2
I read in the forum to setup a symbolic link which I have done, but I still have a problem. When I run the command with parameters like this:

run "$desktop$\system64\taskkill.exe"

the program runs without a windows error message, but, of course, it doesn't kill a task because no parameters were passed. If I insert the same parameters I use on the command line that work to kill a program like this:

run "$desktop$\system64\taskkill.exe /f /im notepad.exe"

then I get a windows error saying windows can't find c:\users\jim\desktop\system64\taskkill.exe /f /im notepad.exe

so I assume the problem is how to pass the parameters correctly.. ??
#3
Macro Macro24
Code:
Copy      Help
run "taskkill.exe" "/f /im notepad.exe"
#4
or
RunConsole2 "C:\Windows\System32\taskkill.exe /f /im notepad.exe"

or
ShutDownProcess "notepad"
#5
the shutdownprocess function worked perfectly thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)