Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: webbatch how it works
To use WebBatch you pretty much need to run your OWN web server with a direct connect to the Internet.
It should work on pretty much any web server running on Windows that supports Standard CGI scripting.
The purpose of WebBatch is to allow a WinBatch-looking script on the server side of an Internet connection to Interact with your Browser.
WebBatch is a special variant of WinBatch designed to work with Web Servers and execute scripts when users request certain web pages or fill out forms. WebBatch executes on the server side, not on the Client side where the user is sitting with the Browser.
When you set up Webbatch, read through the help file to see how to create a virtual directory under your web server that points to where Webbatch.exe is installed (usually in \Program Files\Webbatch). And when you set up your HTML, you need to locate that file in your /webcgi/ virtual directory on your web server.
Here's a sample html file:
<html> <head> <title>Test FTP</title> </head> <body link="#0000EE" vlink="#551A8B" alink="#FF0000" background="speckle.gif"> <h1>Testing Web Script...</h1> <FONT FACE="Tahoma"><FONT SIZE=+1> <p><A HREF="/webcgi/webbatch.exe?Test/hello.web">Test</a> </FONT> </BLOCKQUOTE> </body> </html>And here's a sample weber file for FTPing:
;**** HELLO.WEB ****** webout("Content-type:text/html", 2) webout("<html>",1) webout("<head>",1) webout("<title>Hello,world!</title>",1) webout("</head>",1) webout("<body>",1) webout("<Strong>FTP Download</Strong><BR>",1) ;***** form used to make selection from report list ********* WebOut('<FORM ACTION="/webcgi/webbatch.exe?Test/move2.web" METHOD=POST>',1) WebOut(`<Input TYPE="checkbox" NAME="tran" VALUE="Yes">`,1) WebOut(`Transaction Files<BR>`,1) WebOut(`<Input TYPE="checkbox" NAME="arch" VALUE="Yes">`,1) WebOut(`Archive Files<P>`,1) WebOut(`<Input TYPE="checkbox" NAME="rept" VALUE="Yes">`,1) WebOut(`Report Files<BR>`,1) WebOut(`<Input TYPE="checkbox" NAME="fina" VALUE="Yes">`,1) WebOut(`Financial Files<P>`,1) WebOut(`<Input TYPE="checkbox" NAME="acct" VALUE="Yes">`,1) WebOut(`Accounting Files<BR>`,1) WebOut(`<Input TYPE="checkbox" NAME="dail" VALUE="Yes">`,1) WebOut(`Daily Report Files<P>`,1) WebOut(`<Input TYPE="submit" VALUE="Start Download">`,1) WebOut(`<Input TYPE="reset" VALUE="Reset form"><P>`,1) WebOut(`</Form>`,1) webout("</body>",1) webout("</html>",1)which then launches:
; **** MOVE2.WEB ****** webout("Content-type:text/html", 2) webout("<html>",1) webout("<head>",1) webout("<title>Hello,world! Bye</title>",1) webout("</head>",1) webout("<body>",1) webout("<Strong>Start FTP Download</Strong><BR>",1) AddExtender("Wwwsk34I.dll") ftpfirewall(16,0,0,0,0) tran = WebParamData("tran") if tran == "Yes" Webout("Start! tran to Download<br>",1) else Webout("Stop! tran Download<br>",1) endif arch = WebParamData("arch") if arch == "Yes" Webout("Start! arch to Download<br>",1) else Webout("Stop! arch Download<br>",1) endif rept = WebParamData("rept") if rept == "Yes" Webout("Start! rept to Download<br>",1) else Webout("Stop! rept Download<br>",1) endif fina = WebParamData("fina") if fina == "Yes" Webout("Start! fina to Download<br>",1) else Webout("Stop! fina Download<br>",1) endif acct = WebParamData("acct") if acct == "Yes" Webout("Start! acct to Download<br>",1) else Webout("Stop! acct Download<br>",1) endif dail = WebParamData("dail") if dail == "Yes" Webout("Start! dail to Download<br>",1) else Webout("Stop! dail Download<br>",1) endif Webout("<br>AAA<br>",1) host="ftp.microsoft.com" userid="anonymous" pswd="support@windowware.com" acct="" Webout("<br>BBB<br>",1) hSession=ftpOpen(host,userid,pswd,acct,1) if !IsNumber(hSession) ;Message("FTP Open Error",hSession) exit endif Webout("<br)CCC<br>",1) webout("<br>Hsession %hSession%<br>",1) rs=ftpGet(hSession,"DISCLAIM.TXT","c:\temp\DISCLAIM.TXT","A") ftpClose(hSession) ;Message("ftpGet returned",rs) Webout("<br>%rs%<br>",1) webout("<Strong>End FTP Download Test</Strong><BR>",1) WebOut( '</body>', 1) WebOut( '</html>', 1)
We're using Webbatch on our Knowledgebase to output Tech Support Database pages, and on our Commerce Server to process orders.
Check out our WebBatch home page for further details.
[server path][wincgi URL path][WebBatch executable name]?[parameters]
http://webbatch.windowware.com/webcgi/webbatch.exe?dumpinputdata
http://webbatch.windowware.com/webcgi/webbatch.exe?starchk/starchk.web
When WebBatch prepares for execution it:
If a fully qualified path with drive letter is passed to WebBatch, WebBatch will look for the files at that location. If the path does not contain a drive letter, then WebBatch will look for a temp drive setting. Finally, if no temp drive was specified, WebBatch will look in the directory where the WebBatch executable resides.
Note: If the drive is not specified and the Netscape server software is in use, the temp directory may have to be set. The Temp directory is not a default setting but can be set in the registry. To define the Temp directory open the registry and add a new string value to the WEBBATCH section; Value Name = "tempdrive" and Data ="driveletter".
HKEY_LOCAL_MACHINE\SOFTWARE\Wilson WindowWare\Settings\WWW-PROD\WEBBATCH Name Data tempdrive K:
In Standard CGI, it accepts parameters from the end of the URL (specifically the items after the ? in the URL)
When WebBatch prepares for execution it:
The error log can be accessed through the special parameter DumpErrorLog, which formats the errors into an output file which can be viewed in a browser. In case DumpErrorLog is unable to generate an output file, the WEBBATCH.LOG file can opened in an editor as a text file.
The error log file (WEBBATCH.LOG) is written into the first of the following directories that are available.
If "outfile" is not specified, it defaults to "WEBBATCH.LCL" in the temp dir (same dir where WEBBATCH.LOG is writtten).
See Also: http://www.webbatch.com/webcgi/webbatch.exe?budu/weber.web+index.weber+about+null
Article ID: W12464
Filename: What is WebBatch and How Does It Work.txt
File Created: 2011:03:08:09:28:10
Last Updated: 2011:03:08:09:28:10