An executable script file that runs on POSIX and Windows
0 cruft lines, 0 cruft chars, 2 infra. lines, 21 infra. chars, CRLF ok
:&lt;&lt;@goto:eof
@echo Hello Windows!
@goto:eof
echo &quot;Hello POSIX!&quot; #

Removed the other solution.
17 characters using exit /b from Digital Trauma's answer:
:&lt;&lt;@exit/b
@echo Hello Windows!
@exit/b
echo &quot;Hello POSIX!&quot; #