I am able to CLOSE all the open sessions of MS Edge Browser through EXEC node by using command TASKKILL /IM msedge.exe /F
How can i close only the current TAB from which the Button to run EXEC node was pressed ?
if i guessed correctly, i need to pass the PID number to the EXEC node. So how do i find the correct PID which is running the dashboard?
SUCCESS: The process "msedge.exe" with PID 3852 has been terminated.
SUCCESS: The process "msedge.exe" with PID 4904 has been terminated.
SUCCESS: The process "msedge.exe" with PID 5640 has been terminated.
SUCCESS: The process "msedge.exe" with PID 3548 has been terminated.
SUCCESS: The process "msedge.exe" with PID 7848 has been terminated.
SUCCESS: The process "msedge.exe" with PID 8676 has been terminated.
SUCCESS: The process "msedge.exe" with PID 9844 has been terminated.
SUCCESS: The process "msedge.exe" with PID 2592 has been terminated.
SUCCESS: The process "msedge.exe" with PID 312 has been terminated.
SUCCESS: The process "msedge.exe" with PID 8200 has been terminated.
SUCCESS: The process "msedge.exe" with PID 832 has been terminated.
SUCCESS: The process "msedge.exe" with PID 6676 has been terminated.
No, there is no way to determine which process is "running" which tab.
This is a really bad idea anyway. Killing a tab this way is more likely to mess up the whole browser, and even if not it will probably just leave the tab open, with no content.
If you want to close a tab, do it properly by clicking on the cross on the tab
Curious. What are your reasons for wanting to do this?
If you are trying to restrict access to specific sites, then there are better solutions like KIOSK mode or Internet Control software even adding a duff entry in your hosts file.
I am already running one monitor in Kiosk Mode where the user cannot open any other tabs. (Thanks to you , which helped me sometime back)
.
This was for another computer where i have setup a batch file to open the dashboard page in fullscreen mode and the person running dashboard cannot find the CLOSE TAB button even by hovering the mouse on top. Ctrl+W does the trick, but i thought it was easy to put a button on dashboard to close the window.
If it were that easy, it would rapidly get abused by bad people
You might be able to work around the issue by using a separate browser profile which I think will create a separate executable. If you started that from a script, you may be able to capture the PID that would let you kill it again from Node-RED. Then your Dashboard could have a button that kicks off the kill flow.