Does anyone know if there is a way to embed an executable in a web page to run in that web page. This would be a client side page.
Here is what I want to do. I am a systems admin (not a web dev even though I know just enough to make tweaks) who is in a command prompt all day long. I work in Windows, Mac and Linux. I found this really cool article on how to embed a terminal in Ubuntu that I was able to complete in Linux Mint last night.
http://www.webupd8.org/2009/05/ubuntu-embed-terminal-into-you-desktop.html

Well, now I want to do something like this in Windows. The only way I know how to would be to create a html web page that has the embedded command prompt executable and use that web page as an Active Desktop. My only issue is that I do not know how, nor have I have found a means in my Google search, to embed an executable in a web page.
Any assistance would be greatly appreciated.

Member Avatar for diafol

Can't see how you'd access files outside the webroot. This is one type of web page I would certainly not wish to see. Accessing my system files? Are you kidding? Imagine what havoc you could perform with that!

I think you must have to have PHP on the webpage (or some kind of thing like that, ASP, whatever) that calls the executable.

No, I don't think I want to do this. I am looking for something simple where I don't have to run a web server, just a simple HTML page with the embedded executable.
The more research I do the more I think this may not be possible.

embedded executable,
every browser has aimed at preventing this,
its the typical property of malware
other embedded programs that run when you open the web page
virus
trojan
rootkit

probably not a good idea

you need to reference the exe as a hyperlink in the hope that the user will choose 'run'.
Strange comment though... as a sysadmin, why don't you just install the exe on everyone's c drive and reference it?
<a href="file:\\c:\path\myexe.exe">
This would circumvent the permissions issues in a browser because the file is local.

Assuming that doesn't help, I discovered alotta stuff in cold fusion and .net wot might be helpful.

you need to reference the exe as a hyperlink in the hope that the user will choose 'run'.
Strange comment though... as a sysadmin, why don't you just install the exe on everyone's c drive and reference it?
<a href="file:\\c:\path\myexe.exe">
This would circumvent the permissions issues in a browser because the file is local.

Assuming that doesn't help, I discovered alotta stuff in cold fusion and .net wot might be helpful.

I don't want this for everyone. This is just for me, for my convenience.

I don't want this for everyone. This is just for me, for my convenience.

Then for why not put it on a thumbdrive in your pocket

I think everyone is missing the point. I don't need anything portable and I don't need this to deploy to multiple machines. I want to embed a command prompt console in my desktop in Windows for myself the same way you can do it in Linux as per this article:

http://www.webupd8.org/2009/05/ubuntu-embed-terminal-into-you-desktop.html

The only way I know that it can be done in Windows, if it can be done, is as an HTML page using Active Desktop in Windows XP. Since I do not know much about HTML, I originally posted this thread to find out if it can be done and, if so, how it can be done.
I think the more I research and have received suggestions on other forums, I don't think it can be done.

for windows that can be accomplished by dragging the command prompt shortcut onto the desktop then anytime you click it you have a command console
there is bound to be a plugin in one of the shareware/freeware repositories to let you continue the background across the cmd window

still not sure if this is what you mean

Okay now i know what you mean. Was doable in windows 98/me but they backed out of desktop-embedded html after that - as far as i'm aware. That was when windows sat on dos rather than dos sitting in windows.

You can embed an address field in the taskbar wot searches first in your path (thereby typing cmd) but no static command embedded window.

you can also shortcut key a command prompt by saving a batch file in your path - c:\windows\system32\c.bat
with cmd.exe as the content of the batch file.
I also have x.bat to close the window

Bottom line is if you like the linux/unix command/keyboard control, windows sucks and dos is a poor substitute.

I'm pretty sure it's impossible. Only way I know of is Java Applets

Jim Washington

In my opinion, embedding executable files is categorized as object like swf, flv files. The way is the same the file is different.

You are missing everyone else's point. This is a HUGE security risk! We all understand that YOU only want to do this on your own PC, but the entire rest of the industry is trying to stop others who want to do it on PC they do not own. Every time a hacker finds a way in, the browser manufacturers, virus scanners, etc., find the hole and plug it. It's a war out there and you are basically asking someone to publish a hole in the defense line!

You could do something like that with Java. It wouldn't actually be embedded in the page, but you could launch an app through Java from the web page.

Member Avatar for diafol

Had a look, can't see how you embed a console in a browser window.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.