tinytex-releases icon indicating copy to clipboard operation
tinytex-releases copied to clipboard

TinyTex Chocopackage still not working System-wide

Open andrihitz opened this issue 3 years ago • 4 comments

Hi

A few months ago I made a Pull request for adding a parameter for the SystemVar to allow the Chocopackage to install the TinyTex editor for all Users. Unfortunately, this is still not working, as the command currently used Writes the Value to what looks like a different SystemVar.

I managed to get it working with this Powershell for all Users on the System:

[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";$toolsDir\TinyTeX\bin\win32", [EnvironmentVariableTarget]::Machine)

If I use the TinyTex command:

cmd .exe /C `"$toolsDir\TinyTeX\bin\win32\tlmgr.bat path --w32mode=admin add`"

this will add it to the SystemVar but only for the installing User and not for every One on the system.

Maybe you could Check this again.

Thanks for your Help

andrihitz avatar Oct 21 '22 07:10 andrihitz

Hi @yihui Would it be possible to investigate this issue? If not, I would like to create a new merge request for the Chocopackage with the Powershell parameters rather than the TinyTex command.

Thanks for your Help

andrihitz avatar Nov 04 '22 08:11 andrihitz

Sorry but I don't use Windows and am not familiar with this. Here is the relevant part from the tlmgr help page:

path
    path [--w32mode=user|admin] add
    path [--w32mode=user|admin] remove
        On Unix, adds or removes symlinks for executables, man pages, and
        info pages in the system directories specified by the respective
        options (see the "option" description above). Does not change any
        initialization files, either system or personal. Furthermore, any
        executables added or removed by future updates are not taken care of
        automatically; this command must be rerun as needed.

        On Windows, the registry part where the binary directory is added or
        removed is determined in the following way:

        If the user has admin rights, and the option "--w32mode" is not
        given, the setting *w32_multi_user* determines the location (i.e.,
        if it is on then the system path, otherwise the user path is
        changed).

        If the user has admin rights, and the option "--w32mode" is given,
        this option determines the path to be adjusted.

        If the user does not have admin rights, and the option "--w32mode"
        is not given, and the setting *w32_multi_user* is off, the user path
        is changed, while if the setting *w32_multi_user* is on, a warning
        is issued that the caller does not have enough privileges.

        If the user does not have admin rights, and the option "--w32mode"
        is given, it must be "user" and the user path will be adjusted. If a
        user without admin rights uses the option "--w32mode admin" a
        warning is issued that the caller does not have enough privileges.

I'm not sure if it could give you any hint. If you can figure it out, I'll be happy to accept another pull request. Thanks!

yihui avatar Nov 04 '22 13:11 yihui

this will add it to the SystemVar but only for the installing User and not for every One on the system.

Actually, I can't reproduce this, running tlmgr.bat path --w32mode=admin add in an admin prompt adds it to the System Path. I'll test it with a virtual machine tomorrow to check the chocolatey package.

Also, sorry for a really delayed reply, am really busy these days.

naveen521kk avatar Nov 05 '22 18:11 naveen521kk

I've tried it with a VM (Win 8.1) and it seems to work.

this will add it to the SystemVar but only for the installing User and not for every One on the system.

I'm not sure I get this. I could see it adds to the environment variable from Control Panel image Not sure what you mean by that statement. Can you elaborate?

naveen521kk avatar Nov 08 '22 14:11 naveen521kk