My Ventoy notes.
ventoy.json
file with the following code:
{ "menu_style": "tree" }
Current Issues
Instructions
Links
wimboot.img
to wimboot.iso
, use UltraISO to overwrite your boot.sdi
and save the wimboot.iso
file, then change wimboot.iso
to wimboot.img
bootmgr
in ventoy_wimboot.img
with bootmgr
in standard windows11.iso
and it's ok.ventoy.wimboot.img
updated by me as I shared here https://drive.google.com/file/d/1izQc322ZsE5InRSJaZ5CXatUlDUizcWH/view?usp=sharingbootmgr
in standard windows11.iso
from Microsoft bootmgr
must be capitalized as BOOTMGR
Ventoy Warning - Partition1 (exfat) is Not ntfs, the VHD(X) file may not boot normally
Windows Boot Manager - Boot from VHD
Windows Boot Manager - winload.exe missing
Rebuilding the Windows Search Index, which includes the Outlook Search, can resolve various issues:
There are several ways and places to view the search index properties and its progress in rebuilding. After you have wiped your index it is useful to see how things are going.
- Instructions from here: How to Enable or Disable Indexer Backoff in Windows | Windows 10 Forums
Disabling the indexer backoff will allow indexing to finish faster while you're active on the computer instead, but it will use more system resources.
gpedit.msc
On
(Default is Off
)Off
and restart the Windows Search service.
- This only applies if you have Microsoft Outlook the client installed on your PC
- Instructions from here: Outlook 2021 indexing not working - Microsoft Q&A
We need to ensure that Outlook is on the Windows Search Index
Outlook items are only indexed when Outlook is open
- I did not write this script
- Source: how to delete all exclude folders in search indexer and revert it to default? - Microsoft Q&A
- You can remove the bits from the script that you don't want to perform (Delete database | Reset Folder exclusions).
The following Powershell script fixes a lot of issue with the Windows search and is what I used.
# Stop Windows Search Service Stop-Service -Name WSearch # Delete the current search index database and configuration Remove-Item -Path "$env:ProgramData\Microsoft\Search\Data\Applications\Windows" -Recurse -Force Remove-Item -Path "$env:ProgramData\Microsoft\Search\Data\Temp" -Recurse -Force # Optional: Reset registry exclusions (set back to defaults) Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost" -Name "DefaultGatherPolicy" -ErrorAction SilentlyContinue Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost\Paths" -Recurse -Force -ErrorAction SilentlyContinue # Start Search Service Start-Service -Name WSearch
Notes
sc config wsearch start= disabled net stop wsearch REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb" /a del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.db" /a sc config wsearch start= delayed-auto net start wsearch :: reg query "HKLM\SOFTWARE\Microsoft\Windows Search\Gathering Manager" :: reg query "HKLM\SOFTWARE\Microsoft\Windows Search" reg query "HKLM\SOFTWARE\Microsoft\Windows Search\Gathering Manager" /v *path reg query "HKLM\SOFTWARE\Microsoft\Windows Search" /v *dir* reg query "HKLM\SYSTEM\CurrentControlSet\Services\WSearch" icacls %ProgramData%\Microsoft\Search\Data\ icacls %ProgramData%\Microsoft\Search\Data\Temp\ icacls %ProgramData%\Microsoft\Search\Data\Applications icacls %ProgramData%\Microsoft\Search\Data\Applications\Windows PAUSE PAUSE
msdt.exe -ep WindowsHelp id SearchDiagnostic
msdt.exe -ep WindowsHelp id SearchDiagnostic
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules\ and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost\Paths\
A collection of my FFmpeg notes
Getting the right version can be tricky unless you know what file to download and why, but that is easy to explain.
TL;DR
- Download the latest "Full" release build from: Release Builds - CODEX FFMPEG @ gyan.dev
- The binaries have everything they need compiled into them.
- The binaries are self contained.
In general, when you compile a binary, you may prefer to include its dependencies (Static) so that users don't need to search for external dlls aftermath, or try to use the executable with an incompatible version of the dll, but it means that the same dll will have to be present in all executables that need them, so that the whole software will use more room on the HD. Shared versions are likely to save some space, but I presume they are not significantly faster than others. It is useful just to explain the difference between the two compiling types.
.exe
(on Windows) or binary contains all libraries compiled inside it.ffmpeg.exe
..dll
(on Windows) or .so
(on Linux) library files.ffmpeg.exe
is smaller, but it requires those external files to run.ffmpeg.exe
alone to another PC — you also need all the matching DLLs.bin\
→ contains ffmpeg.exe
, ffplay.exe
, ffprobe.exe
, and .dll
files.lib\
→ contains development libraries (.a
, .lib
) for compiling against FFmpeg.include\
→ header files for developers.Full
" version.MKA
to FLAC
files, but keep the MKA container
mkvtoolnix
does not transcode..mka
file is FLAC audio, you can use ffmpeg
to copy the FLAC audio from the .mka
file into a FLAC container.
ffmpeg -i SOURCE.mka -codec:a copy DESTINATION.flac
ffmpeg
too but there'll be a conversion:
ffmpeg -i SOURCE.mka -codec:a flac DESTINATION.flac
You’ve got an AEA audio file (Sony ATRAC encapsulation, usually .aea
), and while VLC can play it, MKVToolNix won’t accept it — which strongly suggests that the container header is damaged or malformed, even if the raw audio stream is intact. Here are some free/open-source tools and workflows you can try to “repair” or rewrap it into something MKVToolNix will accept:
Try first a straight rewrap (no re-encoding):
ffmpeg -i input.aea -c copy output.wav
or
ffmpeg -i input.aea -c copy output.mka
If the header is corrupt, FFmpeg might still balk. In that case, force stream copy with re-indexing:
ffmpeg -err_detect ignore_err -i input.aea -c copy fixed.mka
If that still doesn’t work, do a lossless re-encode to WAV (PCM):
ffmpeg -i input.aea -c:a pcm_s16le output.wav
Once you have a WAV/FLAC/MKA, MKVToolNix should accept it.
sox input.aea output.wav
.aea
into Audacity (it uses FFmpeg under the hood), then export as WAV/FLAC.mkvmerge
(the CLI tool) can still handle.mkvmerge -o output.mkv --no-video input.aea
My recommendation: Start with FFmpeg (method 1). If -c copy
fails, re-encode to WAV/FLAC and then mux that into MKV. Do you want me to give you a one-liner FFmpeg command that will automatically fix/dump to WAV even if the header is bad, so you can drag it straight into MKVToolNix? you want to keep the original audio stream untouched (no re-encoding). That means we need to focus on remuxing/repairing the container only.
This is the safest first step:
ffmpeg -i input.aea -c copy output.mka
-c copy
= stream copy (no re-encoding).mka
(Matroska Audio) is usually well-accepted by MKVToolNix.If the header is damaged, you can try forcing FFmpeg to ignore errors:
ffmpeg -err_detect ignore_err -i input.aea -c copy fixed.mka
Even if MKVToolNix GUI rejects it, the CLI might succeed:
mkvmerge -o output.mka input.aea
or
mkvmerge -o output.mkv --no-video input.aea
If FFmpeg can demux the stream but not mux it properly, you could dump the raw stream first:
ffmpeg -i input.aea -c copy output.oma
(.oma
is another ATRAC container Sony used; Matroska often accepts it better.)
Then try adding output.oma
into MKVToolNix. If all copy-only methods fail, the problem may be that the damaged AEA header prevents FFmpeg from identifying the stream type. In that case, we’d need to manually specify the codec during remuxing (still without re-encoding). Do you want me to write you an FFmpeg command that forces the codec identification (e.g., ATRAC3/ATRAC9) so it can copy the stream even if the header is broken? Perfect ? If the AEA header is damaged, FFmpeg may fail to guess the codec, but you can force it to treat the stream as ATRAC and just remux without re-encoding.
Run:
ffmpeg -i input.aea
Stream #0:0: Audio: atrac3 (or atrac3plus / atrac9), 44100 Hz, stereo
Note the codec name (likely atrac3
or atrac3plus
).
Once you know the codec, run:
ffmpeg -f aea -i input.aea -c:a copy -map 0 output.mka
-f aea
→ forces FFmpeg to read as AEA format.-c:a copy
→ copies the stream without re-encoding.-map 0
→ ensures all streams are included.output.mka
→ Matroska Audio container, friendly for MKVToolNix.
You can force the codec by specifying it:
ffmpeg -f aea -i input.aea -c:a copy -acodec atrac3 fixed.mka
(or -acodec atrac3plus
depending on what you saw in step 1). This way, you keep the original audio untouched, just rewrapped into .mka
so MKVToolNix can accept it.
Do you want me to also show you how to probe the file with ffprobe to be 100% sure which ATRAC variant you’ve got before running the copy?
what is ffprobe ffprobe
is a companion tool to FFmpeg.
ffmpeg
converts or remuxes media,ffprobe
analyzes media and prints detailed info about streams, codecs, metadata, bitrates, etc.It’s included automatically when you install FFmpeg (same download).
ffprobe input.aea
You’ll see output something like:
Input #0, aea, from 'input.aea': Duration: 00:04:21.00, bitrate: 132 kb/s Stream #0:0: Audio: atrac3, 44100 Hz, stereo, fltp
That tells you:
aea
)atrac3
/ atrac3plus
/ atrac9
)Since your AEA header may be broken, ffmpeg -i input.aea
or ffprobe input.aea
will tell us:
.mka
Do you want me to give you a ready-to-run command that uses ffprobe
to print just the codec name (so you don’t have to scan through a big text output)? what is the difference between ffprobe and ffpmeg -i Great question ? — they look similar, but there are some important differences between ffmpeg -i
and ffprobe
:
ffmpeg -i input.ext
ffmpeg
is mainly a converter/remuxer.-i
, it:
Example:
ffmpeg -i input.aea
Output:
Input #0, aea, from 'input.aea': Duration: 00:04:21.00, bitrate: 132 kb/s Stream #0:0: Audio: atrac3, 44100 Hz, stereo, fltp
ffprobe input.ext
ffprobe
is dedicated to analysis only.ffmpeg -i
Example (human-readable):
ffprobe input.aea
Example (just codec name in JSON):
ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 input.aea
Output:
atrac3
In short:
ffmpeg -i
→ Quick check, human-readable, but “side effect” is that it looks like an error run.ffprobe
→ Purpose-built for inspecting files, can give clean codec info and more detailed technical metadata.
Convert AEA to FLAC from the wiki that the rest are based on
for f in *.aea; do ffmpeg -i "$f" -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "${f%.aea}.flac"; done
Your Linux command loops through all *.aea
files in the current folder and converts them to FLAC using ffmpeg
. On Windows (cmd.exe) you can write it like this:
for %%f in (*.aea) do ffmpeg -i "%%f" -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "%%~nf.flac"
Notes:
.bat
), keep the double %%f
.%f
:for %f in (*.aea) do ffmpeg -i "%f" -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "%~nf.flac"
Do you want me to also give you the PowerShell version (nicer syntax, supports Unicode filenames better), or will you run this in cmd.exe
? Here’s the PowerShell version of your loop:
Get-ChildItem *.aea | ForEach-Object { ffmpeg -i $_.FullName -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "$($_.BaseName).flac" }
Get-ChildItem *.aea
→ gets all .aea
files in the folder.$_
→ represents each file object.$.FullName
→ full path to the file.$.BaseName
→ filename without extension (so output becomes filename.flac
).⚡ Advantage: PowerShell handles spaces and special characters in filenames much more gracefully than cmd.exe
.
Do you want me to also make a ready-to-run .ps1
script that you can drop into your folder and double-click/run, or will you paste it directly into the PowerShell terminal?
Here’s a ready-to-run PowerShell script (batch file) you can save as Convert-AEA.ps1
in the same folder as your .aea
files:
# Convert-AEA.ps1 # Converts all .aea files in the current folder to FLAC (16-bit, 44.1kHz) # Get all .aea files in this folder Get-ChildItem -Filter *.aea | ForEach-Object { $inputFile = $_.FullName $outputFile = "$($_.BaseName).flac" Write-Host "Converting $($_.Name) -> $outputFile" ffmpeg -i "$inputFile" -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "$outputFile" }
Convert-AEA.ps1
in your folder with the .aea
files..ps1
, not .txt
.)Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
.\Convert-AEA.ps1
Same loop as the first script, just expanded with variables and messages so it’s easier to read and debug.
Got it ✅ Here’s the PowerShell script version (Batch file) that will scan the current folder and all subfolders for .aea
files, then convert them to .flac
while keeping the same folder structure:
# Convert-AEA.ps1 # Recursively converts all .aea files in this folder (and subfolders) to FLAC (16-bit, 44.1kHz) # Get all .aea files in this folder and subfolders Get-ChildItem -Filter *.aea -Recurse | ForEach-Object { $inputFile = $_.FullName $outputFile = Join-Path $_.DirectoryName "$($_.BaseName).flac" Write-Host "Converting $($_.FullName) -> $outputFile" ffmpeg -i "$inputFile" -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "$outputFile" }
-Recurse
makes PowerShell go into all subfolders.Join-Path $_.DirectoryName ...
ensures each .flac
lands in the same folder as the original .aea
file.music\track1.aea → music\track1.flac music\subfolder\track2.aea → music\subfolder\track2.flac
recursive one-liner (for pasting, and from above)
Get-ChildItem -Filter *.aea -Recurse | ForEach-Object { ffmpeg -i $_.FullName -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 "$($_.DirectoryName)\$($_.BaseName).flac" }
Difference from your original:
-Recurse
→ searches subfolders too."$($_.DirectoryName)\$($_.BaseName).flac"
→ makes sure the .flac
is written into the same folder as the source file (not all dumped into the top folder).recursive PowerShell one-liner that also skips files already converted:
Get-ChildItem -Filter *.aea -Recurse | ForEach-Object { $outFile = Join-Path $_.DirectoryName "$($_.BaseName).flac" if (-Not (Test-Path $outFile)) { ffmpeg -i $_.FullName -vn -hide_banner -c:a flac -sample_fmt s16 -ar 44100 $outFile } else { Write-Host "Skipping $($_.FullName) → already exists." } }
How it works:
Test-Path $outFile
→ checks if the .flac
already exists.ffmpeg
normally.
http://www.msftconnecttest.com/connecttest.txt
TL;DR
- Best solution if you want zero hassle: Disable NCSI probing (Method 5)
- The most reliable cross-platform trick is to assign a static IP configuration (with no gateway/DNS), so the OS doesn’t expect Internet routing from that Wi-Fi. That way it just treats it as a LAN.
netsh wlan set profileparameter name="YourSSID" connectionmode=auto netsh wlan set profileparameter name="YourSSID" nonBroadcast=connect(Replace
YourSSID
with the exact Wi-Fi name.)By default, Windows disconnects when a network has no valid gateway/internet. You can override that:
ncpa.cpl
, hit Enter.Optional: If you don’t need internet routing via this SSID (just local LAN), you can remove the Default Gateway entry in the IPv4 settings. That way, Windows won’t even expect internet, so it won’t try to drop it.
Some Wi-Fi drivers (Intel, Realtek, Killer, etc.) have a feature that disconnects from networks without internet:
There isn’t a simple toggle in Windows to say “stay connected no matter what”, but there are a few reliable workarounds:
This disables the Windows’ NCSI Internet connectivity check forcing Windows to always report “Connected” to your Wi-Fi, even if there’s no Internet so it will never get tagged as "Limited" and then be dropped. Windows will stop testing for internet access and this alone fixes the auto-disconnect in most cases.
regedit
, press Enter.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet
EnableActiveProbing
→ set to 0
(DWORD)Disable_NCSI.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet] "EnableActiveProbing"=dword:00000000
This makes Windows always report “Connected” regardless of Internet access.
Re-Enable_NCSI.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet] "EnableActiveProbing"=dword:00000001
Note: With NCSI disabled, Windows will always show “Connected” even if the network is offline. Apps that rely on NCSI (like the captive portal pop-up for hotel Wi-Fi) won’t launch automatically — you’ll need to open a browser manually in those cases.
If you want more control, a few small utilities exist that can “lock” Windows to a specific SSID:
These basically override Windows’ automatic “choose a better network” logic.
This method requires manual intervention but can be useful in some setups.
If you’re comfortable with PowerShell, you can make Windows automatically reconnect to your SSID even if it drops:
# Force Wi-Fi to stay connected to one SSID, even if disconnected $SSID = "YourSSID" while ($true) { $connected = (netsh wlan show interfaces) -match $SSID if (-not $connected) { netsh wlan connect name=$SSID } Start-Sleep -Seconds 10 }
YourSSID
with your exact Wi-Fi name (SSID).ForceWiFi.ps1
taskschd.msc
).Force Wi-Fi Stay Connected
powershell.exe
-ExecutionPolicy Bypass -File "C:\Path\To\ForceWiFi.ps1"
# Force Wi-Fi to stay connected to one SSID, even if disconnected $SSID = "YourSSID" # <-- Replace with your Wi-Fi name while ($true) { $connected = (netsh wlan show interfaces) -match $SSID if (-not $connected) { Write-Output "[$(Get-Date -Format 'HH:mm:ss')] Not connected. Reconnecting to $SSID..." netsh wlan connect name="$SSID" } else { Write-Output "[$(Get-Date -Format 'HH:mm:ss')] Still connected to $SSID." } Start-Sleep -Seconds 10 }
YourSSID
with your exact Wi-Fi name (SSID).I have added this here just in-case I need to come up with a more streamlined solution.
This script will
C:\ForceWiFi\ForceWiFi.ps1
.How to Use
ForceWiFiSetup.bat
(Save as type: All Files, not .txt
).C:\ForceWiFi\ForceWiFi.ps1
and change YourSSID
to your actual Wi-Fi name.After reboot:
Save this as ForceWiFiSetup.bat
(Right-click → Run as Administrator):
@echo off :: ===================================== :: Force Windows to stay connected to one SSID :: ===================================== :: --- Create folder for script mkdir "C:\ForceWiFi" >nul 2>&1 :: --- Create the PowerShell script echo # Force Wi-Fi to stay connected to one SSID, even if disconnected > C:\ForceWiFi\ForceWiFi.ps1 echo $SSID = "YourSSID" # <-- Replace with your Wi-Fi name >> C:\ForceWiFi\ForceWiFi.ps1 echo while ($true) { >> C:\ForceWiFi\ForceWiFi.ps1 echo $connected = (netsh wlan show interfaces) -match $SSID >> C:\ForceWiFi\ForceWiFi.ps1 echo if (-not $connected) { >> C:\ForceWiFi\ForceWiFi.ps1 echo Write-Output "[$(Get-Date -Format 'HH:mm:ss')] Not connected. Reconnecting to $SSID..." >> C:\ForceWiFi\ForceWiFi.ps1 echo netsh wlan connect name="$SSID" >> C:\ForceWiFi\ForceWiFi.ps1 echo } else { >> C:\ForceWiFi\ForceWiFi.ps1 echo Write-Output "[$(Get-Date -Format 'HH:mm:ss')] Still connected to $SSID." >> C:\ForceWiFi\ForceWiFi.ps1 echo } >> C:\ForceWiFi\ForceWiFi.ps1 echo Start-Sleep -Seconds 10 >> C:\ForceWiFi\ForceWiFi.ps1 echo } >> C:\ForceWiFi\ForceWiFi.ps1 :: --- Disable NCSI Active Probing in registry reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v EnableActiveProbing /t REG_DWORD /d 0 /f :: --- Register scheduled task schtasks /create /tn "ForceWiFiStayConnected" /tr "powershell.exe -ExecutionPolicy Bypass -File C:\ForceWiFi\ForceWiFi.ps1" /sc onlogon /rl highest /f echo. echo ===================================== echo Setup complete! echo - Replace YourSSID in C:\ForceWiFi\ForceWiFi.ps1 with your Wi-Fi name echo - Restart your computer for registry change to take effect echo ===================================== pause
Save this as ForceWiFiRemove.bat
(Right-click → Run as Administrator):
@echo off :: ===================================== :: Remove ForceWiFi setup (script + registry + scheduled task) :: ===================================== :: --- Delete the PowerShell script folder if exist "C:\ForceWiFi" ( rmdir /s /q "C:\ForceWiFi" echo Removed C:\ForceWiFi folder. ) else ( echo No C:\ForceWiFi folder found. ) :: --- Re-enable NCSI Active Probing reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v EnableActiveProbing /t REG_DWORD /d 1 /f echo Re-enabled Windows Internet connectivity check (NCSI). :: --- Delete scheduled task schtasks /delete /tn "ForceWiFiStayConnected" /f echo Removed scheduled task ForceWiFiStayConnected. echo. echo ===================================== echo Cleanup complete! echo - NCSI probing restored echo - Scheduled task removed echo - Script folder deleted echo ===================================== pause
To check how many PCIe lanes your NVMe drive is using in Windows use the following apps to get the information.
How to use:
Transfer Mode: PCIe 3.0 x4 | PCIe 3.0 x4
How to use:
The drive information in this tool is just information read from the tool, it does not have current lane, just information read from the firmware.
How to use:
Interface: PCIe Gen 4.0 x4
This will cover a lot of topics to do with ISO and burning.
.vhd
/.vhdx
images just like it can open .iso
images."Bootable_NoEmulation.img"
.Bootable_NoEmulation.img
to BOOTSECT.BIN
"C:\WINPE"
BOOTSECT.BIN
in the folder "C:\WINPE\I386"
.7z e isofile.iso '[BOOT]'
.BIF
from an existing Bootable ISO and use that..iso
that I could use with Ventoy directly.boot.wim
file to the Ventoy USB disk and boot to the boot.wim
directly from Ventoy - no need to make an ISO. You will need to add Wimboot Plugin too.oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\iso_files\boot\etfsboot.com#pEF,e,bd:\iso_files\efi\microsoft\boot\efisys.bin d:\iso_files d:\14986PROx64.iso becomes oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bE:\boot\etfsboot.com#pEF,e,bE:\efi\microsoft\boot\efisys.bin E:\ C:\users\myname\myiso.iso You can create a one line batch file to do above.
sudo mkisofs -o /path/to/image. iso /dev/sdb
Boot.wim
from the folder DiskGenius - Boot
(and optionally rename the file to something like, e.g., DiskGenius 5.5.1.1508 x64.wim
to make it easier for you to see what exactly this one is) to the root of the VENTOY partition that's on your USB flash drive. Aside from this, you also need to make sure that you have installed the Wimboot plugin for Ventoy before you boot from the USB flash drive. (For this, you need to create a new folder named ventoy
in the root of the VENTOY partition, and then copy the file ventoy_wimboot.img
into this folder like has been explained here.)
0x55AA
)BOOTMGR
BOOTMGR
) is the bootloader provided by Microsoft for Windows NT versions starting with Windows Vista and Windows Server 2008. It is the first program launched by the BIOS or UEFI of the computer and is responsible for loading the rest of Windows. It replaced the NTLDR present in older versions of Windows.BOOTMGR
on either the system or the boot partition), accesses the Boot Configuration Data store and uses the information to load the operating system through winload.exe
or winresume.exe
on BIOS systems, and winload.efi
and winresume.efi
on UEFI systems.bootmgfw.efi
from an EFI system partition at startup, starting the Windows Boot Manager.BOOTMGR
/ VBR) from the active paritition.\windows\system32\winload.exe \windows\system32\boot\winload.exe
\EFI\Microsoft\Boot\bootmgfw.efi
\windows\system32\winload.efi \windows\system32\boot\winload.efi
Links
USB drives:
Some BIOSes have a feature where a USB drive can be:
dd
..ima
, is also used to refer to floppy disk image files by some programs. A variant of raw image, called IMZ
, consists of a gzipped version of a raw floppy disk image. These files use the .imz
file extension, and are commonly found in compressed images of floppy disks created by WinImage..img
file extension for a raw image of a hard disk drive and calls the format "raw".There will be cross over between software functionality and their category.
VBoxManage convertfromraw source.img output.vdi --format VDI
qemu-img convert -f raw -O vhdx source.img output.vhdx
Convert-VHD –Path c:\VM\my-vhdx.vhdx –DestinationPath c:\New-VM\new-vhdx.vhdx –VHDType Dynamic
## Fixed --> Dynamic Convert-VHD -Path "D:\Path\To\Fixed-Disk.vhd" -DestinationPath "D:\Path\To\Dynamic-Disk.vhd" -VHDType Dynamic ## Dynamic --> Fixed (For Reference Only) Convert-VHD -Path "D:\Path\To\Disk-dynamic.vhd" -DestinationPath "D:\Path\To\Disk-trimmed-fixed.vhd" -VHDType Fixed
Optimize-VHD -Path "Path\To\Your\VHDfile.vhdx" -Mode Full
diskpart
elect vdisk file="<path>"
attach vdisk readonly
compact vdisk
detach vdisk
.vhd
as a .img
). .vhd
that was created by Rufus as a DD image.dd
(At least the Linux version of dd
doesn't care much if you try to write more data that the drive can hold - it'll report it, but it will not have any kind of impact on the data written), leaving you with a 1:1 copy of the original drive. .vhd
exactly as you would use a standard DD image. There REALLY is no "What if...?" or "But surely..." associated to using an uncompressed .vhd
as you would a DD image..vhdx
format. But:
Get-VHD -Path "C:\path\to\your.vhdx"
vhdxinfo mydisk.vhdx
type: fixed
or type: dynamic
explicitly.New-VHD -Path "C:\fixed-compliant.vhdx" -SizeBytes 10GB -Fixed
dd
or xcopy
to clone contents to the new disk.## Mount WIM DISM /Mount-Wim /WimFile:"d:\boot.wim" /index:1 /MountDir:"d:\chicken" ## Make changes # Unmount WIM (Discarding Changes): DISM /unmount-wim /MountDir:"d:\chicken" /discard # Unmount WIM (Keeping Changes): DISM /unmount-wim /MountDir:"d:\chicken" /commit
osfdisk
.vmdk
image filesVMware Workstation vmware-mount.exe X: “C:\Temp\TestVM.vmdk”
select vdisk file=""
compact vdisk
Optimize-VHD -Path .ext4.vhdx full
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser iwr -useb https://raw.githubusercontent.com/okibcn/wslcompact/main/setup | iex
wslcompact -c ubuntu
Remove-Item "$($env:PSModulePath.split(';')[0])/WslCompact" -Recurse -Force
Open Powershell and run the following: wsl --shutdown diskpart select vdisk file="path-to-your-virtual-disk\ext4.vhdx" attach vdisk readonly compact vdisk detach vdisk exit
## Convert VBoxManage clonemedium disk --format VDI [drive]:[\path_to_file\sourceFile.vmdk] [drive]:[\path-to\destinationFile.vdi] ## Compact VBoxManage modifyhd --compact "[drive]:\[path_to_image_file]\[name_of_image_file].vdi"
VBoxManage modifyhd "[drive]:\[path_to_image_file]\[name_of_image_file].vdi" --resize 81920
VBoxManage internalcommands createrawvmdk
command in VirtualBox allows you to create a virtual disk that maps to a physical disk or partition. This is useful for accessing a physical disk directly from a virtual machine.VBoxManage internalcommands createrawvmdk -filename "C:\path\to\file.vmdk" -rawdisk \\.\PhysicalDrive0
.vmdk
file that represents the physical disk PhysicalDrive0
/dev/sda
on a Linux host:
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5
.vmdk
file that provides access to partitions 1 and 5 of /dev/sda
\\.\PhysicalDrive0
for Windows, /dev/sda
for Linux).VBoxManage internalcommands createrawvmdk
, you can effectively utilize physical disks within your VirtualBox VMs, providing flexibility and direct access to hardware resources.vboxManage internalcommands createrawvmdk -filename "C:\Users\Public\Documents\VirtualBox\Raw Disk Images\spinrite.vmdk" -rawdisk "\\.\PhysicalDrive2" vboxManage internalcommands createrawvmdk -filename "C:\rawdisks\spinrite.vmdk" -rawdisk "\\.\PhysicalDrive2"
Get-VHD -Path "C:\path\to\your.vhdx"
sudo apt install libvhdi-utils
brew install libvhdi
vhdxinfo yourfile.vhdx
00000000 76 68 64 78 66 69 6c 65 # "vhdxfile"
0x20000
, which lists metadata regions.Get-VM | Where { $\_.State -eq 'Off' } | Get-VMHardDiskDrive | Optimize-VHD -Mode Full
Instructions
VHD and VHDX are interchangeable for these commands.
Mount-VHD -Path "D:\Path\To\Fixed-Disk.vhdx" -ReadOnly Or Mount through the GUI (Disk Management, Right Click)
-ReadOnly
: This should protect the volume being written to by the OS, but not this command. I am not 100% on this.sdelete64.exe -z X:
X:
with the drive letter assigned to the mounted VHD.z
: This flag instructs ‘sdelete’ to write zeros over the available free space, a less intensive option than multiple passes and suitable for non-critical data.Dismount-VHD -Path "D:\Path\To\Fixed-Disk.vhdx" Or Unmount through the GUI (Disk Management, Right Click)
Convert-VHD -Path "D:\Path\To\Fixed-Disk.vhd" -DestinationPath "D:\Path\To\Dynamic-Disk.vhd" -VHDType Dynamic
Optimize-VHD -Path "D:\Path\To\Dynamic-Disk.vhdx" -Mode Full
diskpart select vdisk file="D:\Path\To\Dynamic-Disk.vhdx" attach vdisk readonly compact vdisk detach vdisk exit
readonly
: This should protect the volume being written to by the OS, but not this command. I am not 100% on this.Optimize-Volume -DriveLetter YourDriveLetter -ReTrim -Verbose Optimize-Volume -DriveLetter E -ReTrim -Verbose
## Check TRIM Timer/Schedule Status: sudo systemctl status fstrim.timer ## Check TRIM Service Status: sudo systemctl status fstrim If TRIM is enabled, an operation will run at the next scheduled time. If TRIM is not enabled, you can ## Run a manual TRIM using: sudo fstrim -av ## Info It is recommended to enable automatic TRIM to ensure that data usage is reflected accurately between VergeOS and the guest OS. ## To enable automatic TRIM, run: sudo systemctl enable fstrim.timer
Is htis best ehre or antoher article
TL;DR = Might not be possible any more, and if it is, it is not worth the hassle.
My DiskGenius Notes
A
.DiskGenius supports to making a bootable USB version based on Windows PE so that you can recover lost data, manage disk or backup data when system cannot boot.
- When you create your USB drive I think the build process uses your PC for the drivers and the WinPE files, so the resulting data size on the USB drive will change depending on your system (Win10 = 1GB, Win11 = 2GB)
- I don't know if the DiskGenius USB drives are tied to the PC they were created on.
Although DiskGenius can use a USB drive in either the "Supper Floppy" (FDD) or Hard drive mode (HDD) it is easier to work with a HDD version where it has an MBR and Partition table like a traditional hard drive.
When you format a USB drive in Windows the "Super Floppy" format is used by default. I am not sure what happens when you use Windows to format a USB drive taht has a partition table, perhaps ot leaves it alone.
Non bootable
MBR
BIOS or UEFI
DISKGENIUS
(or whatever you want)FAT32
Default
(this might vary depending on the size of the USB drive)This is non-destructive process, so if there were files on the USB before, they should still be there after the creation of the WinPE environment.
- I would recommend getting a 2GB USB drive to keep the image size down and reduce the number of steps required.
- (Win10 WinPE = 550mb)
- (Win11 WinPe = 1GB+)
- The size difference between the images created by these formats is minimal.
FIXEDSIZE-DiskGenius v6.0.1.1645.vhdx
DiskGenius v6.0.1.1645.vhdx
to your ventoy images partition.diskmgmt.msc
C:\Users\quantunwarp\Desktop\DiskGenius v6.0.1.1645.vhdx
2GB
VHDX
Dynamically expanding (Recommended)
Initialise Disk
MBR
partition styleFAT32
Default
Disk Genius
DiskGenius v6.0.1.1645.vhdx
to your ventoy images partition.With the disk images being so small, this step is not really needed. I have kept it here for reference even thought I did not have much success with it.
select vdisk file="<PathToYourDesktop>\DiskGenius v6.0.1.1645.vhdx"
sdelete
to zero out unused space on the image's volume<PathToYourDesktop>\DiskGenius v6.0.1.1645.vhdx
- This only works when using EFI/UEFI boot environments.
- If you try and boot the WIM when using MBR/CSM/Legacy, it will start to load and then a black screen will overlay the Ventoy loader and it will crash.
...\DiskGenius - Boot\boot.wim
boot.wim
to something human readable like DiskGenius v6.0.1.1645.wim
DiskGenius v6.0.1.1645.vhdx
to your ventoy images partition.
- This is a very trick and time consuming option and is not really needed
- Try and find and ISO already done, and then use this.
method 1 get a windows disk and swap out the contents, keeping the boot sector
DiskGenius v6.0.1.1645.iso
to your ventoy images partition.There are a couple of methods outlined below.
diskpart list disk select disk # detail disk
Microsoft DiskPart version 10.0.26100.1150 Copyright (C) Microsoft Corporation. On computer: WIN11PC DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 1863 GB 4096 KB * Disk 1 Online 7651 MB 0 B DISKPART> select disk 1 Disk 1 is now the selected disk. DISKPART> detail disk General USB Flash Disk USB Device Disk ID: 6F20736B Type : USB Status : Online Path : 0 Target : 0 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 5 E PICTURES FAT32 Removable 7651 MB Healthy DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- * Partition 1 Primary 14 GB 0 B DISKPART> select partition 1 There is no partition selected. DISKPART>
There is no partition selected.
, indicating it has an error accessing the partition table, which do not exist on "Super Floppy" USB drives.
- TL;DR this error is caused by the source USB formatted as a "Super Floppy"
- Starwind P2V does not support "Super Floppy" for live copying as it expects a partition table.
- A USB drive can be formatted as a traditional hard drive (HDD) or in a "Super Floppy" format akin to a traditional floppy disk (FDD).
- "Super Floppy" does not have a MBR or a Partition Table which is what Starwind is looking for when copying from the mounted Disk image.
- Starwind wiil not present/see Removable Media disks or their Volumes, only hard disks. This is intentianal by the software developers.
Log File
7/21 16:24:49.493 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: SetDllDirectory: C:\Program Files\StarWind V2V Converter\lib 7/21 16:24:49.493 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: File Version: 9.0.1.757 7/21 16:24:49.508 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: Load language IDR_XML_ENGLISH 7/21 16:24:49.508 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: Set current language English 7/21 16:24:49.508 2b68 Facility ???INFO: CPS_V2V_Converter::CPS_V2V_Converter: Version MajorVersion 10, MinorVersion 0, BuildNumber 19045 7/21 16:24:49.508 2b68 Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\Windows\system32\wbem\wmiutils.dll - 94cb0000 7/21 16:24:49.508 2b68 Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\Windows\system32\wbem\wmiutils.dll - 94cb0000 7/21 16:24:53.723 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eSynchronization 7/21 16:24:57.926 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eAzureConnectionTo 7/21 16:25:06.162 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eLocationTo 7/21 16:25:09.053 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eFormat 7/21 16:25:12.381 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eOptionsHyperV 7/21 16:25:17.914 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eConverting 7/21 16:25:43.043 2b68 Facility ???INFO: CPPOutputFile::onNext: Out path: C:\Users\quantumwarp\Desktop\DiskGenius-Dynamic.vhdx, Out format 11 7/21 16:25:43.043 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eHYPERVConnectionTo 7/21 16:25:43.043 1788 Facility ???INFO: CPPConverting::Convert: InConvertType: 2, OutConvertType: 4 7/21 16:25:43.043 1788 Facility ???INFO: CPPConverting::ConvertDisks: pathInput: 1, pathOutput: C:\Users\quantumwarp\Desktop\DiskGenius-Dynamic.vhdx 7/21 16:25:43.043 1788 Facility ???INFO: P2V::CreateInputImage: path 1 7/21 16:25:43.043 1788 Facility ???INFO: P2V::CreateInputImage: Size 1 - 15518924800, BytesPerSector - 512 7/21 16:25:48.090 1788 Facility ???INFO: CPPConverting::ConvertDisks: CreateInputImage: 0 7/21 16:25:48.090 1788 Facility ???INFO: CPPConverting::ConvertDisks: CreateOutputImage: 0 7/21 16:25:48.090 1788 Facility ???ERROR: CPPConverting::ConvertImage: Read 3 7/21 16:32:00.054 1788 Facility ???ERROR: CPPConverting::ConvertDisks: ConvertImage - 2 7/21 16:32:00.054 1788 Facility ???ERROR: CPPConverting::Convert: FAILED
Log Explained
Here's what the log tells us:
9.0.1.757
- This is a relatively recent version, so it's unlikely to be a bug in an old release.InConvertType: 2
- This indicates a Physical Disk source.OutConvertType: 4
- This indicates a Hyper-V (VHDX) destination.pathInput: 1
and Size 1 - 15518924800, BytesPerSector - 512
pathInput: 1
likely refers to the "Disk 1" as seen by Windows Disk Management. This corresponds to the virtual disk presented by OSFMount.15,518,924,800 bytes
(approx 14.45 GB) and BytesPerSector - 512
are correctly identified by the converter from the virtual disk.CPPConverting::ConvertDisks: CreateInputImage: 0
- This line means StarWind successfully initialized the connection to the source disk.CPPConverting::ConvertDisks: CreateOutputImage: 0
- This line means StarWind successfully initialized the connection to the destination VHDX file.CPPConverting::ConvertImage: Read 3
- This is the critical error. It happens immediately after the input and output images are created, right at the point where StarWind tries to read the actual data from the source disk. This confirms a low-level read error from the OSFMounted virtual disk.ConvertImage - 2, FAILED
) are a direct consequence of this initial read failure.10/21 12:55:57.929 2764 Facility ???WARNING: P2V::getBuffer: ReadFile - 23. Data error (cyclic redundancy check). 10/21 12:55:57.929 2764 Facility ???ERROR: CPPConverting::ConvertImage: Read 3 10/21 13:03:16.650 2764 Facility ???ERROR: CPPConverting::Convert: FAILED
After in-depth research I can clarify the error is not cause by:
boot.wim
there is no difference (Win10 = 550mb)(Win11 = 1GB).What I have tried
- Always use Dynamic/Growable disk image files where possible to keep space used down.
- Always use MBR/HDD style formatting on your USB drives where possible.
- TL;DR = UEFI GOP (Graphics Output Protocol) sets the screen resolution before WinPE when using EFI on my lenovo (resolution seems to be set at 800x600 and cannot be changed)
- Solution = Boot in legacy mode and then change the resolution in DiskGenius if needed: View --> Set screen resolution (Options: 1920x1080, 1024x768). This was on my Lenovo laptop.
- Notes
- Using a different boot loader like Grub which can be used to see what resolutions the GOP provides.
- My Lenovo on EFI returns a resolution of 800x600 but when I use CSM/Legacy I get 1024x768 and 1920x1080 which I can then swap between with the DiskGenius menu in the WinPE environment.
- For most users on modern UEFI systems — the hard limit is 1024x768.
- Some people say showing the boot logo helps increase screen resolution (not tested).
- DiskGenius resolution in the BCD is 1024x768
- Resolutions available will vary from PC to PC, Laptop to Laptop, and can also vary depending on the the boot method (Legacy BIOS / UEFI) used.
In the WinPE environment created by DiskGenius, you can change the screen resolution according to the following, if your hardware supports it.
When trying to change the resolution of my screen when using DiskGenius on my Lenonvo laptop.
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Display> <ColorDepth>32</ColorDepth> <HorizontalResolution>1920</HorizontalResolution> <RefreshRate>60</RefreshRate> <VerticalResolution>1080</VerticalResolution> </Display> </component> </settings> </unattend>
X:\bcdedit /store D:\boot\BCD /set {globalsettings} graphicsresolution 1280x1024
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "800x600" bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1024x768"
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1280x768" bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1280x1024"
graphicsresolution
is backed by the boot graphics adapter using VESA BIOS Extensions (VBE) or UEFI GOP (Graphics Output Protocol).bcdedit.exe /set {globalsettings} graphicsresolution 800x600 bcdedit.exe /set {globalsettings} graphicsresolution 1024x600 bcdedit.exe /set {globalsettings} graphicsresolution 1024x768
C:\windows\system32>bcdedit.exe /set {globalsettings} graphicsresolution 1920x1080 The integer data is not valid as specified. Run "bcdedit /?" for command line assistance. The parameter is incorrect.
bcdedit.exe /set {globalsettings} highestmode on
graphicsmode --info
command on the GRUB4UEFI commandline.boot.wim
file.ventoy.json
for persistent settings).QRes.exe /x:800 /y:600
nircmd.exe setdisplay 1024 768 24
bcdedit /deletevalue "{globalsettings}" highestmode reboot
This is just a temporary article for these notes, I might move them.
/var/lib/mysql/server.quantumwarp.com.err
^(?!.*\[ERROR\] mariadbd: Table).*\r?\n
.*\[ERROR\] mariadbd: Table '\.
' is marked as crashed and should be repaired$
Throughout these examples I have used the regex
YourCodeHere
to and you should change this to match your needs
Find: ^.*YourCodeHere(.*) Replace: YourCodeHere\1
$
your content
Notes
A couple of methods to identify lines and delete them.
.*YourCodeHere.*\n .*YourCodeHere.*\r?\n
Notes
\n
if straight from your Linux box, but you might just want to check this as it could be \r\n
YourCodeHere
should be swapped for something on each of the lines you want to delete.A couple of methods to identify lines and delete all the others.
^(?!.*YourCodeHere).*\r?\n ^(?!.*YourCodeHere).*\R # When this is used, blank lines are left ^((?!YourCodeHere).)*$
YourCodeHere # This will allow marking of all lines not containing [ERROR] ^((?!YourCodeHere).)*$
Find: ^.*YourCodeHere Replace: YourCodeHere or Find: ^.*?YourCodeHere Replace: YourCodeHere
A collection of hints and tips of this topic.
Notepad++ supports showing newlines as CR/LF/CRLF
but does not support showing newlines as ↵
, however you can simulate it:
?
operator after a quantifier. See the example below:
<h1 style="color: red">Hello</h1> <h1.*?> - This will match <h1 style="color: red"> <h1.*> - This will match <h1 style="color: red">Hello</h1>
a[^c]+c
a
, followed by one or more character that isn't c
, followed by c
. This will match abc
and adc
.Now Notepad++ will recognise .tpl files as PHP files. When you open the next one, it will contain syntax highlighting.
- I am using the Fira Code here for this example but this will apply to all fonts where this occurs
- The EOL character is shown when using the DejaVu Mono font.
- The question mark character is shown is when the required glyph does not exist in the current font.
- When copying text, the glyph references are copied not the characters, so if a character does not show correctly in one application this does not mean this will be the same in another.
The issue you're encountering is due to the Fira Code font not supporting the ↵
character (Unicode U+21B5: "DOWNWARDS ARROW WITH CORNER LEFTWARDS").
!=
into a neat symbol), but it has a more limited set of Unicode glyphs compared to DejaVu Mono.↵
, so Notepad++ shows a replacement character (typically a question mark or a box), indicating a missing glyph.↩
, ↓
, or ⏎
), though it’s not the same.You can test if Fira Code supports a character by:
VS Code and Notepad++ handle fonts very differently, particularly when it comes to missing glyphs:
App | Font Used | ↵ Glyph Supported by Font? | Font Fallback? | Result |
---|---|---|---|---|
VS Code | Fira Code | ❌ | ✅ Yes | ✔️ Displays ↵ |
Notepad++ | Fira Code | ❌ | ❌ No | ❌ Question mark |
Using the regex below and Notepad++ remove the tag data and then remove unwanted paragraphs in list items allowing for correctly formatted information in my articles.
TL;DR
All the methods work but if in doubt use these:
- Remove <article> & </article> tags
- Remove unwanted tag data: Method 2
- Remove Nested <p>...</p>: Method 1
These regex simply removed unwanted style and data-start=""
and data-end=""
meta values from all html elements (eg: <ul data-start="1463" data-end="1764">
--> <ul>
)
Find what: ( data-start="[0-9]+"| data-end="[0-9]+") Replace with:
Find what: <([a-z0-9]+).*?( ?/)?> Replace with: <\1\2>
Find what: <(h1|h2|h3|h4|h5|h6|pr?e?|br|hr|ul|ol|li|strong|code|em){1}.*?( ?/)?> Replace with: <\1\2>
Find what: (<li>[\s\S]*?)<p>([\s\S]*?)</p>([\s\S]*?</li>) Replace with: \1\2\3
Explanation of the Regex
Make sure you have Regular expression selected in the "Search Mode" area of the Find and Replace dialog.
Find What: (<li>[\s\S]*?)<p>(.*?)<\/p>(?=[\s\S]*?<\/li>) Replace with: $1$2
Explanation of the Regex
This regex uses a combination of capturing groups and a positive lookahead to find and replace all instances within a single pass.
When you use $1$2 in the "Replace with" field, Notepad++ will replace the entire matched string with the content of the first and second capturing groups, effectively removing the <p> tags while preserving their content and the surrounding li structure.
Important: Make sure Regular expression is selected in the Search Mode section of the Find and Replace dialog. You may also need to check the . matches newline box.
## Remove the first nested <p> Find what : <li>[\r?\n?]+<p> Replace With: <li> ## Remove the last nested</p> Find what : </p>[\r?\n?]+</li> Replace With: </li> ## Remove the first pair of nested <p>...</p> Find what : <li>\s*(?:<p>(.*?)</p>\s*)+</li> Replace With: <li>\1</li>
## Remove all <article> Find what : <article.*> Replace With: ## Remove all </article> Find what : </article> Replace With: