Notepad settings


tistou77

Well-known member
Member
VIP
Local time
12:38 AM
Posts
205
OS
Windows 11 Pro 25h2
Hello

It's possible to backup and restore Notepad settings ?
I saw a tutorial for backing up the files located in "AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\Settings" but it didn't work.

Thanks
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25h2
    Computer type
    PC/Desktop
    CPU
    Intel 10980XE
    Motherboard
    Asus Rampage VI Extreme Encore
    Memory
    G.Skill TridentZ Royale
    Graphics Card(s)
    EVGA RTX 2080Ti Hydro Copper
    Sound Card
    Asus
    Monitor(s) Displays
    Dell 27"
    Hard Drives
    Intel Optane P5801X
    Samsung 990 Pro
    PSU
    Seasonic Prime TX 1000W
    Case
    Lian Li A77F
    Cooling
    Watercooling
    Keyboard
    Logitech MX keys
    Mouse
    Logitech MX Master 3S
    Browser
    Edge Canary
    Antivirus
    Kaspersky
  • Operating System
    Windows 11 Pro 24h2
    Computer type
    Laptop
    Manufacturer/Model
    Asus Pro
UWP apps store their settings in an offline reg hive, under Settings\settings.dat.

Code:
copy %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\Settings\settings.dat settings.dat
del  %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\Settings\settings.dat
notepad

Code:
taskkill /f /im notepad.exe
copy settings.dat %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\Settings\settings.dat
notepad

The rules are:
- If you're installing Windows, you must wait until after the user's first-time logon because UWP apps need to be registered in the user's profile.
- The app must not be running, otherwise it has an exclusive lock on the settings.dat
 

My Computer

System One

  • OS
    Windows 7
%LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState

if you just copy that whole folder, it should back up the basic settings.

TabState contains open tabs and unsaved text
WindowState stores the layout position and size

just to cover these, plus what @garlin mentioned (folder-wise), here's a batch to copy the whole appdata folder to C:\temp

just make a .bat file with this in it to backup to C:\temp

Code:
@echo off
setlocal

set "backupDir=%SystemDrive%\temp"
set "sourceDir=%LocalAppData%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\"

if not exist "%backupDir%" (
    mkdir "%backupDir%"
)

xcopy "%sourceDir%\*" "%backupDir%\" /Y /I /Q

echo Notepad data backed up to: %backupDir%
pause
 

My Computer

System One

  • OS
    Windows 11 Pro
Thanks for help

The Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState directory is empty
I'm testing on a Windows that's already installed and it doesn't work with settings.dat

During some tests, I found a file (user.dat) that is modified every time the settings are changed. I'll test to see if it's the one

PS: I forgot to mention that it was Notepad without the tabs, surely for that
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25h2
    Computer type
    PC/Desktop
    CPU
    Intel 10980XE
    Motherboard
    Asus Rampage VI Extreme Encore
    Memory
    G.Skill TridentZ Royale
    Graphics Card(s)
    EVGA RTX 2080Ti Hydro Copper
    Sound Card
    Asus
    Monitor(s) Displays
    Dell 27"
    Hard Drives
    Intel Optane P5801X
    Samsung 990 Pro
    PSU
    Seasonic Prime TX 1000W
    Case
    Lian Li A77F
    Cooling
    Watercooling
    Keyboard
    Logitech MX keys
    Mouse
    Logitech MX Master 3S
    Browser
    Edge Canary
    Antivirus
    Kaspersky
  • Operating System
    Windows 11 Pro 24h2
    Computer type
    Laptop
    Manufacturer/Model
    Asus Pro
notepad classic and notepad are two completely separate apps/programs

classic notepad - you can backup word wrap, status bar and font settings:

HKEY_CURRENT_USER\Software\Microsoft\Notepad
 

My Computer

System One

  • OS
    Windows 11 Pro
No, Notepad App (11.2204.12.0) the version just before the one with the tabs
The one from W11 22h2, if I remember correctly
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25h2
    Computer type
    PC/Desktop
    CPU
    Intel 10980XE
    Motherboard
    Asus Rampage VI Extreme Encore
    Memory
    G.Skill TridentZ Royale
    Graphics Card(s)
    EVGA RTX 2080Ti Hydro Copper
    Sound Card
    Asus
    Monitor(s) Displays
    Dell 27"
    Hard Drives
    Intel Optane P5801X
    Samsung 990 Pro
    PSU
    Seasonic Prime TX 1000W
    Case
    Lian Li A77F
    Cooling
    Watercooling
    Keyboard
    Logitech MX keys
    Mouse
    Logitech MX Master 3S
    Browser
    Edge Canary
    Antivirus
    Kaspersky
  • Operating System
    Windows 11 Pro 24h2
    Computer type
    Laptop
    Manufacturer/Model
    Asus Pro
It's good, I found it, for the version without tabs,
It's user.dat file in %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\SystemAppData\Helium
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25h2
    Computer type
    PC/Desktop
    CPU
    Intel 10980XE
    Motherboard
    Asus Rampage VI Extreme Encore
    Memory
    G.Skill TridentZ Royale
    Graphics Card(s)
    EVGA RTX 2080Ti Hydro Copper
    Sound Card
    Asus
    Monitor(s) Displays
    Dell 27"
    Hard Drives
    Intel Optane P5801X
    Samsung 990 Pro
    PSU
    Seasonic Prime TX 1000W
    Case
    Lian Li A77F
    Cooling
    Watercooling
    Keyboard
    Logitech MX keys
    Mouse
    Logitech MX Master 3S
    Browser
    Edge Canary
    Antivirus
    Kaspersky
  • Operating System
    Windows 11 Pro 24h2
    Computer type
    Laptop
    Manufacturer/Model
    Asus Pro
Back
Top Bottom