cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill all chrome instances

EstebanMontesi1
Level 3
Is there any way to kill all instances of chrome open?

------------------------------
Esteban Montesinos
------------------------------
13 REPLIES 13

Hi Annis,

Blue Prism is getting hang every time I used to run this. Please advise.

------------------------------
Simanchala Pattanayak
Lead Solution Advisor
Deloitte USI
Bangalore
------------------------------

I apologize; apparently I still have a lot to learn about Blue Prism as I haven't finished my Surface Automation training.  I find it incomprehensible that I can't even get a command line to work.  I was trying to get it to physically open a command prompt and use a Global Send Keys to the command prompt screen to bypass whatever issue you are having, but I can't get an Application Modeller to attach to the command prompt window which I opened using the Utility - Environment VBO.  The fact that I can't just use a global send keys event without an application modeller is beyond me.  It should be an internal business object...it already has to have the correct window in focus to work and should just be a basic process action.

Sorry I couldn't help more.

------------------------------
Michael Annis
------------------------------

SimphiweTshezi
Level 4
Hi Estaban,

In the attach objects I used multiple wild cards in the Window title to include common words (eg *https*) to attach to all instances and then Global Send Key Event
"{CTRL}{W}>{CTRL}" to close all intsances.

I hope this helps.

------------------------------
Simphiwe Tshezi
Software Developer (RPA)
Altron Managed Solutions
Johannesburg
------------------------------
Simphiwe Tshezi Software Developer (RPA) Altron Managed Solutions Johannesburg

Hi Esteban,

Try using Utility Environment > Kill Process and enter "chrome.exe" in Process Name.
In my case I have modified the VBO a little and it kills the process and waits for it to end dynamically.
Here is the script -
Success = False
Dim bProcFound as Boolean = True
Dim iLoop as Integer = 0
Dim myProcesses() As System.Diagnostics.Process
Dim instance As System.Diagnostics.Process
Try
	Do While bProcFound = True AND iLoop < timeOut
		myProcesses = System.Diagnostics.Process.GetProcessesByName(Process_Name)
		for each p as System.Diagnostics.Process in myProcesses
			if iLoop = 0 OR iLoop Mod 3 = 0 then
				try
					p.CloseMainWindow()
					p.kill()
				catch ex As Exception
					Msg &= iLoop & ":" & Process_Name & " - " & ex.Message 
				end Try
			end if
		next
		bProcFound = False
		For Each instance In myProcesses
			bProcFound = True
		Next
		Threading.Thread.Sleep(200)
		iloop += 0.2
	Loop
	if iLoop >= timeOut then Msg = "Timeout" 
	if not bProcFound then Success = True
Catch
End Try​


Another way to do this is using a cmd file. Create a killChrome.cmd with "taskkill /im chrome.exe /f"
Now use Utility Environment > Start Process. Use "cmd" in Application and "/c <path>\killChrome.cmd"


Hope this Helps,
Regards



------------------------------
WeighyRPAMatey
------------------------------
WeitghtRPAMatey