Menu

plugin location

Franco
2007-05-11
2012-11-14
  • Franco

    Franco - 2007-05-11

    In my opinion there should be a provision to load additional plugins located in the %APPDATA%\Notepad++\plugins directory for people that keep the setting files there.

    This would simplify porting the entire set of settings from one machine to another... by just copying/moving the %APPDATA%\Notepad++ directory.

    Moreover, different users may want to have different sets of plugins... besides the basic set.

     
    • Don HO

      Don HO - 2007-05-12

      > In my opinion there should be a provision to load additional plugins located in the
      > %APPDATA%\Notepad++\plugins\ directory for people that keep the setting files there.

      It's a good idea.
      Don't forget if "doLocalConf.xml" is present in Notepad++ installed directory,
      then the settings file should be in Notepad++\plugins\Config\
      Otherwise it'll be in %APPDATA%\Notepad++\plugins\Config\

      > Moreover, different users may want to have different sets of plugins...
      > besides the basic set. 

      Why not?
      In this case, it depends always on the absence of "doLocalConf.xml", in oder to trigger the loading of *.dll in %APPDATA%\Notepad++\plugins\ directory.

      I'll consider it.

      Don

       
      • Don HO

        Don HO - 2007-05-12

        >> Moreover, different users may want to have different sets of plugins... 
        >> besides the basic set. 

        > In this case, it depends always on the absence of "doLocalConf.xml",
        > in oder to trigger the loading of *.dll in %APPDATA%\Notepad++\plugins\ directory.

        FYI : implemented. It'll be in v4.1.1

        Don

         
    • Franco

      Franco - 2007-05-12

      I check for the presence of "doLocalConf.xml" and save the settings in "Notepad++\plugins\Config\" if present.
      However, if it is not present, I'm saving the settings directly in "%APPDATA%\Notepad++\" and not in "%APPDATA%\Notepad++\plugins\Config\"
      I had the impression that all other plugin were doing that.

      If the "doLocalConf.xml" exists, all the plugins must be in the program folder for portability.
      If the "doLocalConf.xml" does not exist, I was actually suggesting to still load core plugins installed in "Notepad++\plugins\" but also add plugins in "%APPDATA%\Notepad++\plugins\" so that everybody may have a basic set of plugin and then each user may add his own stuff.

      It would also be nice to have NPPM to get the plugin folder and plugin config folder so to have a more reliable way to manage that in case there will be changes in the future. It would be much more clean.

      Another general question... for plugin settings.
      Settings to carry from one session to another should be saved in file only when NPP exist or immediately upon changing the setting?
      Both have advantages and disadvantages... what is the policy?

       
      • Don HO

        Don HO - 2007-05-12

        > However, if it is not present, I'm saving the settings directly in "%APPDATA%\Notepad++\"
        > and not in "%APPDATA%\Notepad++\plugins\Config\"

        You can create the folder if the folder is not present.

        > I had the impression that all other plugin were doing that.

        Yes, indeed.
        But the cleaner way is to save at least in %APPDATA%\Notepad++\plugins\ folder.

        > If the "doLocalConf.xml" exists,
        > all the plugins must be in the program folder for portability.
        > If the "doLocalConf.xml" does not exist,
        > I was actually suggesting to still load core plugins installed in "Notepad++\plugins\"
        > but also add plugins in "%APPDATA%\Notepad++\plugins\"
        > so that everybody may have a basic set of plugin and then each user may add his own stuff.

        That's exactly what I've done in v4.1.1

        > It would also be nice to have NPPM
        > to get the plugin folder and plugin config folder
        > so to have a more reliable way
        > to manage that in case there will be changes in the future.
        > It would be much more clean.

        Good suggestion! This message will be available in v4.1.1 as well :
        void NPPM_GETPLUGINSCONFIGDIR(int strLen, char *str)

        > Settings to carry from one session to another should be saved in file
        > only when NPP exist or immediately upon changing the setting?
        > Both have advantages and disadvantages... what is the policy?

        Personally, I keep all the settings in memory, then I write once before exiting.
        But it'll be your call since Notepad++ has no way to impose this constrainte to its pluins.

        Don

         
  • Timo Pietilä

    Timo Pietilä - 2010-12-09

    This seems to be a bit old, but I got an impression about this conversation that plugins can be installed in %APPDATA%\notepad++\plugins. That doesn't seem to be the case in any of the NP++ installations I have this far seen, only plugin configs go there.

    If it is possible, then can someone explain me how. Should I just copy the plugin .dll:s there manually? Plugin manager at least seem to use %programfiles%\notepad++\plugins -folder, so is this just lack of feature in plugin manager?

     
  • Dave Brotherstone

    No, it's not possible at the moment.  It was briefly discussed not too long ago, but there are a number of security concerns with it.  It's not difficult to implement, but the security side of it is tricky - such that it cannot be enabled by accident, in order to load and execute a DLL from a location the user (and therefore a malicious process) has write access to.

    Cheers,
    Dave.

     
  • Timo Pietilä

    Timo Pietilä - 2010-12-09

    Wouldn't that executed malicious .dll execute in user rights in user context, therefore be about as harmless as malicious code can be? What exactly was the risk preventing installing plugins there? If there is malicious code already in computer then it is too late, and if it isn't there how could installing plugins there be any risk?