Embeding DOS cmd.exe in a html window ?

M

Mel

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 !
 
D

David Dorward

Mel said:
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).
 
S

SpaceGirl

David said:
Mel wrote:




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).
 
C

Csaba Gabor

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
 
D

Dan

Csaba said:
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.
 
C

Csaba Gabor

Dan said:
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
 
W

William Hamby

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top