DarkBoost Posted July 1, 2016 Share Posted July 1, 2016 Hello, I have written a script which launches a portable version of the Google Chrome Browser which it does fine however it launches a whole range of "chrome.exe" (see attachment). I could just use a "ProcessClose" in a While Loop until it's closed however if I had already an instance of Google Chrome running (which in many cases I will) it would close ALL of them. I would just like to close the instance which the script launched. I am not sure how to do this and looking for some help please Link to comment Share on other sites More sharing options...
MichaelHB Posted July 1, 2016 Share Posted July 1, 2016 Hi @DarkBoost First you should deactivate the background chrome process that keep running after closed (https://support.google.com/chrome/answer/1184722?hl=en). Then, when you launch chrome get its hWnd and simple do a WinClose($hWnd). This way you will close that specific windows and the processes that is bound to it. Try and let me know if this work for you. Link to comment Share on other sites More sharing options...
DarkBoost Posted July 3, 2016 Author Share Posted July 3, 2016 @MichaelHB Thanks for replying, this option 'deactivate the background chrome process' was already disabled and something which I am not sure if I would like to replicate on other users machines as they may wish to have this feature activated. What I did end up doing was to capture all the existing Chrome.exe Process ID's (if any) before launching Chrome and then collect all the Process ID's after to figure out which ones were specific to me. Then I had the ability to close them. Thanks, Link to comment Share on other sites More sharing options...
MichaelHB Posted July 4, 2016 Share Posted July 4, 2016 Glad that you solve it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now