Embeding DOS cmd.exe in a html window ?

Discussion in 'HTML' started by Mel, Apr 12, 2005.

  1. Mel

    Mel Guest

    if my server & browser are on the same WinDoze machine, is it possible to
    embed a cmd.exe window in HTML page ?

    stupid, but had to ask !!!

    example if possible would be grrrrrrrrrrrrrrrrrrrrrrrrrreat !
     
    Mel, Apr 12, 2005
    #1
    1. Advertising

  2. Mel wrote:

    > if my server & browser are on the same WinDoze machine, is it possible to
    > embed a cmd.exe window in HTML page ?


    I don't think that Microsoft provide an ActiveX control version of a command
    prompt, but one could be implemented (or done as a Java Applet, maybe even
    in Flash).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Apr 12, 2005
    #2
    1. Advertising

  3. Mel

    SpaceGirl Guest

    David Dorward wrote:
    > Mel wrote:
    >
    >
    >>if my server & browser are on the same WinDoze machine, is it possible to
    >>embed a cmd.exe window in HTML page ?

    >
    >
    > I don't think that Microsoft provide an ActiveX control version of a command
    > prompt, but one could be implemented (or done as a Java Applet, maybe even
    > in Flash).
    >


    Not in Flash... it has no access to your computer, other than the Flash
    sandbox. Just like JavaScript, it cannot see beyond the boundaries of
    its own container (either a Browser or a stand-alone FlashPlayer).
    Neither have access to the file system, so could not run a program.

    "Proper" Java would be one way of doing it, but then that relies on the
    user having Java installed (and the trend is fewer and fewer users with
    it installed).
     
    SpaceGirl, Apr 13, 2005
    #3
  4. Mel

    Csaba Gabor Guest

    Shooting from the hip...
    If I were to try to embed a cmd.exe window in an HTML page, my approach
    would be to simulate it. Specifically, I would make a VBScript app
    (say HTMLcmd.vbs) which would start up an instance of IE and go to
    the page that has the embedding simulator (or alternately, have the
    HTMLcmd.vbs monitor instances of IE for this page). Once the user
    (me) is at this page, I would have the HTMLcmd.vbs bring up a DOS box
    (cmd window) and size it (I'm assuming that can be done programatically -
    never tried) to the desired size (perhaps there is a DIV or something
    on the page which should 'contain' it, so I would examine the DOM to
    find the appropriate size. Or if that doesn't work, size the DIV/page
    to the DOS box). Then I would position the DOS box to the appropriate
    place on the page. Once nice thing about this approach is that you
    don't have to worry so much about security restrictions (except with
    cross domain I/Frames, which are (needlessly, considering the user
    started VBScript app is doing the accessing) VERY pesky to bypass).

    At this point there are two ways to go. If you position the DOS box
    over the web page, you effectively have two distinct apps. You could
    monitor the position/size of each through the HTMLcmd.vbs, but
    keystrokes and mouse going to the cmd prompt are way hard for the web
    page to intercept, I would expect. Plus you have (depending on your
    sense of aesthetics) a title bar and border that you can't do very
    much about. This route is not particularly appealing to me.

    On the other hand, you could place the cmd prompt behind the IE page
    (I've never tried this, but couldn't you make the background to be
    transparent, possibly by having a transparent gif or setting an
    opacity setting (I forget what it's called offhand)?). Then, your
    web page can intercept keystrokes and pass them to the DOS box
    as appropriate. There's a lot of ifs here, and it would be some
    work to pull this off, but it seems feasible.

    Based on your post, I expect this is way beyond the scope of what you
    are trying to do, and it is not for the novice VBScript programmer, but
    if you do it, it would be nice to see a posting to that effect.

    Csaba Gabor from Vienna


    Mel wrote:
    > if my server & browser are on the same WinDoze machine, is it possible to
    > embed a cmd.exe window in HTML page ?
    >
    > stupid, but had to ask !!!
    >
    > example if possible would be grrrrrrrrrrrrrrrrrrrrrrrrrreat !
     
    Csaba Gabor, Apr 13, 2005
    #4
  5. Mel

    Dan Guest

    Csaba Gabor wrote:
    > Shooting from the hip...
    > If I were to try to embed a cmd.exe window in an HTML page, my

    approach
    > would be to simulate it. Specifically, I would make a VBScript app
    > (say HTMLcmd.vbs) which would start up an instance of IE and go to
    > the page that has the embedding simulator (or alternately, have the
    > HTMLcmd.vbs monitor instances of IE for this page).


    This would accomplish exactly nothing for me, since I use Mozilla, not
    IE.

    Of course, for anybody authoring for the WWW rather than a specific
    platform, the whole concept of "embedding DOS cmd.exe" is completely
    meaningless anyway.

    --
    Dan
     
    Dan, Apr 13, 2005
    #5
  6. Mel

    Csaba Gabor Guest

    Dan wrote:
    > Csaba Gabor wrote:
    >
    >>Shooting from the hip...
    >>If I were to try to embed a cmd.exe window in an HTML page, my

    >
    > approach
    >
    >>would be to simulate it. Specifically, I would make a VBScript app
    >>(say HTMLcmd.vbs) which would start up an instance of IE and go to
    >>the page that has the embedding simulator (or alternately, have the
    >>HTMLcmd.vbs monitor instances of IE for this page).

    >
    >
    > This would accomplish exactly nothing for me, since I use Mozilla, not
    > IE.


    I assume the OP wanted the 'embedded' cmd.exe for his own machine.

    Firefox is supposed to have an OCX or similar, but from what I
    understand it is severely limited in access to the DOM. My guess
    is it doesn't yet have the features needed to implement what I
    suggested. But I hope it gets there, I'm looking forward to it.

    Csaba
     
    Csaba Gabor, Apr 13, 2005
    #6
  7. On 2005-04-12 14:04:51 -0400, "Mel" <> said:

    > if my server & browser are on the same WinDoze machine, is it possible to
    > embed a cmd.exe window in HTML page ?
    >
    > stupid, but had to ask !!!
    >
    > example if possible would be grrrrrrrrrrrrrrrrrrrrrrrrrreat !


    Why would you need or want to do that?
     
    William Hamby, Apr 13, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Achim Domma (Procoders)

    read input for cmd.Cmd from file

    Achim Domma (Procoders), Jun 3, 2005, in forum: Python
    Replies:
    2
    Views:
    8,078
    Peter Otten
    Jun 3, 2005
  2. Sarir Khamsi

    Interpreter-like help in cmd.Cmd

    Sarir Khamsi, Jun 9, 2005, in forum: Python
    Replies:
    4
    Views:
    379
    Bengt Richter
    Jun 26, 2005
  3. =?ISO-8859-1?Q?Sch=FCle_Daniel?=

    [exec cmd for cmd in cmds]

    =?ISO-8859-1?Q?Sch=FCle_Daniel?=, Mar 8, 2006, in forum: Python
    Replies:
    3
    Views:
    391
    Scott David Daniels
    Mar 8, 2006
  4. Diez B. Roggisch

    pydb remote debugging/cmd.Cmd over socket?

    Diez B. Roggisch, May 28, 2008, in forum: Python
    Replies:
    2
    Views:
    551
    Diez B. Roggisch
    May 29, 2008
  5. Sol Linderstein
    Replies:
    3
    Views:
    191
    Matt Garrish
    Jun 18, 2004
Loading...

Share This Page