How can I make Notepad++ generate the config.xml ?
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.xmlzero-length file so that’s great. I can set all of that up nicely. However, Notepad++ does not generate a
config.xmluntil 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.xmlafter 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
$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
The installer might not create the
config.xmluntil after the first run, but if you start from the portable zipfile instead, it comes with a prebuilt
config.xmlwhich you could edit after unzipping.
Or if you want to use the installer, you could just make your own
config.xmltemplate from the source repo (or a one-time grab from the zip) then use that to populate the
config.xmlthat you installed for the user
@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!).