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

[docs] shell scope #1982

Open
ponull opened this issue Mar 20, 2024 · 3 comments
Open

[docs] shell scope #1982

ponull opened this issue Mar 20, 2024 · 3 comments
Labels
enhancement Does it add or improve content?
Milestone

Comments

@ponull
Copy link

ponull commented Mar 20, 2024

I need to use tauri to download and save the executable file, and use javascript to execute it using the shell api, but it prompts me "program not allowed on the configured shell scope". How should I set it up so that I can run the later downloaded program? At compile time, it is not known which executable kernel the user will choose to download.

@ponull
Copy link
Author

ponull commented Mar 20, 2024

I have the kernel:
bin-22.exe
bin-23.exe
bin-24.exe
How can I allow tauri to execute any kernel EXE file downloaded later?

@FabianLars
Copy link
Member

If it's not known at compile time you have to spawn the commands on the rust side, or use cmd.exe or similar as your command and your exe as an arg to that.

In theory there's also tauri-apps/tauri#7165 which would allow to extend the scope in rust but still spawn the command in js but the pr never got merged and i doubt it will for v1 at this point.

@ponull
Copy link
Author

ponull commented Mar 21, 2024

thanks for your answer, bro

@FabianLars FabianLars transferred this issue from tauri-apps/tauri Mar 21, 2024
@simonhyll simonhyll added this to the Version 2.x milestone May 3, 2024
@simonhyll simonhyll added enhancement Does it add or improve content? and removed type: documentation labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Does it add or improve content?
Projects
Status: 💪 Ready
Development

No branches or pull requests

3 participants