Deleting and recreating the swap file is a really bad idea for reasons in comments.
Here follows an insane idea that would work if you pulled it off.
1) Create Permanent Swap File; ensure its contiguous. This is best done with a disk editor to ensure you also align on a cylinder boundary. Thankfully defrag.exe is sane enough to not move the windows swap file.
2) Create overlapping primary partition so that it aligns with the the swap file. I will now assume that this ends up on
D:; replace script references as necessary
3) Add lines to autoexec.bat:
FORMAT D: /Q < Y.CHR > NUL
3) Make C:\WINDOWS\TEMP if it doesn't already exist
4) Rename win.com to runwin.com
5) Create win.bat as follows
subst D: C:\WINDOWS
subst D: /D
FORMAT D: /Q < C:\Y.CHR > NUL
6) Create Y.CHR
echo Y> C:\Y.CHR
The subst command can be used to mask off drives you don't want to be able to access. I've done this in the past when I had two paths to the same disk so I got two drive letters for it, and drove
Does it work? Yes. Are you going to regret it if you ever reconfigure your windows swap file again? Yes.