Solved Windows 11 Notepad now automatically saving plaintext versions of encrypted text files


Boyd851

Member
Local time
9:17 AM
Posts
6
OS
Windows 11
I keep a RAR encrypted version of my Passwords.txt file. I don't ever save its plaintext version. However I've discovered that the new automatic save feature of the new tabbed version of Notepad does just that, which of course I don't want. Specifically what happened was that I decrypted my passwords file and its plaintext opened in Notepad by default as usual. When I had finished working with it I closed Notepad (but not the tab). When I next opened Notepad I was astonished to discover the plaintext version of my passwords file available in a tab.

I can't find where Microsoft is storing this file so I can wipe delete it. I gather it's kept in the Temp folder of AppData/Local but I couldn't find it. Anyone help?

In general what is the best way to cope with this extraordinary unwanted behaviour? I may have to switch my default text editor away from Notepad, though I've been using Notepad since the beginning of Windows.

I would like to see the Microsoft engineer responsible for this let go.
 
Windows Build/Version
Verion 22H2 (OS Build 22621.2283)

My Computer

System One

  • OS
    Windows 11
See if this helps. Also, I can only guess that it would just be a temp file.



 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 1 x 24" LG M38H 1 x 32" LF6300 TV Monitor 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    2 x WD something Something 8TB HDD's / 2 x WD something Something 4TB HDD's / 1 x EVO 1TB SSD / 2 x QVO 1TB SSD's / 1 x EVO 250 GB SSD / 2 x QVO 1TB (External Hub) / 1 x EVO 1TB (Portable Backup Case)
    PSU
    Silverstone 1500
    Case
    NZXT Full Tower
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 22621.2215
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Graphics processor is an Intel Iris Xe
    Sound Card
    optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
See if this helps. Also, I can only guess that it would just be a temp file.



Thanks so much for this. Problem solved, though I'm still uneasy there's a plaintext version of that file floating away somewhere in my system. I did wipe-delete the entire AppData\Local\Temp folder so hopefully that's sorted. Thanks again. Really appreciated.
 

My Computer

System One

  • OS
    Windows 11
Thanks so much for this. Problem solved, though I'm still uneasy there's a plaintext version of that file floating away somewhere in my system. I did wipe-delete the entire AppData\Local\Temp folder so hopefully that's sorted. Thanks again. Really appreciated.

You’re welcome. Really, it’s @Brink who needs to be thanked. His tutorials are often life saving (y)
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 1 x 24" LG M38H 1 x 32" LF6300 TV Monitor 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    2 x WD something Something 8TB HDD's / 2 x WD something Something 4TB HDD's / 1 x EVO 1TB SSD / 2 x QVO 1TB SSD's / 1 x EVO 250 GB SSD / 2 x QVO 1TB (External Hub) / 1 x EVO 1TB (Portable Backup Case)
    PSU
    Silverstone 1500
    Case
    NZXT Full Tower
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 22621.2215
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Graphics processor is an Intel Iris Xe
    Sound Card
    optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
Regarding the original file you were worried about.
If notepad was saving it as the “last entry” If it ever happens again, delete all the content and replace it with gibberish. That way, on next opening of notepad, the gibberish would of been saved and the original text overridden?
Or, save the text file, close it. Delete the txt file, it shouldn’t come back as a saved state.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 1 x 24" LG M38H 1 x 32" LF6300 TV Monitor 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    2 x WD something Something 8TB HDD's / 2 x WD something Something 4TB HDD's / 1 x EVO 1TB SSD / 2 x QVO 1TB SSD's / 1 x EVO 250 GB SSD / 2 x QVO 1TB (External Hub) / 1 x EVO 1TB (Portable Backup Case)
    PSU
    Silverstone 1500
    Case
    NZXT Full Tower
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 22621.2215
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Graphics processor is an Intel Iris Xe
    Sound Card
    optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
Regarding the original file you were worried about.
If notepad was saving it as the “last entry” If it ever happens again, delete all the content and replace it with gibberish. That way, on next opening of notepad, the gibberish would of been saved and the original text overridden?
Or, save the text file, close it. Delete the txt file, it shouldn’t come back as a saved state.
Yes, I'll do that next time as standard practice. Excellent tip. Something I tried was uninstalling new Notepad and restoring the classic Notepad.exe, which can still be found in the Windows folder as default. But Windows 11 won't let let you set classic Notepad as default even after you have uninstalled new Notepad. Thanks again.
 

My Computer

System One

  • OS
    Windows 11
If in the near future the exact store location of the automatic saved notepad is known, please mention it here. Because I have the same experience, not knowing that autosave function was enabled initially. For me it means, somewhere scattered on my harddrive is a temporary Bitlocker restore key in plain text. I have deleted all temp directories mentionned in the posts above, but still Notepad is somehow able to restore my Bitlocker keys upon restart of Notepad. I use Veracrypt (encrypted volume) as the store location, but Notepad still recovers the TXT somehow after locking the Veracrypt volume. Very dangerous.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sharkoon SGC1 - RGB
    CPU
    Intel® Core™ i9-10940X - 14 Cores
    Motherboard
    Asus Prime X299-A II
    Memory
    Kingston HyperX Fury RGB 64GB DDR4-3200
    Graphics Card(s)
    NVIDIA RTX 3060 Ti 8GB
    Monitor(s) Displays
    LG Ultra HD
    Screen Resolution
    3840 x 2160
    Hard Drives
    SSD 4000GB Samsung 870 QVO SSD 500GB Crucial MX500 PSSD 2T Samsung T7 SCSI
    PSU
    850W Cooler Master
    Case
    Sharkoon SGC1 - RGB
    Cooling
    Cooler Master H412R
    Keyboard
    Corsair Vengeance-K70-RGB
    Mouse
    CONTUS Gaming Mouse
    Internet Speed
    200 Mbit/s
    Browser
    Chrome
    Antivirus
    Windows Defender
Update: I found the location by asking ChatGPT. I checked and the information is legit.
C:\Users\<YourUsername>\AppData\Local\Packages\Microsoft.Windows.Notepad_8wekyb3d8bbwe\LocalState\TabState
In the above directory (insert your own username) a .binfile is created, which contain the plain text of the autosave file.
You can delete the contents of this directory. I hope some other users find information useful.
Update2: I detected that the bin-file in the TabState directory will be automatically deleted by the app if you select the Notepad setting to "When notepad starts do open a new window" instead of "open the previous session". So the developers had some sense of security in mind.

1697653098360.png
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sharkoon SGC1 - RGB
    CPU
    Intel® Core™ i9-10940X - 14 Cores
    Motherboard
    Asus Prime X299-A II
    Memory
    Kingston HyperX Fury RGB 64GB DDR4-3200
    Graphics Card(s)
    NVIDIA RTX 3060 Ti 8GB
    Monitor(s) Displays
    LG Ultra HD
    Screen Resolution
    3840 x 2160
    Hard Drives
    SSD 4000GB Samsung 870 QVO SSD 500GB Crucial MX500 PSSD 2T Samsung T7 SCSI
    PSU
    850W Cooler Master
    Case
    Sharkoon SGC1 - RGB
    Cooling
    Cooler Master H412R
    Keyboard
    Corsair Vengeance-K70-RGB
    Mouse
    CONTUS Gaming Mouse
    Internet Speed
    200 Mbit/s
    Browser
    Chrome
    Antivirus
    Windows Defender
I keep a RAR encrypted version of my Passwords.txt file. I don't ever save its plaintext version. However I've discovered that the new automatic save feature of the new tabbed version of Notepad does just that, which of course I don't want. Specifically what happened was that I decrypted my passwords file and its plaintext opened in Notepad by default as usual. When I had finished working with it I closed Notepad (but not the tab). When I next opened Notepad I was astonished to discover the plaintext version of my passwords file available in a tab.

How are you getting the plaintext version into Notepad? I use WinRAR, and I don't see how to get the plaintext version of a file out of an encrypted archive except to extract it to disk. If you use WinRAR's internal viewer, it extracts it to the temp folder, and in typical sloppy fashion, doesn't delete it when you exit the program. If you do delete it, you need to use a secure method to prevent someone recovering it using special software, and I don't think that necessarily works if you're using an SSD.

So, two things, with the second being the more pertinent:

1. Must you use Notepad? Notepad++ is infinitely better. The portable version goes in my C:\bin on every computer. There are instructions here on replacing Notepad:


2. Must you use an ad hoc method of storing passwords that relies on multiple pieces of software not designed for that purpose? Software like Keepass is free and open source and allows you to use local storage. There are compatible versions for iOS and Android that also allow you to use local storage on those devices. This class of software at least thinks about minimizing data leakage, while the new Notepad does not, nor does the internal viewer for WinRAR.

If in the near future the exact store location of the automatic saved notepad is known, please mention it here. Because I have the same experience, not knowing that autosave function was enabled initially. For me it means, somewhere scattered on my harddrive is a temporary Bitlocker restore key in plain text. I have deleted all temp directories mentionned in the posts above, but still Notepad is somehow able to restore my Bitlocker keys upon restart of Notepad. I use Veracrypt (encrypted volume) as the store location, but Notepad still recovers the TXT somehow after locking the Veracrypt volume. Very dangerous.

No idea what the new Notepad is doing, but my suggestion going forward is to avoid potential problems like that as described above. FWIW, all my drives are Bitlockered, and I store my keys in plaintext on them, so I wouldn't care about your particular data leak. I take that back. My Aegis Secure Keys I use as USB key drives are not Bitlockered, but they're protected with a 10 digit passcode and AES-256, so same difference.
 

My Computer

System One

  • OS
    Windows 11
Update: I found the location by asking ChatGPT. I checked and the information is legit.
C:\Users\<YourUsername>\AppData\Local\Packages\Microsoft.Windows.Notepad_8wekyb3d8bbwe\LocalState\TabState
In the above directory (insert your own username) a .binfile is created, which contain the plain text of the autosave file.
You can delete the contents of this directory. I hope some other users find information useful.
Update2: I detected that the bin-file in the TabState directory will be automatically deleted by the app if you select the Notepad setting to "When notepad starts do open a new window" instead of "open the previous session". So the developers had some sense of security in mind.

View attachment 74651
Many thanks for this. Amazing that we have to use ChatGPT to pin down the location. I checked your info and it's accurate. MIcrosoft really should warn us about this. Notwithstanding the stirctures in the next post I bet there loads of users blithely using WinRar to encrypt text files in Notepad quite unaware that its default behaviour is now to store updates in internal storage. Very dangerous as you say.
 

My Computer

System One

  • OS
    Windows 11
How are you getting the plaintext version into Notepad? I use WinRAR, and I don't see how to get the plaintext version of a file out of an encrypted archive except to extract it to disk. If you use WinRAR's internal viewer, it extracts it to the temp folder, and in typical sloppy fashion, doesn't delete it when you exit the program. If you do delete it, you need to use a secure method to prevent someone recovering it using special software, and I don't think that necessarily works if you're using an SSD.

So, two things, with the second being the more pertinent:

1. Must you use Notepad? Notepad++ is infinitely better. The portable version goes in my C:\bin on every computer. There are instructions here on replacing Notepad:


2. Must you use an ad hoc method of storing passwords that relies on multiple pieces of software not designed for that purpose? Software like Keepass is free and open source and allows you to use local storage. There are compatible versions for iOS and Android that also allow you to use local storage on those devices. This class of software at least thinks about minimizing data leakage, while the new Notepad does not, nor does the internal viewer for WinRAR.



No idea what the new Notepad is doing, but my suggestion going forward is to avoid potential problems like that as described above. FWIW, all my drives are Bitlockered, and I store my keys in plaintext on them, so I wouldn't care about your particular data leak. I take that back. My Aegis Secure Keys I use as USB key drives are not Bitlockered, but they're protected with a 10 digit passcode and AES-256, so same difference.

Many thanks for this. Apreciated.

I've used my Passwords.txt file for the past ten years, before I think these password maintenance programs were developed. Notepad++ is now the default in Windows 11. You can uninstall it and endeavour to use classic Notepad (which isn't tabbed and autosaved in the way Notepad++ now is) and which can still be found in Windows, but Windows 11 won't let you set up a file association for classic Notepad which makes the endeavour not very viable.

Regarding WinRar's View facilty, I do use this when I merely want to view a password, but when I want to edit the file I naturally have to extract it to an editor, but without saving to disk of course. It's precisely because Notepad++ is now autosaving to disk that the problem arises. I wasn't aware WinRar extracted its View file to a temp folder and will have to check that out, and that would be right about the problem of secure deleting it. A similar problem arises when you download a file to (say) the Downloads folder. When you move this file to its final destination it is in fact copying it over and deleting (but now secure deleting) the original file in the Downloads folder. The WinRar shell allows you to move with wiping.

I don't have any massively sensitive files such as say personal diaries and the like. But it's clear that opening such files in Notepad++ is now not a very secure option without careful preparation.
 

My Computer

System One

  • OS
    Windows 11
Many thanks for this. Apreciated.

I've used my Passwords.txt file for the past ten years, before I think these password maintenance programs were developed. Notepad++ is now the default in Windows 11. You can uninstall it and endeavour to use classic Notepad (which isn't tabbed and autosaved in the way Notepad++ now is) and which can still be found in Windows, but Windows 11 won't let you set up a file association for classic Notepad which makes the endeavour not very viable.

Regarding WinRar's View facilty, I do use this when I merely want to view a password, but when I want to edit the file I naturally have to extract it to an editor, but without saving to disk of course. It's precisely because Notepad++ is now autosaving to disk that the problem arises. I wasn't aware WinRar extracted its View file to a temp folder and will have to check that out, and that would be right about the problem of secure deleting it. A similar problem arises when you download a file to (say) the Downloads folder. When you move this file to its final destination it is in fact copying it over and deleting (but now secure deleting) the original file in the Downloads folder. The WinRar shell allows you to move with wiping.

I don't have any massively sensitive files such as say personal diaries and the like. But it's clear that opening such files in Notepad++ is now not a very secure option without careful preparation.

I found this about WinRar's temp files noting an option to secure delete them when closing WinRar Does WinRAR leave traces of temporarily extracted files?.
 

My Computer

System One

  • OS
    Windows 11
With 7-zip there is a box to tick to remove original file on compressing/password protecting. With Notepad, if it's set to default setting, if you close the tab/s rather than using the close button (X) then it's not saved.
 

My Computers

System One System Two

  • OS
    Win 11 Pro & 🐥.
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    Samsung SSD 970 EVO Plus 2TB NVMe 1.3
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER NITRO
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    32 GB DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    Samsung 970 Evo Plus 2TB NVMe M.2
    PSU
    180 Watt, 19.5 V
    Mouse
    Lenovo Bluetooth
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
Many thanks for this. Apreciated.

I've used my Passwords.txt file for the past ten years, before I think these password maintenance programs were developed. Notepad++ is now the default in Windows 11. You can uninstall it and endeavour to use classic Notepad (which isn't tabbed and autosaved in the way Notepad++ now is) and which can still be found in Windows, but Windows 11 won't let you set up a file association for classic Notepad which makes the endeavour not very viable.

The password manager I mentioned, KeePass, has been around since at least 2004, which is when I started using it.

The editor I mentioned, Notepad++, is a totally different program than Microsoft's Notepad, and far superior to it in every way. Here's a link to its home page:


Regarding WinRar's View facilty, I do use this when I merely want to view a password, but when I want to edit the file I naturally have to extract it to an editor, but without saving to disk of course.

See, I don't know how you "extract it to an editor, but without saving to disk". If you're talking about drag and drop from WinRAR to an editor or double-clicking a file in WinRAR, it's still extracting it to the temp folder.

I found this about WinRar's temp files noting an option to secure delete them when closing WinRar Does WinRAR leave traces of temporarily extracted files?.

Thanks, I didn't know about that option. However, reading the comments at the page you linked, it appears WinRAR doesn't delete these temporary files if you close WinRAR while you have them open in certain other programs like Word. This sort of order dependence is an accident waiting to happen, so I would still recommend migrating to a dedicated password manager program. Again, I like KeePass because it can be used solely with local storage on my Windows, iOS, and Android devices, and I've been using it for 20 years without ever having any desire to switch.
 

My Computer

System One

  • OS
    Windows 11
I wanted to make sure to register on this site just so I could post a comment that says... Another instance of Microsoft improving things without thinking through how it actually doesn't improve things. Like my missing window edges, and inability to Cascade Windows, and the removal of the simple Save As dialog, and the disappearance of traditional control panels, and... Well, those come to mind off the top of my head.


"I know that this is an old thread, but I want to reply to it anyway."
 

My Computer

System One

  • OS
    Windows
    Computer type
    Laptop

Latest Support Threads

Back
Top Bottom