Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable Smart screen on windows #704

Closed
1 of 2 tasks
claudioluciano opened this issue Sep 26, 2022 · 6 comments · Fixed by #698
Closed
1 of 2 tasks

Option to disable Smart screen on windows #704

claudioluciano opened this issue Sep 26, 2022 · 6 comments · Fixed by #698

Comments

@claudioluciano
Copy link

Is your feature request related to a problem? Please describe.
Disable the SmartScreen on windows

Describe the solution you'd like
There's a flag (msSmartScreen Protection) on the init of the webview2, it's possible to make it accessible to us create an app without the annoying smart screen?

Describe alternatives you've considered

Would you assign yourself to implement this feature?

  • Yes
  • No

Additional context
https://github.com/tauri-apps/wry/blob/dev/src/webview/webview2/mod.rs#L121

tauri-apps/tauri#1345
MicrosoftEdge/WebView2Feedback#834 (comment)

@FabianLars
Copy link
Member

I do agree that there should be an option (maybe even disabled by default?) - But you can also disable it in your code by setting an env var before starting wry (or tauri). Should be something like this:

std::env::set_var("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--disable-features=msSmartScreenProtection");

@claudioluciano
Copy link
Author

I do agree that there should be an option (maybe even disabled by default?) - But you can also disable it in your code by setting an env var before starting wry (or tauri). Should be something like this:

std::env::set_var("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--disable-features=msSmartScreenProtection");

wow cool i didn't know i could define it like this, i will test this, but an option will be better to have

@amrbashir
Copy link
Member

is there a reason why someone might want that? should we be disabling it by default @FabianLars ?

@FabianLars
Copy link
Member

there is probably no reason to enable it in the context of use cases we officially "support". I guess it may only be relevant for the browser-like use case so it should be fine to just disable it without an option (especially since the people asking browser related questions apparently didn't care about security anywayyy)

@amrbashir
Copy link
Member

I went ahead and disabled it by default. Unfortunately setting the env var is not enough because it was overridden internally so I added a method to disable internal args. tauri will need to expose this new method.

@amrbashir
Copy link
Member

I have changed it to allow passing the arguments instead for better security see #711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants