473,411 Members | 2,196 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,411 software developers and data experts.

how can i launch an application using javascript

hi everyone,

im fairly new to javascript so here goes: Im building an application that requires a database (i'm using wampserver) and i want to create a desktop icon which is a shortcut to the login page for the program. When the user double clicks the shortcut on the desktop, i want to automatically launch the wamp server. Ive done a little research and google has told me this is possible but only using ActiveX. Firefox may block the application...
The thing is, im following code samples from google and it is not working; maybe i'm doing something wrong?
or maybe what i want to do is not possible?

(for simplicity, i've included my javascript code in my html code)

this is what i'm doing:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <head>
  3.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4.         <link rel="stylesheet" title="loginPage" type="text/css" href="loginPage.css" /> 
  5.  
  6. <script Language="JScript">
  7.     function runcmd() {
  8.         File="C:\Program Files\Wamp Server\wampmanager.exe";
  9.         WSH=new ActiveXObject("WScript.Shell");
  10.         WSH.run(File);
  11.     }
  12. </script>     
  13.  
  14.         <title>Test page</title>
  15.  
  16.  
  17.     </head>
  18.  
  19.  
  20.  
  21.     <body onLoad="javascript:runcmd();"> 
  22.                 <div id="login">
  23.                 <form action="userLogin.php" method="post" enctype="multipart/form-data" name="userLoginInfo">
  24.                        <label>Login: </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  25.                     <input name="userName" type="text" size="15" maxlength="10" />
  26.  
  27.                     <br />
  28.  
  29.                     <label>Password: </label>
  30.                     <input name="password" type="password" size="15" maxlength="10" />
  31.  
  32.                     <br />
  33.  
  34.                     <input name="loginButton" type="button" value="Login" />
  35.  
  36.                 </form>
  37.  
  38.                 </div>
  39.  
  40.  
  41.     </body>
  42.  
  43. </html>
  44.  
  45.  
  46.  



any guidance will be appreciated :)
thx
Sep 8 '10 #1
3 2566
Dormilich
8,658 Expert Mod 8TB
that approach won’t work in any other browser than IE. in general, JavaScript has no access to the client’s file system (a security measure).

is your application a web application or a desktop application?
Sep 8 '10 #2
im trying to create a web application. For now though, it will run on the local server but eventually i would like to get a domain name and host server :)

thanks again
Sep 8 '10 #3
Dormilich
8,658 Expert Mod 8TB
if it should run on a host server eventually, there’s no problem. in that case the DB/webserver will run all the time. even if you have a local test server, just make sure all required services (i.e. webserver & DB server) are started on booting.
Sep 8 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: A.A. Fussy | last post by:
How would I, in VB.NET launch a program from a command button?
1
by: Konrad | last post by:
Hi How using VS.NET installer launch application after instalation? Thanks Konrad
1
by: Leonid Finis | last post by:
Hi, I’m trying to launch application after it was installed. I created a Windows App Deployment project. I added to “End” phase of “User Interfaces” editor a custom dialog box with...
9
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
8
by: Dave | last post by:
Hello all, I have been able to use a Javascript alert box in my vb.net web application, for example: Dim msg As String = "Hello, world." Dim alertScript As String = "<script...
4
by: Joe | last post by:
I created a CustomAction for this but I don't think I have it in the right place. I tried both Install and Commit but neither allow it to get to the final screen. Are there any examples of this...
5
by: Cleyton | last post by:
Hi! I would like to know if is it possible start an application through WINDOWS SERVICE using System.Diagnostics.Process.Start()? I've tried to do this but nothing happens. Tks!
2
by: JDeats | last post by:
When a user double clicks on file item in Windows Explorer, Windows tries to open the document with whatever application is related to it's file extension. In my WinForms application I would...
3
by: akristensen | last post by:
I am new to this site, so be patient if I do not ask the question correctly. Current Target Platform: Browser: MS IE, script language: Javascript (will use VBScript, but JS is preferred), External...
0
by: AnupamaH | last post by:
Hi, I'm new to .net framework... Plz send me the code to Launch any Windows Application Using "IAccessible Interface in C#.net".
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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,...
0
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...
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 projectplanning, coding, testing,...
0
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...
0
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...

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.