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

Question: How to change location of WebView2 folder on Windows? #966

Closed
sdwoodbury opened this issue Apr 19, 2023 · 2 comments
Closed

Question: How to change location of WebView2 folder on Windows? #966

sdwoodbury opened this issue Apr 19, 2023 · 2 comments

Comments

@sdwoodbury
Copy link
Contributor

Hello,

I'm preparing to release a Windows application named uplink. I found that on windows, a folder is created next to the executable, named <application name>.exe.WebView2. This prevents me from installing the executable in the ProgramFiles directory because the exe doesn't have write access to that directory. Is there a way I can tell Dioxus to create this WebView2 folder somewhere else?

image

This issue is somewhat important to me because if I use the installer to uninstall the app, it won't delete the C:\uplink directory. This is because the WebView2 folder was added. If I then re-run the installer, the installer may install the new .exe because the old one is still there. In other words, if someone uninstalls uplink, downloads a installer for a different version, and runs the installer, they would still have the old version. Also, the app would look more professional if it could be installed in the ProgramFiles directory instead of whatever the LocalAppData folder happens to be (usually the last letter drive).

@ealmloff
Copy link
Member

You can use the with_data_directory function on the desktop config on the master branch after #905:

dioxus_desktop::launch_cfg(
    App,
    dioxus_desktop::Config::new().with_data_directory("C:/Uplink/"),
);

@sdwoodbury
Copy link
Contributor Author

great! thank you!

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

No branches or pull requests

2 participants