Jump to content
UBot Underground

[TIP] Temp. Solution to Multi-threading problems in UbotStudio 4x


Recommended Posts

Hi fellows,

 

Some of you may know me and others may not as I see a few new faces around here everyday. Its good to see the community is growing steadily, thanks to all the support and the amazing work by Seth & company and to Ubot Dev team. I must say I am again loving the coding experience with the mighty UbotStudio 4.x with remarkable power to take web automation to new heights.

 

I have recently been working on changing over few of my bots to the new UbotStudio 4.x. I have also been trying to play around with Multi-threading(MT) in UbotStudio 4.x. I must say it works like a charm and I am really enjoying it. However, the great experience with MT, as we all know Ubot 4 is still in its Beta stage, but very close to being released. I including few other member have noticed, when they code and use MT in Ubot4 with "in new browser" browser windows, even after the script is stopped there are few orphan instances of "UBotBrowser.exe" lying around and holding a little bit of useful memory space.

 

I had a chance to discuss the problem with Eddie from the Ubot Dev team, and the bug was recognized. He pointed the complexity in threading may take a longer time to officially fix the bug, and inspired me to create an external script to solve the issue temporarily.

 

So cutting short on the story, I have put together a VBSCRIPT to un-officially solve the problem with stranded "UBotBrowser.exe" processes as a result of using Multi-threading in UbotStudio 4. Its working fine do kill the unwanted instances of the "UBotBrowser.exe" processes.

 

Here is the script, I couldn't upload it as a .vbs so you may need to save it as a .vbs file and it can be called from the shell command.

 


strComputer = "."
strProcessToKill = "UBotBrowser.exe" 

SET objWMIService = GETOBJECT("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _ 
& strComputer & "\root\cimv2") 

SET colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & strProcessToKill & "'")

count = 0
FOR EACH objProcess in colProcess
If objProcess.WorkingSetSize < 1048576 Then
objProcess.Terminate()
End If
NEXT 

 

Special thanks to Eddie for the help and tips.

 

If this helps you please feel free to say thanks, or any comments as you may have.

 

Enjoy!

 

Praney Behl

  • Like 3
Link to post
Share on other sites

Hi fellows,

 

Some of you may know me and others may not as I see a few new faces around here everyday. Its good to see the community is growing steadily, thanks to all the support and the amazing work by Seth & company and to Ubot Dev team. I must say I am again loving the coding experience with the mighty UbotStudio 4.x with remarkable power to take web automation to new heights.

 

I have recently been working on changing over few of my bots to the new UbotStudio 4.x. I have also been trying to play around with Multi-threading(MT) in UbotStudio 4.x. I must say it works like a charm and I am really enjoying it. However, the great experience with MT, as we all know Ubot 4 is still in its Beta stage, but very close to being released. I including few other member have noticed, when they code and use MT in Ubot4 with "in new browser" browser windows, even after the script is stopped there are few orphan instances of "UBotBrowser.exe" lying around and holding a little bit of useful memory space.

 

I had a chance to discuss the problem with Eddie from the Ubot Dev team, and the bug was recognized. He pointed the complexity in threading may take a longer time to officially fix the bug, and inspired me to create an external script to solve the issue temporarily.

 

So cutting short on the story, I have put together a VBSCRIPT to un-officially solve the problem with stranded "UBotBrowser.exe" processes as a result of using Multi-threading in UbotStudio 4. Its working fine do kill the unwanted instances of the "UBotBrowser.exe" processes.

 

Here is the script, I couldn't upload it as a .vbs so you may need to save it as a .vbs file and it can be called from the shell command.

 


strComputer = "."
strProcessToKill = "UBotBrowser.exe" 

SET objWMIService = GETOBJECT("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _ 
& strComputer & "\root\cimv2") 

SET colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & strProcessToKill & "'")

count = 0
FOR EACH objProcess in colProcess
If objProcess.WorkingSetSize < 1048576 Then
objProcess.Terminate()
End If
NEXT 

 

Special thanks to Eddie for the help and tips.

 

If this helps you please feel free to say thanks, or any comments as you may have.

 

Enjoy!

 

Praney Behl

 

4.0.52 seems to help this a lot. I am going to do some more testing, but it looks like the problem bots I was see it with, have been resolved.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...