|
|
 |
March 21st, 2005, 09:38 AM
|
#1
|
|
New Member
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
launch an application from Indexfile's hyperlink
Dear members,
My requirement is the following:
I must have an Index.htm file on a CD. The file contains a link which when clicked executes an application which is located on the CD. The application is present in a folder that is at the root level of the CD. From the href of the link I redirect to a Jscript function I wrote, where I call Exec method of a WScript.Shell object to launch the application on the CD. My problems are:
1. I could not find a nice way of passing the application path to the Exec method. My current code looks like:
var filepath = new String (fso.GetParentFolderName(document.location.pathnam e) + "\\Foldername\\ApplicationName.exe");
var substring = filepath.substr(filepath.indexOf(":") - 1);
ws.Exec(substring);
Thats because /fso.GetParentFolderName(document.location.pathname ) returns "/[Drive]:<rest of the path>", and the string passed to Exec() should appear exactly as it would if you typed it at the command prompt.
2. I do a "var ws = new ActiveXObject("WScript.Shell");". This throws an ActiveX alert dialog on my browser. Can this user interaction be avoided without changing IE security settings? (PS I must have an Index.htm on the CD).
Thanks in advance!
|
|
|
March 21st, 2005, 09:54 AM
|
#2
|
|
Elite Veteran
SuperMember
Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Thanks: 28
Thanked 22 Times in 19 Posts
|
Hi Sid....
Personally, I would launch the default page in your own exe file.... a custom built browser... you can then monitor for that link click and handle it without the user interaction.
A simple Visual Basic browser application set to autorun is all you need.
|
|
|
March 21st, 2005, 10:58 AM
|
#3
|
|
Most Reputable Member
Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
yeah, what rob said...
but if you don't have VB, this is the best way:
http://www.sharewareconnection.com/t...e-compiler.htm
|
|
|
March 21st, 2005, 11:08 AM
|
#4
|
|
Elite Veteran
SuperMember
Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Thanks: 28
Thanked 22 Times in 19 Posts
|
Quote:
|
Originally Posted by spinal007
|
.... but that aint gonna help him spinal unless he can tell the compiler to watch for that link click action.
|
|
|
March 21st, 2005, 12:50 PM
|
#5
|
|
Most Reputable Member
Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
it should....
I used a compiler before (shame I can't remember what its called) and it had a tool to do just that, call another application.
when you compiled the site (into an .EXE file), it just worked like any other program.
|
|
|
March 21st, 2005, 11:37 PM
|
#6
|
|
New Member
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Hi Rob and Spinal,
Thanks for your replies. I cannot however repackage the html into an exe which is autolaunched. Thats because certain guidelines I work with state that autolaunch of exe's from the cd should be avoided (user could be exposed to viruses). Hence the html file should be what the user interacts with. But thanks for making me aware of those shareware tools..they seem quite cool.
I would have used Click
But this displays a File open/save warning which looks a bit nasty. Any IE setting I can use to avoid that, and at the same time not reduce the system's security when exposed on the internet?
|
|
|
March 22nd, 2005, 04:08 AM
|
#7
|
Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 118
|
So you want a html page with a link to start an .exe file on the CD but your guidelines won't allow you to just start with the .exe itself? To be honest that makes no sense to me (no offense).
Any method of doing it rather than using an autorun.inf to run an exe is just going to create more security problems.
Without knowing exactly what you're trying to do I can only say these things are usually built with DemoShield or Macromedia Director.
|
|
|
March 22nd, 2005, 04:10 AM
|
#8
|
|
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 686
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
almost all CD ROMs launch an EXE using an autorun file, unless the EXE actually contains a virus then there shouldnt be a problem.... 
|
|
|
March 22nd, 2005, 04:49 AM
|
#9
|
|
New Member
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Our application is to be used in a hospital scenario. It is governed by pretty strict IHE (Integrating the health Enterprise) guidelines. The CD which I talk about is actually created when the hospital interacts with my application (not the application to be written on the cd..but another one). It is at this point that my application writes the index.htm and the executable to the CD. So thats the basic scenario.
So I dont "directly" control the application that is going onto the CD. Hence if the CD user runs the cd at another machine, and the autorun application turns out to be a virus, the hospital (and us) are in trouble. Hence the IHE guideline recommends that such CDs dont autolaunch an application, rather display a html, giving the user an option.
I Hope this presents the problem in a better perspective.
|
|
|
March 22nd, 2005, 07:29 AM
|
#10
|
|
Elite Veteran
SuperMember
Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Thanks: 28
Thanked 22 Times in 19 Posts
|
You simply cannot get round the security dialog.
Well.... there is in fact one way.
Autorun an exe file thats invisible to the user. Disable the security settings.
Just kidding.
I think you are stuck mate.
|
|
|
March 23rd, 2005, 04:38 AM
|
#11
|
|
Most Reputable Member
Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
I think the whole thing contradicts itself. sorry but I really cant understand the guidelines.
the autorun exe is just as if not less likelly to be a virus as anything else on the CD. html files can also cause some damage with a few lines of JScript....
you may as well just open a HTML file that tells the user how to use "run" to open the application.
but then, that could still be a virus.......
|
|
|
March 23rd, 2005, 05:08 AM
|
#12
|
|
Elite Veteran
SuperMember
Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Thanks: 28
Thanked 22 Times in 19 Posts
|
I dont understand either, but hey.
I tried to answer your question, but it just cant be done mate.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Adobe Air Launch
|
etoxin |
Flash and ActionScript |
0 |
March 8th, 2008 08:22 AM |
|
Help With launch
|
simonb |
The Café |
24 |
July 11th, 2007 11:46 AM |
|