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

Installation on Windows requires admin privileges #59

Closed
Oliver-Loeffler opened this issue Jan 20, 2022 · 12 comments
Closed

Installation on Windows requires admin privileges #59

Oliver-Loeffler opened this issue Jan 20, 2022 · 12 comments
Assignees
Milestone

Comments

@Oliver-Loeffler
Copy link

Oliver-Loeffler commented Jan 20, 2022

Hi,
LogoRRR is a quite valuable tool - thanks for sharing this!
Unfortunately the installation process on Windows has s severe limitation.

Current behavior

However, on Windows, especially in restricted environments, an installation using the provided installation won't work.
The installer requests admin privileges and if those are not granted, installation will abort.
The installer downloads the possibly required C++ runtime in background.
Installation is directly performed in c:\Program Files\LogoRRR.

Expected behavior

Installer will run without admin privileges.
Ideally installer will ask if C++ runtime libs shall be installed. Download and installation of C++ runtime shall only be performed when user permits this.
Installation is directly performed in c:\Users\<username>\AppData\Local\Programs\LogoRRR.

@rladstaetter
Copy link
Owner

I could provide a zip file with all required dlls which could be used as a 'portable' solution for LogoRRR for your usecase maybe?

One problem I have here is to give the exe file an appropriate Icon (this was one motivation to create an installer in the first place ;-)

I'm not sure if installing applications without admin rights is supported by the installer tooling I'm using. I have to try it out.

At least Chrome installs itself to AppData\Local\Google if it doesn't get admin rights during installation, but is it common to install applications to this directory? It doesn't show up neither in 'add/remove programs...' as opposed to if you do install it with admin rights.

I would be happy to distributed logorrr with a single exe file, but it is an uphill battle against various security mechanisms from the OS which guard against such a use case ;-).

@Oliver-Loeffler
Copy link
Author

I wonder if it would be possible to use jpackage for that. I have not played with the build process yet but isn't there just a JAR file at the end? If so, it should be possible to let jpackage do the job. I'll play with that. With jpackage one can configure if this requires admin or non-admin rights on Windows. Its also quite easy to assign an application icon etc.

@Oliver-Loeffler
Copy link
Author

Oliver-Loeffler commented Jan 22, 2022

Ah, I see the problem - jpackage does not seem to support native images. Well... but may be reading the jpackage MSI code in OpenJDK provides some understanding on how to package an application using WIX toolset.

Found this one here:
https://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with
and this:
https://www.firegiant.com/wix/tutorial/

@Oliver-Loeffler
Copy link
Author

Well, I actually created a ZIP on my own. Nevertheless, I'll also have a look into the installer topic and the icon question. Possibly we'll find a solution for this together.

@rladstaetter
Copy link
Owner

Actually, after thinking about it, you can just copy logorrr.exe to your system and start it from anywhere you like or have access to. It is completely self contained and will initialise itself from scratch if it finds the necessary vs2019 redist libs. As mentioned, odds are high that this is not possible due to some IT security restriction. If you are able to circumvent those issues in your usecase, you should be good to go.

Scenario 2 is to create a simple installer which installs LogoRRR to c:\Users<username>\AppData\Local\Programs\LogoRRR - alongside necessary redist dlls. The question here is if the installer still needs admin rights (i do not know atm).

logorrr.exe is created via GraalVM and gluon plugin tooling. logorrr.exe still has default meta data (see #20) which I would love to see resolved -> and actually by chance there has been some activity around this topic gluonhq/substrate/pull/1090 in the recent days 👍 I have to look into this in detail.

jpackager is in use for macos builds. it seemed to be the easiest solution to get to a pkg file. builds on windows use graal native image + advanced installer tech, but could be replaced via jpackager/jlink + wix instead. ideally i would like to have both solutions on both systems (native builds for mac/win and jpackager as well - since LogoRRR is also a playground for those technologies for me.

bottom line for this issue for me is: i try to create a non admin installer without the need to install redists explicitly with a nice user experience.

@rladstaetter
Copy link
Owner

as of creating windows installers with jpackage - I'm not 100% sure but I think in the meantime gluonfx-maven-plugin can do this.

@rladstaetter
Copy link
Owner

@Oliver-Loeffler I have prepared a 'slim' installer, which

  • should be able to be run as normal user
  • installs to Temp/Roaming/... directory
  • doesn't install visual studio runtimes (it assumes they are here - if not it just doesn't start)

please try it out, you can download the snapshot installer here:

https://www.logorrr.app/downloads/LogoRRR-22.1.0-installer-slim.exe

the plan for now is to distribute two versions for windows - one installer which installs everything, another one which is more friendly to be installed in restricted environments.

@Oliver-Loeffler
Copy link
Author

Great, I've tried out and it installs into C:\Users\<username>\AppData\Roaming\LogoRRR\ which is fine.
Unfortunately, don't know why, Microsoft defender complains it. It does not happen when packaging with JPackage. But one can click the Defender warning away. It does the job! Will try tomorrow in another environment and give you feedback.

@rladstaetter
Copy link
Owner

windows defender complains about it since the installer is not signed (would require an ev certificate which costs about 600$/year or something #64). If you are comfortable with this solution I would close the issue.

@Oliver-Loeffler
Copy link
Author

Hi, so this works great. Issue solved! Thanks for the work!

@Oliver-Loeffler
Copy link
Author

Don't think its worth 600$ / year to sign it.

@rladstaetter rladstaetter added this to the 22.1.0 milestone Jan 29, 2022
@rladstaetter rladstaetter self-assigned this Jan 29, 2022
@rladstaetter
Copy link
Owner

will be part of 22.1.0 release.

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