From: "jlwpc1" <[EMAIL PROTECTED]>
Sent: Tuesday, September 11, 2001 10:47 AM
> From: "William A. Rowe, Jr." <[EMAIL PROTECTED]>
> Subject: [PATCH] Cleaning mod_cgi.c
>
> > This allows us (on win32) to rip all of that ScriptInterpreterSource cruft from
> > the core, and deposit it on ourself. It allows me to build a proper argv[],
> > from the registry, even if the association is as odd as
> > "%SystemRoot%\cscript.exe "%1" %* file://nologo" which is how bad things can get
> > around here ;)
> Why is the above "odd or bad'?
Just the syntax - args trailing %* (known to unix folk as $*), quoted %1 command, etc.
Quite different from the Unix #!script-cmd :)
> Have you used cscript.exe for Apache CGI yet?
Of course - the simplest way (if you don't trust the registry association for
security - which I don't) is to create a .wsh file in order to embed the shebang,
since #! would be an error to .vb or .js script files ...
-- script.wsh -------------------
#!CScript.exe "%1"
[ScriptFile]
Path=c:\web\cgi-bin\script.vb
[Options]
Timeout=10
DisplayLogo=0
BatchMode=1
-- end script.wsh ---------------
So yes - shebangs work even with cscript ;)