ShamilShah
asked on
Open an application through browser code
I want to be able to open applications from a web page running locally on a terminal.
It is just to open word, excel, and other basic programmes like the European driving licence.
The box will be locked down so that only those aplications can be run.
I used the code below but because of its obvious security risk had now been disallowed in internet explorer. Is there any other way to launch them.
Would I have to use an active x control?
<html>
<script type="text/javascript">
function techlog(app) {
var shell = new ActiveXObject("WScript.she ll");
shell.run(app + " ",10);
}
</script>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor. Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body topmargin="0" leftmargin="0">
<map name="FPMap0">
<area href="http://www.google.co.uk/" shape="rect" coords="214, 311, 322, 364" target="_blank">
<area href="http://www.yahoo.co.uk/" shape="rect" coords="214, 377, 325, 416" target="_blank">
<area href="http://www.altavista.com" shape="rect" coords="214, 428, 326, 478" target="_blank">
<area href="http://www.lycos.com" shape="rect" coords="211, 489, 292, 529" target="_blank">
<area href="http://www.webcrawler.com" shape="rect" coords="209, 543, 328, 579" target="_blank">
<area coords="415, 319, 486, 384" shape="rect" href="http://rylibweb.man.ac.uk/" target="_blank">
<area href="http://www.metacrawler.com/index.html" shape="rect" coords="575, 293, 671, 330" target="_blank">
<area href="http://www.dogpile.com" shape="rect" coords="677, 296, 757, 332" target="_blank">
<area href="http://www.profusion.com" shape="rect" coords="587, 343, 663, 372" target="_blank">
<area href="http://www.debriefing.com/" shape="rect" coords="672, 342, 755, 372" target="_blank">
<area href="http://www.yell.co.uk" shape="rect" coords="582, 406, 753, 441" target="_blank">
<area href="http://www.merriamwebster.com/" shape="rect" coords="578, 458, 764, 501" target="_blank">
<area href="http://www.encyclopedia.com/" shape="rect" coords="603, 516, 712, 578" target="_blank">
<area href="http://myumist.umist.ac.uk/" shape="rect" coords="79, 127, 236, 154" target="_blank">
<area href="http://www.umist.ac.uk/" shape="rect" coords="260, 128, 365, 150" target="_blank">
<area href="http://webmail.umist.ac.uk/" shape="rect" coords="405, 129, 554, 150" target="_blank">
<area href="http://rylibweb.man.ac.uk/" shape="rect" coords="572, 128, 701, 146" target="_blank">
<area href="http://www.google.co.uk/" shape="rect" coords="756, 127, 880, 147" target="_blank">
<area coords="393, 473, 510, 481" shape="rect" onClick="techlog('MSACCESS .EXE')">
<area onClick="techlog('EXCEL.EX E')" shape="rect" coords="393, 497, 503, 508">
<area onClick="techlog('POWERPNT .EXE')" shape="rect" coords="399, 518, 523, 532">
<area onClick=" techlog (‘WORD.EXE’)" shape="rect" coords="400, 546, 495, 553">
<area onClick="techlog('e:\ECDL. exe')" shape="rect" coords="357, 391, 560, 456">
<area href="instructions.htm" shape="rect" coords="386, 566, 526, 592" target="_blank">
</map>
<img border="0" src="background.jpg" usemap="#FPMap0" width="1024" height="768" align="center">
</body>
</html>
It is just to open word, excel, and other basic programmes like the European driving licence.
The box will be locked down so that only those aplications can be run.
I used the code below but because of its obvious security risk had now been disallowed in internet explorer. Is there any other way to launch them.
Would I have to use an active x control?
<html>
<script type="text/javascript">
function techlog(app) {
var shell = new ActiveXObject("WScript.she
shell.run(app + " ",10);
}
</script>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body topmargin="0" leftmargin="0">
<map name="FPMap0">
<area href="http://www.google.co.uk/" shape="rect" coords="214, 311, 322, 364" target="_blank">
<area href="http://www.yahoo.co.uk/" shape="rect" coords="214, 377, 325, 416" target="_blank">
<area href="http://www.altavista.com" shape="rect" coords="214, 428, 326, 478" target="_blank">
<area href="http://www.lycos.com" shape="rect" coords="211, 489, 292, 529" target="_blank">
<area href="http://www.webcrawler.com" shape="rect" coords="209, 543, 328, 579" target="_blank">
<area coords="415, 319, 486, 384" shape="rect" href="http://rylibweb.man.ac.uk/" target="_blank">
<area href="http://www.metacrawler.com/index.html" shape="rect" coords="575, 293, 671, 330" target="_blank">
<area href="http://www.dogpile.com" shape="rect" coords="677, 296, 757, 332" target="_blank">
<area href="http://www.profusion.com" shape="rect" coords="587, 343, 663, 372" target="_blank">
<area href="http://www.debriefing.com/" shape="rect" coords="672, 342, 755, 372" target="_blank">
<area href="http://www.yell.co.uk" shape="rect" coords="582, 406, 753, 441" target="_blank">
<area href="http://www.merriamwebster.com/" shape="rect" coords="578, 458, 764, 501" target="_blank">
<area href="http://www.encyclopedia.com/" shape="rect" coords="603, 516, 712, 578" target="_blank">
<area href="http://myumist.umist.ac.uk/" shape="rect" coords="79, 127, 236, 154" target="_blank">
<area href="http://www.umist.ac.uk/" shape="rect" coords="260, 128, 365, 150" target="_blank">
<area href="http://webmail.umist.ac.uk/" shape="rect" coords="405, 129, 554, 150" target="_blank">
<area href="http://rylibweb.man.ac.uk/" shape="rect" coords="572, 128, 701, 146" target="_blank">
<area href="http://www.google.co.uk/" shape="rect" coords="756, 127, 880, 147" target="_blank">
<area coords="393, 473, 510, 481" shape="rect" onClick="techlog('MSACCESS
<area onClick="techlog('EXCEL.EX
<area onClick="techlog('POWERPNT
<area onClick=" techlog (‘WORD.EXE’)" shape="rect" coords="400, 546, 495, 553">
<area onClick="techlog('e:\ECDL.
<area href="instructions.htm" shape="rect" coords="386, 566, 526, 592" target="_blank">
</map>
<img border="0" src="background.jpg" usemap="#FPMap0" width="1024" height="768" align="center">
</body>
</html>
ASKER
No, I just want it to launch MS word, for them to use. Not to open a specific document. I could have template documents with I point to and this in turn will open word but that will not work for a programme like the European driving licence.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That used to work without a problem, until I ran one of the microsoft windows updates not I get an error: 'Automation server can't create object'. This happens on even a low security setting within IE.
I assume this is because if you can run any shell command you could potentially run something like 'format c:'.
Jaysolomon is your computer up-to-date, does it have all of the windows updates installed?
If it does any idea why mine comes up with that error?
I assume this is because if you can run any shell command you could potentially run something like 'format c:'.
Jaysolomon is your computer up-to-date, does it have all of the windows updates installed?
If it does any idea why mine comes up with that error?
I have win2k all service packs and up-to-date patches.
I am thinking you have a bad patch or something, because i tested the code i posted and it worked like a charm.
Go to the MS update site and try updating your box again. Of course uninstall the last patch or two
I am thinking you have a bad patch or something, because i tested the code i posted and it worked like a charm.
Go to the MS update site and try updating your box again. Of course uninstall the last patch or two
ASKER
I have tried it on more then one machine, we are running Win XP, might be an issue with that. Not sure why, I will try and fiddle with the security settings and post again.
If anyone else had the same issue plese let me know.
Thanks
If anyone else had the same issue plese let me know.
Thanks
i do not have XP so i cannot test on that platform, but i can tell ya win 2k works
Here at Spokane County, my department has run into numerous issues with XP/Internet Explorer and Microsoft patches. I think Microsoft is simply releasing some buggy patches.
Alone with some simply buggy software
just wait til longhorn arrives in late '04 or early '05
just wait til longhorn arrives in late '04 or early '05
However, running Windows XP with IE and the latest updates, I ran jaysolomon's code and, after being warned about ActiveX controls being unsafe, Excel opened successfully.
ASKER
Ok, I tried it on my computer at home and it worked fine. As you can see my original script is identical and it worked fine, and then suddenly just stopped.
This leaves me a little bit of a problem. I have 10 machines this code does not work on. It worked fine and then just stopped working.
Some are locked down and two I have tried running as an administrator, with various (high-low) security settings. They all give me the same error.
Has anyone else had the same problem?
The only other thing I can think of is that all this machines were updated through a cache, the updates could have got corrupted in cache, and then used by all of the machines to update. Does this sound reasonable?
I will try reinstalling a machine tomorrow and bypass our cache and see what happens. If anyone else has any ideas please let me know.
Thanks
This leaves me a little bit of a problem. I have 10 machines this code does not work on. It worked fine and then just stopped working.
Some are locked down and two I have tried running as an administrator, with various (high-low) security settings. They all give me the same error.
Has anyone else had the same problem?
The only other thing I can think of is that all this machines were updated through a cache, the updates could have got corrupted in cache, and then used by all of the machines to update. Does this sound reasonable?
I will try reinstalling a machine tomorrow and bypass our cache and see what happens. If anyone else has any ideas please let me know.
Thanks
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: jaysolomon {http:#9764375}
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jAy
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: jaysolomon {http:#9764375}
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jAy
EE Cleanup Volunteer
<a href="/test.xls" >Excel</a>
<a href="/test.doc" >Word</a>