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

TinyTex Chocopackage still not working System-wide #27

Open
andrihitz opened this issue Oct 21, 2022 · 4 comments
Open

TinyTex Chocopackage still not working System-wide #27

andrihitz opened this issue Oct 21, 2022 · 4 comments

Comments

@andrihitz
Copy link
Contributor

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
Copy link
Contributor Author

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

@yihui
Copy link
Member

yihui commented Nov 4, 2022

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!

@naveen521kk
Copy link
Collaborator

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
Copy link
Collaborator

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?

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

3 participants