oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
645 stars 248 forks source link

Install ruby machine wide #321

Closed bokkabonga closed 1 year ago

bokkabonga commented 1 year ago

Hey everyone,

i was just wondering if it is possible to install ruby machine wide for all users. The Installer always just seems to make ruby available for the user that launched the installer. The uninstall regsitry key will also be created in that users registry hive.

Is there any way to make the installation machine wide?

larskanis commented 1 year ago

Yes, the installer uses machine wide entries if you login with an administrator account and run the installer file per right click and "Run as administrator".

I already wondered if there could be a way to request a system wide install within the installer, but so far it is not implemented. If I remember right, the installer used to open the UAC dialog and did a system wide installation, when run by an user from the administrator group. But I noticed that this isn't done now (on Windows 10) but instead a single user installation is done.

So you can keep this ticket open as a reminder to introduce a more intuitive way to install system wide.

bokkabonga commented 1 year ago

Can´t confirm that. I have been testing a silent Install via CMD (with admin privilege) before that to test the options for our software deployment.

But not beeing able to install for all users on the system is a definite no-go.

larskanis commented 1 year ago

Can´t confirm that.

What can't you confirm?

bokkabonga commented 1 year ago

Can´t confirm that.

What can't you confirm?

My bad :D Running as an admin doesn´t make it a machine wide installation. It still is only available to the user and the uninstall regkey will be placed in the user hive.

larskanis commented 1 year ago

Next release series of RubyInstaller will get a selection dialog to decide between per-user and machine wide installation. The latter one requires Administrator privileges and shows up a UAC dialog.

This is implemented in commit 4382f99bf21608a3e37b6eabe861dca5e1f015f5 . The silent install options are described in https://github.com/oneclick/rubyinstaller2/wiki/FAQ#user-content-silent-install .

I plan to release these changes within the next week.

larskanis commented 1 year ago

The RubyInstaller version 3.2.0-1 has support for machine wide installation: https://rubyinstaller.org/2022/12/29/rubyinstaller-3.2.0-1-released.html

Could you give it a try? I'd like to get some feedback before the older stable branches are updated accordingly.

bokkabonga commented 1 year ago

Sorry for the late reply. As far as i tested it, it seems to work just fine. Thanks a lot!