I want to automate closing the remote desktop application using python. I open the remote desktop using mstsc. When I do
os.system("TASKKILL /F /IM mstsc.exe")
It is killing all the remote desktop applications that are open. Is there a way I can specify through python which remote desktop it has to close. I have 2 or more instances of remote desktop open and I require my program to close only specific connection. Is there a way I can pass the IP address or process ID or something.