Menu

#13 Feature Request: Change Install path of magicsplat-tcl

1.0
closed
nobody
None
2022-06-09
2021-06-20
EL
No

Hello,

The install path for magicsplat-tcl is currently %USERPROFILE%\AppData\Local\Apps\Tcl86. At least this is the path where the installation directory resolves to on my windows 10 system.

This is not exactly a standard directory for installing applications on windows, when they sould be available system wide. Applications would normally go to "C:\Program Files", so my suggestion would be to set the default install path to "C:\Program Files\Tcl". This would have two obvious benefits:

  • its easier for the user to find it, when (s)he searches for the Tcl base directory
  • its easier for CMake's FindTCL and FindTclStub macros to find it when you want to build an extension with CMake - as the path "C:\Program Files\Tcl" is one of the locations that are automatically scanned.

For situations where magicsplat Tcl should be installed for the current user only, I suggest to fallback to the current path, or let the user choose.

Best Regards
EL

Discussion

  • Ashok P. Nadkarni

    I'm afraid this is by design (Microsoft's, not mine). Although c:\program files used to be the standard, that has changed since Vista thanks to the per-user and all-user options in Windows installer. In particular, the per-user option mandates installation outside of C:\program files because (a) the user may not have privileges to install into c:\program files, and (b) it permits different users to install without interference with paths and settings of other users in a multi-user or terminal services environment. Thus per-user installation defaults to the path you see.

    Applications that still install to program files are those that have not bothered to update to the new guidelines or do not support per-user installation. Newer installers follow Microsoft recommendations. e.g. Python 3.9 installs in similar fashion to magicsplat - see https://docs.python.org/3/using/windows.html

    Selecting "for all users" option will default to the c:\program files. However, I'm afraid I don't plan on making "all users" the default option.

     
    • EL

      EL - 2021-06-20

      Ah good, I found the "for all users" option along with the path, hidden beneath the "advanced" button :-). That's the trick.

      However, I'm afraid I don't plan on making "all users" the default option.

      Fair enough.

      But I install all my software on windows via chocolatey, which does also include the magicsplat-tcl-tk package. Thankfully there is this package for chocolatey. I run choco from an Admin prompt and I always want to install the packages for all users (this is in fact the default behaviour for every chocolatey package that I have seen so far).
      The installer is then executed in the background, so I don't see it, but I think I can specify options for the msi with the "choco install ..." command. Do you know which option I must specify to get the "for all users" install with my favorite path?

       
  • Ashok P. Nadkarni

    From the elevated command line, the following will install for all users without showing any dialog:

    msiexec /i tcl-8.6.11-installer-1.11.2-x64.msi ALLUSERS=1 /passive
    

    The key is the ALLUSERS=1. The /passive means only a progress bar is shown. If you leave it out, you will get the full UI.

    This worked for me (installed to program files\Tcl86).

    However, I'm not familiar with chocolatey so don't know how to pass that ALLUSERS=1 option through it to msiexec. I'm sure there must be a way because sysadmins would need it.

    /Ashok

     
  • Ashok P. Nadkarni

    Note again that this must be done from the elevated command prompt.

     
  • EL

    EL - 2021-06-21

    Ah thank you :).
    The installation would still go to C:\Program Files\Tcl86, though. But I found a tool called "lessmsi" that displays all the properties of an MSI package and discovered that I can set the path with APPLICATIONFOLDER. So that line is now

    msiexec /i tcl-8.6.11-installer-1.11.2-x64.msi ALLUSERS=1 APPLICATIONFOLDER=C:\Progra~1\Tcl /passive
    

    And it works flawlessly.

    However, I'm not familiar with chocolatey so don't know how to pass that ALLUSERS=1 option through it to msiexec.

    There is an option, yes.. but I don't remember it. Instead I found out that the chocolatey package is maintained by a user chtof on github, I assume it's the chocolatey organization itself. I created a PR with the options here... to test it, I have built the package with that options locally and it works. Now it's up to them, whether they want to incorporate that change.

     
  • Ashok P. Nadkarni

    • status: open --> closed
     

Log in to post a comment.