• Running a DOS Command in VBS via an HTML Form

    Home » Forums » Developers, developers, developers » Web design and development » Running a DOS Command in VBS via an HTML Form

    • This topic has 3 replies, 2 voices, and was last updated 24 years ago.
    Author
    Topic
    #356171

    I have a VBS script that i wrote a while ago that uses the wscript object to run dos commands (an interface to an old application). In the process it asks a series of questions in a rather cumbersome way. I decided that a form style interface would be better so I put together a form in Frontpage and inserted my script, modifying it to run inside the form. The problem is that now all the wscript references don’t work. The bottom line is that I need to issue these DOS commands from the script that runs under this page. Is this possible? If so, how do I go about it?

    I will be the first to admit that I know just enough about VBS to get into trouble, so forgive me if I’m asking a seemingly stupid question.

    Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #526716

      Without knowing more about your script, I suspect that the security features of HTML are overriding your wscript. It would be very dangerous, wouldn’t it, if you could bring up an HTML page and have it muck around in DOS? I could be wrong, but I don’t think this is possible. If you let us know what you’re up to, though, there may be other alternatives.

      Stan Scott
      New York City

      • #526763

        First off, this is running on a classified system so there is no connection to the outside world. The situation is as follows:

        We run v3.2 of Rational Clearcase to maintain configuration control on the S/W we support. This version of ClearCase doesn’t expose itself to the OS, like the Office suite for example, but it has a very rich command line interface. My only access to it is to shell off DOS commands. I have a need to check out a group of 19 files, perform some manipulation on them and check them back in. I also need to provide a dialog or form for the user to give the app the info it needs to do it’s job.

        Now, if I had a VB compiler, this would be a simple thing, but the S/W we support is written in FORTRAN 77. I decided that I could use a VB Script, but by itself, all I have available for a user interface are message boxes and input boxes. This proved cumbersome, so I began studying the use of an HTML form to gather the user input. This worked great except that I can’t shell off the ClearCase checkout commands. This is where my question lies.

        Any help you can offer would be greatly appreciated.

        • #526769

          I think this example from the MSDN site will give you what you need:

          [url url=”Object Map. This page offers you a sample HTML page, with buttons that allow the user to open a folder, or run a program from the Run dialog, for example.

          For security reasons, though, the user has to have the switch to “Run ActiveXObjects Not Marked as Safe” on, which generally isn’t a good idea. In your situation, though, it should be okay.

          Stan Scott
          New York City

    Viewing 0 reply threads
    Reply To: Running a DOS Command in VBS via an HTML Form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: