• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

[SU2014] Install location for "all users"

Scheduled Pinned Locked Moved Developers' Forum
9 Posts 3 Posters 479 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    tomasz
    last edited by 5 Mar 2014, 14:30

    Is there a location defined for an installation of a plugin for "all users" in Windows?

    Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

    1 Reply Last reply Reply Quote 0
    • T Offline
      tomasz
      last edited by 5 Mar 2014, 15:34

      "C:\ProgramData\SketchUp\SketchUp 2014\SketchUp\Plugins"

      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 5 Mar 2014, 16:56

        But that is a potentially restricted hidden folder and there is also no Plugins folder in it by default... BUT then there is still some misinformation in the v2014 documentation...

        If the C:/ProgramData../Plugins folder is made, then it will be added to the $LOAD_PATH and any Plugins in it auto-loaded at startup - BUT remember that the Preferences > Extensions > Installer always uses the User's Plugins folder.

        However, if you use the SketchUcation 'Archive Installer' or the AutoInstall button in the PluginStore dialog, and that C:/ProgramData../Plugins folder has been made, AND you have sufficient security permissions to write to that folder etc, then you will be prompted to choose which Plugins folder to install into [unlike the native version].

        The official recommendation is to normally use the standard User's ../AppData/../Plugins folder...
        I see little benefit in not using the readily available User's Plugins folder... unless you really want to share a set of Plugins between several users on a given computer, and you have robust management tools in place to make the necessary folder and install these Plugins yourself...

        If you use Fredo's AdditionalPluginsFolder tool you can add ANY folder to the $LOAD_PATH, in which case you could perhaps use a new Plugins folder added to:
        C:\Users\All Users\SketchUp\SketchUp 2014\SketchUp
        Where the security limitations might be less onerous...
        But "horses for courses"...

        TIG

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 5 Mar 2014, 20:40

          @tig said:

          If you use Fredo's AdditionalPluginsFolder tool you can add ANY folder to the $LOAD_PATH, in which case you could perhaps use a new Plugins folder added to:
          %(#004000)[C:\Users\All Users\SketchUp\SketchUp 2014\SketchUp]
          Where the security limitations might be less onerous...

          On Windows 6.0+ (Vista and later,)...
          %(#8000BF)[%AllUsersProfile%] (aka ENV["AllUsersProfile"] from Ruby) is simply an alias (or copy,) of %(#8000BF)[%ProgramData%] (aka ENV["ProgramData"] from Ruby.)

          .. meaning, that the directory named:
          %(#004000)[C:\Users\All Users\]
          ... exists on XP and earlier ONLY !!!

          ON Vista and later it is replaced by:
          %(#004000)[C:\ProgramData\]

          ❗

          So it would be safest (for cross-version compatibility,) to use ENV hash and an or conditional:
          progdata = ENV["AllUsersProfile"] || ENV["ProgramData"]
          if on the Windows platform (because it may be likely that the environment var %(#8000BF)[%AllUsersProfile%] may not be defined in future Windows versions.)

          💭

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 5 Mar 2014, 21:07

            @tig said:

            If the %(#004000)[C:/ProgramData../Plugins] folder is made, then it will be added to the $LOAD_PATH and any Plugins in it auto-loaded at startup...

            This leads to a question whether SketchUp will honor a symbolic link (ie, a Shortcut,) in the
            File.join(ENV["AllUsersProfile"],"SketchUp/SketchUp 2014/SketchUp") directory
            named "Plugins", that points at some other location?

            I just tried it.

            I made a new folder named:
            %(#004000)[C:/Users/Public/Public Plugins/]
            which should be accessible to all users on a (Windows 6+) computer.

            Then created a shortcut named "Plugins" in the folder:
            %(#004000)[C:/ProgramData/SketchUp/SketchUp 2014/SketchUp/]

            SketchUp 2014 DID NOT honor it, and DID NOT push the All users path into the $LOAD_PATH array, like it does if "Plugins" is a real directory.

            ❗

            It also should be noted that a user can override any shared plugin, by installing one of the same name into their user %(#8000BF)[%AppData%] path.

            This is as it should be. In an educational setting, a student may need to modify a plugin as part of their coursework. Or perhaps they just may want to tweak it according to their own desires.
            In any case, you do not want a student to change the shared edition.

            💭

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • T Offline
              tomasz
              last edited by 6 Mar 2014, 09:27

              Thank you for comments.

              I want an installer (exe) to install a plugin for all users. RBZ won't be used.
              I will provide un-installer so everything should be all right, since the plugin works fine in ProgramFiles folder in SU6-2013.

              Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 6 Mar 2014, 10:20

                So in your thinking - you check if C:/ProgramData/../Plugins exists.
                If not you make that folder, then you install your plugin into it.

                WARNING:
                If users do not currently use a 'shared' Plugins folder setup... and they install your Plugin, then you might 'annoy' them - because as result of your installation they'll now always have an additional folder to choose from when using either of the SketchUcation AutoInstallers, since the 'shared' one is now automatically added to the $LOAD_PATH 😒

                BUT if C:/ProgramData/../Plugins does not exists, could you not then offer the choice of installation destinations ?
                I.E. install into the standard User's Plugins [a path that's easily got] or make new the new 'shared' Plugins folder...
                At least that way the user is not unwittingly duped into changing the way his SketchUp v2014 is configured. 😕

                TIG

                1 Reply Last reply Reply Quote 0
                • T Offline
                  tomasz
                  last edited by 6 Mar 2014, 10:36

                  I don't see it as a big issue for the SketchUcation AutoInstallers.
                  The 'ProgramData' option is for a purpose, right?

                  I have a problem with getting CurrentUser folder path, because the installer has to have request elevated right upon start because of SU6-2013 users. This forces the plugin to be installed only for that particular admin user.

                  Additionally the installation for all users is a behavior that is expected, because it was this way in the past.

                  Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 6 Mar 2014, 11:05

                    There is no issue with SketchUcation's AutoInstallers !
                    IF there are additional folder-paths found in the $LOAD_PATH - either because Fredo's AdditionalPlugisnFolder tool has added them OR because the 'shared' C:/ProgramData../Plugins exists - then these locations are offered as alternative destinations for an SCF AutoInstall [with the User's Plugins folder as the first one listed] - unlike the native Preferences > Extensions > Install which is always into the User's Plugins folder.

                    To reiterate...

                    The C:/ProgramData../Plugins folder is for use when a computer is to use a 'shared' Plugin or Plugins. Such Plugins are then auto-loaded as SketchUp starts for every user on that computer.

                    The default installation location is into the User's Plugins folder - this means that each Plugin a user installs into that folder is only auto-loaded as SketchUp starts for that user.

                    Many users will not want or need a second 'shared' Plugins folder.
                    Even if there is more than one SketchUp user on that computer they may well prefer to keep their own 'User' Plugins separately.
                    Having a shared Plugins folder when it is not wanted/needed imposes unnecessary complexity on a user.

                    If your installer bulldozes across a user's current setup and creates a new 'shared' Plugins folder, then it stands to reason that they might not be happy about it.
                    Automatically creating it and changing things without asking is not a responsible approach [IMHO].
                    If that shared Plugins folder already exists then there is possibly not change to their arrangements... but even if the shared Plugins folder does already exist, then your automatic installation of things into it is contrary to the normal installation of Plugins, which always auto-install with Preferences > Extensions > Install into the User's Plugins folder, or with the SCF AutoInstallers you are given the choice of folder, defaulting to the User's Plugins folder.
                    After all, the user might not want to share your plugin will all of the other users on that computer: even if the shared Plugins folder is preexisting it is no indicator of the user's desires.
                    So I think your installer should offer two installation destinations:

                    1. User's Plugins folder

                    2. Shared Plugins folder

                    If the shared folder doesn't exist, then in fairness you ought to warn that creating a shared folder might affect some aspects of future installations...

                    This approach seems common-sense to me 😕
                    Why do you want to go against the tide ❓

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      7/9
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement