Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Bat-cgi-sripts om a NT server

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
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…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

808 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