Pre-run executable scripts can be used to alter browser settings by making changes to registry keys. For some settings, the change will not take effect until the browser or OS is restarted. Unfortunately there is not a way to restart the browser or OS using Selenium during a test session so these new settings will not take effect for your tests. One example is changing the Enable Enhanced Protected Mode
in Internet Explorer, another is disabling the popup blocker in the Microsoft Edge browser.
You can find more information here: