Page 1 of 1

batch to kill a process (and also relaunch it then)

Posted: 17 Feb 2017 02:39
by Sebastian42
Sometimes the clipboard stops working. I'm led to believe that ending the clipboard process and then relaunching it, should solve the problem. I want to automate that in a batch file for 'easy access' at a moment's notice. https://technet.microsoft.com/en-au/lib ... 2147217396 gives examples of syntax (and explanations) for stopping processes, but I find it too complex to comprehend. None of my experimenting has produced a batch file that stops the clipboard from working. I have tried command lines like : "kill clip.exe"; "kill c:\windows\system32\clip.exe” and "taskkill /s srvmain /f /im rdpclip.exe", but none of them in a batch file seem to affect the clipboard functionality in Win10. Neither clip.exe nor rdpclip.exe show when 'tasklist' is typed into Command prompt. I'd like some help - preferably a finished batch file - to at least START the process (if not complete it).

Re: batch to kill a process (and also relaunch it then)

Posted: 17 Feb 2017 07:33
by Squashman
Sebastian42 wrote:Sometimes the clipboard stops working. I'm led to believe that ending the clipboard process and then relaunching it, should solve the problem.

What hypothesis led you to this belief?

Re: batch to kill a process (and also relaunch it then)

Posted: 17 Feb 2017 07:47
by ShadowThief
The clipboard isn't a process, it's a data buffer. You can't stop or start it.

Re: batch to kill a process (and also relaunch it then)

Posted: 17 Feb 2017 14:45
by Sebastian42
Squashman wrote:
Sebastian42 wrote:Sometimes the clipboard stops working. I'm led to believe that ending the clipboard process and then relaunching it, should solve the problem.

What hypothesis led you to this belief?

A google search - I did not document the source.

Re: batch to kill a process (and also relaunch it then)

Posted: 17 Feb 2017 14:53
by Sebastian42
Squashman wrote:
Sebastian42 wrote:Sometimes the clipboard stops working. I'm led to believe that ending the clipboard process and then relaunching it, should solve the problem.

What hypothesis led you to this belief?


From https://social.technet.microsoft.com/Fo ... progeneral
"The best solution I have found is to pull up task man, end the process rdpclip.exe, and then restart it by first changing focus from task manager to another program and back to task manager, choose file>new task (run) and then typing in rdpclip.exe and hit enter. The remote clip service will restart, and usually the copy you wanted to paste immediately becomes available."

Re: batch to kill a process (and also relaunch it then)

Posted: 18 Feb 2017 07:46
by ShadowThief
Sebastian42 wrote:
Squashman wrote:
Sebastian42 wrote:Sometimes the clipboard stops working. I'm led to believe that ending the clipboard process and then relaunching it, should solve the problem.

What hypothesis led you to this belief?


From https://social.technet.microsoft.com/Fo ... progeneral
"The best solution I have found is to pull up task man, end the process rdpclip.exe, and then restart it by first changing focus from task manager to another program and back to task manager, choose file>new task (run) and then typing in rdpclip.exe and hit enter. The remote clip service will restart, and usually the copy you wanted to paste immediately becomes available."

That's exclusively for when you experience the problem on a remote machine you're interacting with via RDP, unfortunately.