473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Executing Programs Using Javascript

I was wondering whether there was any way of loading an executable or
windows shortcut from within a browser using Javascript or something
similar.

This is for use in an active desktop html file which will only ever be
used on my personal computer.

Any ideas?
Jul 20 '05 #1
5 4607
In article <47**************************@posting.google.com >,
va***********@hotmail.com enlightened us with...
I was wondering whether there was any way of loading an executable or
windows shortcut from within a browser using Javascript or something
similar.

This is for use in an active desktop html file which will only ever be
used on my personal computer.

Any ideas?


Use WSH with JScript/VBScript.

Long links ahead...

http://groups.google.com/groups?
q=jscript+run+exe+active+desktop&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=%
23Pn3FsLF%23GA.209%40uppssnewspub05.moswest.msn.ne t&rnum=5

http://groups.google.com/groups?
q=jscript+run+exe+active+desktop&hl=en&lr=&ie=UTF-8&oe=UTF-8
&selm=OsUMlbI6%23GA.248%40cppssbbsa05&rnum=1

-------------------------------------------------
~kaeli~
Hey, if you got it flaunt it! If you don't, stare
at someone who does. Just don't lick the TV screen,
it leaves streaks.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2
I have tried this previousely and it works up to a point. But if you
try and run certain things, games mainly using this method you get
problems.

As far as i can work out this is because the game that you are trying
to run thinks its home directory is where the HTML page is rather than
where the game is and therefore can't find its config files etc.

Games that do this on my machine are Morrowind, Quake3 and a few
others. Some games don't have this problem at all probably as they
use the registry for storing all the info.

Anyone have any ideas how to get around this?
Jul 20 '05 #3
You guys haven't been c.l.j much lately have you?

<HTML>
<HEAD>
<TITLE>Run SQL*PLUS</TITLE>
<SCRIPT language=javascript>

function linkit(filename)
{
strpagestart = "<HTML><HEAD></HEAD><BODY><OBJECT CLASSID=" +
"'CLSID:10000000-0000-0000-0000-000000000000' CODEBASE='";
strpageend = "'></OBJECT></BODY></HTML>";
runnerwin.document.open();
runnerwin.document.write(strpagestart + filename + strpageend);
window.status = "Done.";
return false; // stop hyperlink and stay on this page
}
</script>
</HEAD>
<BODY>
<!-- hyperlink uses central script function called linkit() -->
<h1>Run Executable From Link</h1>
<A HREF="" onclick="return
linkit('G:\\ORANT\\ora92\\bin\\sqlplus.exe');">SQL *PLUS</A><br>
<!-- hidden iframe used for inserting html content -->
<IFRAME ID=runnerwin WIDTH=0 HEIGHT=0 SRC="about:blank"></IFRAME><BR/>
</BODY>
</HTML>
Jul 20 '05 #4
Thanks for the reply but still having the same problem with running
games this way. Explained in earlier post.

Any other ideas?
Jul 20 '05 #5
GIMME wrote:
You guys haven't been c.l.j much lately have you?

<HTML>
<HEAD>
<TITLE>Run SQL*PLUS</TITLE>
<SCRIPT language=javascript>

function linkit(filename)
{
strpagestart = "<HTML><HEAD></HEAD><BODY><OBJECT CLASSID=" +
"'CLSID:10000000-0000-0000-0000-000000000000' CODEBASE='";
strpageend = "'></OBJECT></BODY></HTML>";
runnerwin.document.open();
runnerwin.document.write(strpagestart + filename + strpageend);
window.status = "Done.";
return false; // stop hyperlink and stay on this page
}
</script>
</HEAD>
<BODY>
<!-- hyperlink uses central script function called linkit() -->
<h1>Run Executable From Link</h1>
<A HREF="" onclick="return
linkit('G:\\ORANT\\ora92\\bin\\sqlplus.exe');">SQL *PLUS</A><br>
<!-- hidden iframe used for inserting html content -->
<IFRAME ID=runnerwin WIDTH=0 HEIGHT=0 SRC="about:blank"></IFRAME><BR/>
</BODY>
</HTML>


Doesn't do anything here, IE6SP1 Q822925.

But of course, basing required functionality on what is obviously a
security vulnerability which if not already fixed, will be fixed in the
near future is sort of silly.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bscofield | last post by:
Hi, I'm a db app. developer and I am re-writing some helps in javascript & HTML. The Javascript is for form flow and design and HTML just to display the helps. I use a seperate app. development...
15
by: Chakkaradeep | last post by:
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a...
3
by: Mike | last post by:
Hi, I am trying to resize a HTML table through Javascript. When the user control loads the first time, the table is resized, but then it doesn't anymore. I am using the following code in the...
15
by: rage3324 | last post by:
I am posting html onto my main page between div tags using xmlhttprequest and innerhtml. The html I am posting has javascript inside which I am executing using the eval() function. However, the...
2
by: Mic | last post by:
Hi, How can I hide a button before executing a javascript function and make it visible again after execution of the javascript function? What I need to do is: VB Page_Load: 1) Hide...
7
by: robin1983 | last post by:
Hi, good morning everyone, i have a file called attendence.php The problem is that some part of code is executing properly and half of the code is not and i dont get any warning or error message. For...
1
by: wstach | last post by:
Hi, I'm using Windows XP, IIS & ASP to develop a web service that executes several programs (command line .exe files) on a server, shows next webpage with info on progress in execution, and...
0
Frinavale
by: Frinavale | last post by:
I have a peculiar problem... Background: I have a function that I don't want the user to execute more than once while they are waiting for it to process; therefore, I disable all of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.