473,765 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run a local install Application from JS!?

Hi
I want to be able to start a locally installed application from within a
web page.

So if our application is installed it is started when a user clicks a link
on our page. I know or assume this cannot be done just from JS?

I though I could do it using an OCX active (signed) and then call it from JS
using onclick but can't seem to get this to work!

Any ideas of how I can do this or better still any links to a working
example!
Oct 23 '05 #1
5 8969
"Adrian" <Ad****@nospamh otmail.com.uk> wrote in message
news:dj******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Hi
I want to be able to start a locally installed application from within a web page.

So if our application is installed it is started when a user clicks a link
on our page. I know or assume this cannot be done just from JS?

I though I could do it using an OCX active (signed) and then call it from JS using onclick but can't seem to get this to work!

Any ideas of how I can do this or better still any links to a working
example!

You'll get a security warning but you can do it:
<html>
<head>
<title>run_exe. com/</title>
<script type="text/javascript">
function run(what) {
var wss = new ActiveXObject(" WScript.Shell") ;
wss.Run(what);
}
</script>
</head>
<body>
<form>
<input type="button" value="Notepad" onclick="run('N otepad.exe')">
<input type="button" value="Calculat or" onclick="run('C alc.exe')">
</form>
</body>
</html>

Oct 23 '05 #2
Great Thanks for your help.

I though I would need an ActiveX but this is good.

Is there any way around the warning?

What if on the first visit to the site it prompts them to add it to their
trusted sites, would this work?

If so could it be done from script?

Thanks

Again

"McKirahan" <Ne**@McKirahan .com> wrote in message
news:l-*************** *****@comcast.c om...
"Adrian" <Ad****@nospamh otmail.com.uk> wrote in message
news:dj******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Hi
I want to be able to start a locally installed application from
within

a
web page.

So if our application is installed it is started when a user clicks a
link
on our page. I know or assume this cannot be done just from JS?

I though I could do it using an OCX active (signed) and then call it from

JS
using onclick but can't seem to get this to work!

Any ideas of how I can do this or better still any links to a working
example!

You'll get a security warning but you can do it:
<html>
<head>
<title>run_exe. com/</title>
<script type="text/javascript">
function run(what) {
var wss = new ActiveXObject(" WScript.Shell") ;
wss.Run(what);
}
</script>
</head>
<body>
<form>
<input type="button" value="Notepad" onclick="run('N otepad.exe')">
<input type="button" value="Calculat or" onclick="run('C alc.exe')">
</form>
</body>
</html>

Oct 23 '05 #3
"Adrian" <Ad****@nospamh otmail.com.uk> wrote in message
news:dj******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Great Thanks for your help.

I though I would need an ActiveX but this is good.

Is there any way around the warning?

What if on the first visit to the site it prompts them to add it to their
trusted sites, would this work?

If so could it be done from script?

Thanks

Again


http://wd.iworld.com/forum/showthrea...threadid=51038

"No, there's no way to hide that message, if that message wasn't there
anyone could come along and delete c:/windows, not good at all."

Try running it as an HTA; hust rename it with an .hta extension.
Oct 23 '05 #4
OK Thanks for your help

"McKirahan" <Ne**@McKirahan .com> wrote in message
news:Ac******** *************** *******@comcast .com...
"Adrian" <Ad****@nospamh otmail.com.uk> wrote in message
news:dj******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Great Thanks for your help.

I though I would need an ActiveX but this is good.

Is there any way around the warning?

What if on the first visit to the site it prompts them to add it to their
trusted sites, would this work?

If so could it be done from script?

Thanks

Again


http://wd.iworld.com/forum/showthrea...threadid=51038

"No, there's no way to hide that message, if that message wasn't there
anyone could come along and delete c:/windows, not good at all."

Try running it as an HTA; hust rename it with an .hta extension.

Oct 24 '05 #5
What is browser compatibility of this solution ?
-> Firefox, IE, Opera ?
-> only under Windows i presume ?

Oct 24 '05 #6

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

Similar topics

11
4202
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no direct access to the db server. I'd like to give her the facility to export the information in her local Access application to the shared PHP/MySql site. From one command button (or similar) in the Access application.
6
8239
by: Job Lot | last post by:
Using VB.NET how can I find all available SQL Server on a local network and list all the databases in each server. Thanks
6
2938
by: Rob | last post by:
Hi, I am working on a project that requires a Windows Service which performs the following file transfer functions. 1. It monitors a specific local directory on a Windows 2003 Server. 2. When it finds files with a specific extension, it queries a SQL Server database to determine what workstation will be the destination of a File.Copy. 3. It copies those files to the appropriate workstations on the LAN,
5
2649
by: guy | last post by:
In the past I've used sockets in C++ to allow apps to communicate with each other over a local network. Is there anything better/more advanced in .NET or should I continue to use sockets and the .NET Socket class under C#? The (mini) project that I'm about to start will receive stream live data (stock market prices) and reformat that data and perform some calculations on it before disseminating it to client applications on the local...
7
5430
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to need to be updated with the current copy before being built. I also don't want projects being built with the old copy. Thanks! Bill
1
7559
by: karim | last post by:
My computer (connected to a domain) is having trouble connecting to the local MSDE when using 'local' or '(local)' as server name. The only way I can connect to server through Visual Studio or DTS in Enterprise manager is when using domainname\localcomputername format. Also when I try to install the starter kits from asp.net, the installer in each kit fails to find sql server instances. I am pretty sure it's related to fact the installer is...
3
1332
by: Matt | last post by:
I am writing an application in ASP.NET where one of the requirements is that the user wants the option to "work locally". This is a Time and Expense application for sales people on the road. I need to be able to remotely install the pages and save the data to xml files until the next time they connect where it would then update the enterprise database through some web services. I would prefer not having a "local database", and I would...
10
4117
by: Woody Splawn | last post by:
I have been developing a ClientServer application on one machine at my office but the time has come to transfer it to the customer. The customer is running a Windows 2000 local area network. I will keep a copy of the applicaiton and all it's code on one of the client machines connected to the local area network at the customers. This machine has a full blown copy of Visual Studio 2003. SQL Server 2000 is the back-end, both at my office...
29
2820
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I move this project/solution from a local development xp pro computer which uses IIS/localhost, to another xp pro computer that is on a Windows 2003 server domain. I want to be able to use the Windows 2003 server IIS instead of localhost.
2
8553
by: Terry Olsen | last post by:
Can anyone give me some guidance on installing a local printer with VB 2005? I'm guessing I would probably do this with WMI, but i'm not finding anything obvious. I see how to add a networked printer, but nothing to add a local printer, assign it a port & driver.
0
10156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.