This script uses the Win32 FFI to set a Node.js as critical to the Windows system, meaning killing it becomes difficult, and eventually doing so will lead to a BSOD. After a lot of futile attempts using ChatGPT, I just decided to do it myself, although I did combine some of the AI-written code.
npm i ffi-napi
- Windows (would probably work on older versions way back to Windows 7, but not guaranteed)
Just run the script with Node.js, and enjoy!
Previous methods I tried to kill the process: