473,778 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems starting application on machine with HTML page

I would like to open an application from a hyperlink on a webpage.

1. the webpage is located on my local machine.
2. the application is located on my local machine.
3. the application will run on my local machine.

In other words... The WEB is really not involved.

What I have so far works with a Netscape Browser but what I really
need is for it to work in the IE browser or one that I will create
using
VB.net.

The code I have so far uses JAVAscript and some simple HTML code.

The code is as follows:

<html>
<head>
<title>Applicat ion launcher</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var Shell = {
'$err' : function(m) {
var msg = m || 'Security exception';
window.alert('[Shell] script object\n\n' + msg);
}
, 'MSIE' : ( (typeof window != 'undefined')
&& (typeof window.ActiveXO bject != 'undefined'))

, 'Gecko' : ( (typeof window != 'undefined')
&& (typeof window.netscape != 'undefined')
&& (typeof window.netscape .security != 'undefined')
/* that Opera... always pretending to do everything
* everywhere but not really doing anything of it...
*/
&& (typeof window.opera != 'object'))
, 'run' : function(path, args) {
if ((typeof path == 'string') && (path != '')) {
if ((Shell.MSIE) && (typeof Shell.$ == 'undefined')) {
/* If first time, try to instantiate ActiveX object
* for shell access:
*/
try {
Shell.$ = new ActiveXObject(' WScript.Shell') ;
}
catch(e) {
Shell.$err(e.me ssage);
return null;
}
}
/*
*/
if (Shell.MSIE) {
var arg = ((typeof args == 'string') && (args != '')) ?
(' "' + args + '"') : '';
var exe = '"'.concat(path , '"', arg);
try {
Shell.$.Run(exe );
}
catch(e) {
Shell.$err(e.me ssage);
}
}
else if (Shell.Gecko) {
/* Netscape security model grants privileges
* on the per-call per-context basis; thus
* privilege request and privilege usage
* have to be in the same block.
*/
try {
netscape.securi ty.PrivilegeMan ager.
enablePrivilege ('UniversalXPCo nnect');
Shell.$ = Components.clas ses['@mozilla.org/file/local;1'].
createInstance( Components.inte rfaces.nsILocal File);
Shell.$.initWit hPath(path);
if ((typeof args == 'string') && (args != '')) {
Shell._ = Components.clas ses['@mozilla.org/process/util;1'].
createInstance( Components.inte rfaces.nsIProce ss);
Shell._.init(Sh ell.$);
Shell._.run(fal se, [args], 1);
}
else {
Shell.$.launch( );
}
}
catch(e) {
Shell.$err(e.me ssage);
}
}
else {
Shell.$err('not supported on this platform');
}
}
else {
Shell.$err('Inv alid argument');
}
}
};

</script>
</head>
<body>
<p>
<a href="javascrip t:void(Shell.ru n('c:\\windows\ \notepad.exe', 'c:\
\netlog.txt')); ">launch Notepad with netlog.txt</a><br>
<a href="javascrip t:void(Shell.ru n('c:\\windows\ \notepad.exe', 'c:\
\myfile.txt')); ">launch Notepad with myfile.txt</a><br>
</p>
</body>
</html>
I know I have some syntax problems but I am really stumped as to
where.

Any help would be appreciated.

Kevin

Apr 25 '07 #1
1 3426
ke************* @gmail.com wrote:
I would like to open an application from a hyperlink on a webpage.

1. the webpage is located on my local machine.
2. the application is located on my local machine.
3. the application will run on my local machine.

In other words... The WEB is really not involved.

What I have so far works with a Netscape Browser but what I really
need is for it to work in the IE browser or one that I will create
using
VB.net.
Hmmm this is comp.infosystem s.www.authoring.html
^^^
Won't some Microsoft group be better suited?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Apr 25 '07 #2

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

Similar topics

4
1978
by: Phil Grimpo | last post by:
I had previously explained this problem in a different thread, but now that I have an IISState log, I figured I'd re-start the thred. My situation and the log are following... I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of these menus are then placed into the page by calling...
3
1646
by: Indiana | last post by:
Situation: in an ASP page i have created i read a table and i display an ID from the table then i have a button and when i click on a run a new query and then the window has to be closed. (This page is an example page made it to specify my problem) The problem: when i click the button the btnsave_onclick proc is executed but if i insert the commands to open my table it is non completely executed. If i leave only a msgbox("HELLO") and a...
5
4005
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL 2000. Of course there were no modifications made to the queries and they noticed significant performance issues. They recently upgraded the application to Access XP expecting the newer version to provide performance benefits and now queries take...
0
3227
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
4
2424
by: Kristof Despiere | last post by:
Suppose you have one domain, filled with a couple of users. What needs to be done now is I need to start a windows application from a webform by pressing a button on the webform (for example). The problem is that the user who "owns" the service is always the ASPNET account. That's not good since you don't see the actual application (because it's owned by ASPNET). I've tried changed the processmodel section in the machine.config file to...
12
1333
by: Logan | last post by:
Hi, I am not a very experienced asp.net developer, but have a fair idea on how it works & better idea on vb.net. My requirement is to place an asp.net page on a website - which currently has asp & html pages (not asp.net) - but this server has asp.net installed on it (.NET run time files). I can only access this server by uploading files to it via an ftp program. i created a very simple asp.net project (hello world) - to display a...
1
2224
by: Astera | last post by:
I seem to be having a problem using web parts after the beta 2 release. Any time I try to have the WebPartManager on any page, I get the exception listed below. I've gone through the steps listed below and have gone as far as given EVERYONE full control of the App_Data folder. I am using the default settings (which I assume is the Cassini web server), so I believe it is a user permissions problem. Furthermore, if I publish the site...
3
2655
by: Newbie | last post by:
Hi All Trying to create a mini-ASP web dev with a couple of PCs at school. When the teachers are happy with the site on the LAN then going to upload it to the school site. Problem is having real problems with the ASP side of things. Timeline of events is as follows: 1) Added IIS (via Add/Remove Windows Components) on WinXP Pro machine (6
0
1419
by: senglory | last post by:
I wrote in web.config the following lines: <system.web> <customErrors mode="Off"/> </system.web>
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9465
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10296
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
10127
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10068
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
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...
1
7474
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
5370
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...
2
3627
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.