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

perUser InstallScope #2319

Closed
richardmward opened this issue Jul 29, 2021 · 16 comments · Fixed by #4674
Closed

perUser InstallScope #2319

richardmward opened this issue Jul 29, 2021 · 16 comments · Fixed by #4674

Comments

@richardmward
Copy link

Is your feature request related to a problem? Please describe.
I am unsure if there are technical reasons for this not being possible, but wish to raise it to see if it is a possibility.

Describe the solution you'd like
Could the windows installer support the perUser InstallScope (and I think maybe it'd need the limited InstallPrivileges) wix settings so that a Tauri app would not require admin privileges to install?

Describe alternatives you've considered
I appreciate WebView2 will have it's own limitations, but if that were already installed, could the app itself be less restricted in installation options?

Additional context
N/A

@philipborg
Copy link
Contributor

philipborg commented Mar 31, 2022

To quote @FabianLars "The webview installer doesn't need admin anymore", so that hindrance is out of the way.

Yuca965 seems to have had some degree of success getting it running though it required replacing the entire template. Conversation in link.

Seemingly
<Property Id="ALLUSERS" Value="2"/> <Property Id="MSIINSTALLPERUSER" Value="1"/>
was most effective.

@ottosson
Copy link

This feels like a fairly common use case and would be nice to have as an option in the tauri-conf.

It would simplify the installation phase if the user only needed to run the installer in a invisible mode and be done with it. No dialogs or prompts.

@drwhorx
Copy link

drwhorx commented Jul 5, 2022

Fairly new to Tauri; I just happened to stumble upon this thread looking for the same issue and I saw a solution was committed fairly recently. Will this be in the next Tauri release or should I try my hand at modifying my own installation to get this functionality sooner?

@lucasfernog
Copy link
Member

We did open a PR for it but it's not complete yet, there's some issues to fix. If your app does not use resources or sidecars, I think it might be easy to get that PR changes and throw it in a custom template. We're also working on NSIS.

@drwhorx
Copy link

drwhorx commented Jul 5, 2022

I did just try my hand at a custom template that implemented those changes and assumes per_machine is false, but alas I'm getting bundle errors, presumably from the aforementioned issues to fix. I'll go ahead and wait for your update, since my use case isn't urgent, but if I get my custom template working I'll go ahead and upload it here for anybody else who's curious.

@drwhorx
Copy link

drwhorx commented Jul 5, 2022

Keep in mind I have no idea what I'm doing and my use case is very basic, so mileage may vary, but the bundle issue was with respect to Line 94 of main.wxs. It didn't like that the GUID was not explicitly defined, so I generated a random GUID and threw it in there and it worked. Someone smarter than I can explain why that works but I just bundled my project and installed it without Admin and it worked.

I'm uploading my main.wxs here; keep in mind my version assumes per_machine is false, install_scope is per_user, and registry_root is HKCU, since all I was after was making a template, not messing with your bundler. This is a very dumb fix since I don't know what I'm doing.

main.wxs

@lucasfernog
Copy link
Member

It'll probably take some time for it to land in Tauri itself since we'll need to audit it. Good that it's working for you already though :)

@Uzaaft
Copy link

Uzaaft commented Jul 5, 2022

@drwhorx Your file does not work with a non-admin user.

@Uzaaft
Copy link

Uzaaft commented Jul 11, 2022

@lucasfernog Do you have the link to the PR?

@FabianLars
Copy link
Member

@Uzaaft #4509

@Uzaaft
Copy link

Uzaaft commented Jul 11, 2022

Thanks. Seems like that PR is closed, so I assume that you guys aren't working with it ATM?

@Uzaaft
Copy link

Uzaaft commented Jul 11, 2022

I got things working without an admin install using a .wxs template with minimal changes from the default one.
If it makes sense for the devs, perhaps I could go ahead and add a new example, in the example folder, with a custom template that can guide people in the future?

@FabianLars
Copy link
Member

Seems like that PR is closed, so I assume that you guys aren't working with it ATM?

afaik we aren't. If i got that right we'll probably implement this feature only with NSIS.

If it makes sense for the devs, perhaps I could go ahead and add a new example, in the example folder, with a custom template that can guide people in the future?

Can you post it first here? i'm not sure if we should add an example just for this. Maybe we can integrate it into the docs instead for now (either as an example or in the FAQ section with a link to this issue or something), or add it to an existing example 🤔

@Uzaaft
Copy link

Uzaaft commented Jul 11, 2022

Yeah sure thing. Here is a gist of it.

@schachzug
Copy link

A workaround for us was to edit the created .msi file with Windows Orca and change/add the following values:

Property -> ALLUSERS = 2
Property -> MSIINSTALLPERUSER = 1

The first test was successful, but more must follow.

@amrbashir amrbashir linked a pull request Sep 30, 2022 that will close this issue
22 tasks
@kieuminhcanh
Copy link

My app can't work in C:\Programe files. I tried above solutions but it's doesn't work.

lucasfernog added a commit that referenced this issue Jan 3, 2023
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
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.

10 participants