Solved

Bat-cgi-sripts om a NT server

Posted on 1997-03-08
1
287 Views
Last Modified: 2013-12-25
I have written some cgi scripts in java and need to call the interpeter and the class file from a bat-file.
Bat file : jview xxx  (where xxx = xxx.class).

The problem is that my Nt-web-server(IIS 2.0) will not run the bat-file. How do I fix the setup on the web server so it run's the files??

Or am I far from geting anything out from the scripts I've written??
0
Comment
Question by:esolem
1 Comment
 

Accepted Solution

by:
henryj earned 100 total points
ID: 1827491
Try this:

Use the registry editor to find:

HKEY_LOCAL_MACHINE
   SYSTEM
      CurrentControlSet
         Services
            W3SVC
               Parameters
                  ScriptMap

Using the Edit Menu choose New. On the pop up menu which appears choose String Value. A new line should appear highlighted in the
name column on the right hand side of the Registry Editor screen.

Type .bat (don't forget the '.') and press return.

Now highlight the .bat line which should be in your registry listing and double click it. You should get an Edit String
dialogue box. In the Value Data box add a few %s's with spaces
between them ie:  %s %s %s %s (however many you like). These
should allow you to pass parameters to your batch files.

Choose exit from the registry menu.

This *SHOULD* allow you to run .bat files as scripts on your
server. However, you should be careful:

1) Be very aware of the security implications and make sure
your /scripts directory is very secure from misuse.

2) Be aware of potential misuse of any parameters passed to
batch files (ie. if you have a batch file that deletes the
file passed to it as an argument be aware that people could
call it directly with *.* as the argument!!!).

3) I haven't tried this myself so I can't guarantee it works but I'm pretty certain it will as this is how you enable other scripting languages not supported by default.

4) You could probably achieve something similar by using perl
or another programming language and simply spawning your program
from the code...

Good luck!

henry

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now