Solved

Bat-cgi-sripts om a NT server

Posted on 1997-03-08
1
289 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

785 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