Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.2k Views 2 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.
    • Roy WisemanR Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors