Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Colorado, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Running a DOS Command in VBS via an HTML Form

    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.

  2. #2
    New Lounger
    Join Date
    May 2001
    Location
    New York City, NY
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running a DOS Command in VBS via an HTML Form

    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

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Colorado, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running a DOS Command in VBS via an HTML Form

    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.

  4. #4
    New Lounger
    Join Date
    May 2001
    Location
    New York City, NY
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Running a DOS Command in VBS via an HTML Form

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

    http://msdn.microsoft.com/library/psdk/she...v/ObjectMap.htm">Object Map</a>. 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •