Default "Edit script" does not work on Windows.
This line:
https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/src/common/DefaultOptions.h?ref_type=heads#L118
leads to a default command line notepad.exe '%s'
which does not work on Windows as Windows uses double quotation marks (").
It shall be changed to
"notepad.exe \"%s\"" ,