Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Run a BAT file on a server?

i have a web page that has a button on it once the local user hits this button i want it to run a .bat file on my server

i cant seem to get this to work!

I can get the button to run a .bat file on the local machine but i need it to run a .bat file on my server!

Thanks

david

Update:

There wont be a problem with more than one user hitting the button...

I am using JavaScript or Jscript thanks

3 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Without knowing the code and possibly the scripting language in use, as well as several environmental factors, I can't give a firm answer. I can give you a few things to check based on a couple of assumptions.

    Assumptions:

    You're running Windows XP Some Flavor and some SP.

    [If this is wrong, then .bat files won't run. Use some other type of script. (Linux uses shell scripts).]

    You have a web server service actually installed on this in some directory.

    You have a web page that has this button on it that is *SUPPOSED* to run the *.bat file on the machine the page is served from.

    Things to check out:

    1). Write in a telltale line or two to add a few words to a text file behind the scenes so that you'll have a separate log of what is happening. It is possible that the batch file is actually running, with no place for the output to be going, so make a log file definite and dire.

    2). If the above isn't the problem, no logging appears, then you should check to be sure that all of the below are true>

    The file has permissions set so that it will execute.

    The file is in a directory that the web server expects to find

    scripts and such in and delivers input and / or commands to.

    The file is still running with those permissions when the

    machine is awakened by the web server.

    Check that the server is awakened by the web server.

    Double check any command that you're using to invoke it to be

    *SURE* it will invoke that way from a command line.

    3). Try searching on the web for other reasons and information about scripting a batch file for a web page. Something similar can be done under *nix, but this isn't *nix your running or it wouldn't be a .bat file your using;-) I've included one URL that may be a good place to look. They have all kinds of information and freeware goodies as well.

    I hope that you find the bug and squash it soon.

    Source(s): http://www.thefreecountry.com/ The twisted mind of me.
  • IT Pro
    Lv 6
    1 decade ago

    What server side scripting language are you using?

    The whole concept isn't the greatest way of doing things. What happens if several visitors at once hit the button?

  • 4 years ago

    Um, that would want to be antagonistic for your ISP words of provider, and also you would possibly want to get kicked off the web. So why no longer detect a diverse interest? one which truly does some thing effective?

Still have questions? Get your answers by asking now.