We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00ff26e commit 857e4f7Copy full SHA for 857e4f7
1 file changed
docs/cgi-examples/printenv.vbs
@@ -0,0 +1,24 @@
1
+'!c:/windows/system32/cscript -nologo
2
+'#
3
+'# printenv -- demo CGI program which just prints its environment
4
5
+Option Explicit
6
+
7
+Dim objShell, objArray, str, env
8
+Set objShell = CreateObject("WScript.Shell")
9
+Set objArray = CreateObject("System.Collections.ArrayList")
10
11
+Wscript.Echo "Content-type: text/plain; charset=iso-8859-1" & vbLF
12
+For Each str In objShell.Environment("PROCESS")
13
+ env = Split(str, "=", 2)
14
+ env(1) = Replace(env(1), vbLF, "\n")
15
+ objArray.Add env(0) & "=" & Chr(34) & env(1) & Chr(34)
16
+Next
17
+objArray.Sort()
18
+For Each str In objArray
19
+ WScript.Echo str
20
21
22
+'WScript.Echo ScriptEngine & " Version=" & ScriptEngineMajorVersion & "." & _
23
+' ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion
24
0 commit comments