Community
    • Login

    How can I make Notepad++ generate the config.xml ?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.3k Views
    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.
    • Roy WisemanR
      Roy Wiseman
      last edited by Roy Wiseman

      I want to push Notepad++ to some systems in a non-standard folder. You’ve made this easy with the /s and /d options, and with the doLocalConf.xml zero-length file so that’s great. I can set all of that up nicely. However, Notepad++ does not generate a config.xml until after the first run, and this is a problem for me as I want to adjust Notepad++ to be in Dark Mode on each system.

      The following PowerShell code works perfectly but it cannot work until after the first run… I would greatly appreciate knowing if there is there a way to make Notepad++ generate a config.xml after I install it (ideally, without having to open Notepad++ first)?

      Alternatively (and maybe even better), is there a way that I can instruct Notepad++ to use Dark Mode and change other settings by default without having to reference the config.xml at all?

      $NotepadConfig = "D:\MyPortableApps\Notepad++"
      (Get-Content -path $NotepadConfig -Raw) -replace 'stylers.xml','themes\DarkModeDefault.xml' | Set-Content -Path $NotepadConfig
      (Get-Content -path $NotepadConfig -Raw) -replace '"DarkMode" enable="no"','"DarkMode" enable="yes"' | Set-Content -Path $NotepadConfig
      (Get-Content -path $NotepadConfig -Raw) -replace 'colorTone="0"','colorTone="32"' | Set-Content -Path $NotepadConfig
      
      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Roy Wiseman
        last edited by

        @Roy-Wiseman ,

        The installer might not create the config.xml until after the first run, but if you start from the portable zipfile instead, it comes with a prebuilt config.xml which you could edit after unzipping.

        Or if you want to use the installer, you could just make your own config.xml template from the source repo (or a one-time grab from the zip) then use that to populate the config.xml that you installed for the user

        Roy WisemanR 1 Reply Last reply Reply Quote 2
        • Roy WisemanR
          Roy Wiseman @PeterJones
          last edited by

          @PeterJones Thanks Peter, I can work with that - I think I’ll use the portable zip version then (strange that I didn’t notice this before, thanks!).

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors