Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Embeding DOS cmd.exe in a html window ?

Reply
Thread Tools

Embeding DOS cmd.exe in a html window ?

 
 
Mel
Guest
Posts: n/a
 
      04-12-2005
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 !


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      04-12-2005
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
 
Reply With Quote
 
 
 
 
SpaceGirl
Guest
Posts: n/a
 
      04-13-2005
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).
 
Reply With Quote
 
Csaba Gabor
Guest
Posts: n/a
 
      04-13-2005
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 !

 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      04-13-2005

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

 
Reply With Quote
 
Csaba Gabor
Guest
Posts: n/a
 
      04-13-2005
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
 
Reply With Quote
 
William Hamby
Guest
Posts: n/a
 
      04-13-2005
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML Help - Embeding WMP Dennis Computer Support 9 02-04-2009 05:17 PM
Embeding html controls in Server Control Raj Dhrolia ASP .Net 2 12-23-2006 10:16 PM
Embeding html controls in Server Control Raj Dhrolia ASP .Net Building Controls 0 12-22-2006 02:45 AM
Embeding Images inside HTML ??!@#$ Mel HTML 12 02-16-2005 06:51 PM
Embeding SVG in HTML Sascha Kerschhofer XML 2 06-25-2003 11:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57