Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running networked apps via my Intranet 1

Status
Not open for further replies.

SunnyByfleet

Technical User
Feb 24, 2003
146
GB
Hi,

I administer a W2003 network with XP clients (+IE6), and have set up an Intranet. It contains lots of links, as well as documentation etc.

I would also like to do a page that acts as a launchpad to run various applications. I would have icons or links on the page that would work in the same way as a shortcut on a desktop.

Lets give an example:

I have the following file:

\\SERVER1\APPS\CONVERT.EXE

This is a theoretical application that converts English text to French text.

A user might have a shortcut on their desktop pointing to the above, and that runs the application fine.

I tried adding the following to my web page:

<a HREF="\\SERVER1\APPS\CONVERT.EXE">
Click here
</a>

...but that merely asks users if they want to download the file.

How do I get the above link to act like a shortcut, so that the application itself runs?

I've done a search here and from what I've read it is possible in IE, but I'm not sure how.
 
i think what you're looking for is an HTA page (html application page). this is an IE only technology which allows you to use a web page without the normal limitations and security restrictions. check out mircosoft's web site (MSDN library) for details.

you can include jscript or vbscript and have full access to your OS and local resources.

the start of an HTA page might look like...
Code:
<html>
<head>
<title>Title</title>
       <hta:application 
        applicationname="name"  
        maximizebutton="no"
        minimizebutton="no"
        singleinstance="yes"
	innerborder="no"
	contextmenu="no"
	selection="no"
        scroll="no" />

to actually launch a program, you'll need to create an shell object as follows (vbscript example)...

Code:
dim shell
set shell = createobject("WScript.Shell")
...
shell.run(program2run)

the page needs to be saved with an HTA extension.
 
That worked a treat!

Thanks for that, that's been bugging me for ages.

Its odd, I'd only just read up about HTA files after a user got hit with a virus. A week ago I hadn't heard of them.
 
Ah......

Now there's another issue.

I now have an HTA file that loads all the links.

I want to access this HTA file from my Intranet. I try linking to it like I would an HTML file, and it wants to download it.

Am I going to have to convert my entire Intranet to HTA files, or am I missing something obvious?
 
Sorry if I appear to have verbal diarroeah, but if I configure IE to treat my intranet site as an intranet site, and grant it full access to create and run activex controls, then everything runs fine, even as an HTML file as opposed to an HTA file.

Would this be a viable solution? Alarm bells are ringing about security risks. Part of me thinks that it would enable a virus to spread a lot more quickly throughout my network. Am I being overly paranoid or is it wise not to allow this for my intranet site?

I should point out that up until now I had not used the Local Intranet Zone for my intranet at all.

I promise this is my last post until there's a reply!
 
i'm no expert on IE security, but i believe there is no difference between running an HTML page with low or no security and running an HTA page. the main benefit to an HTA page is that it will work regardless of what the security settings are on any computer.

has far as the prior post, you can't link to an HTA page and have it work for the same reason you can't link to an EXE and have it work. HTA's are treated like applications rather than web pages.
 
This is what I have been trying to accomplish.
Could you please show me Javascript code to call the HTA
program. To be sure of what I am trying to do you let the shell program call the hta that calls the actual sample.exe
program. Is this correct??


Thanks
 
Here's what I finally did to solve it. The solution works for an Intranet but won't work on the internet because there is no security.

Code:
dim shell
set shell = createobject("WScript.Shell")
...
shell.run(program2run)

This was the bit of vbscript you need to go with.

THe key then was to configure IE to have your intranet within the Intranet Zone. Then allow all Activex objects to run within that zone in the IE security settings.

You are basically telling IE that you fully trust your intranet.

I didn't use HTA files, as you would need to convert the whole intranet to HTA format, from what I could see.

I was wary about lowering the security settings to start with, but in the end decided that if the intranet server was infected, it could spread with or without activex objects running. So it was irrelevent.

Any other queries let me know. I've got it working at my end and will be more than happy to help.


 
Does anyone see whats wrong with this vbscript code.

<html>
<SCRIPT LANGUAGE="vbScript">
dim shell
set shell = createobject("WScript.Shell")
shellobject.run("vbscript.hta")
</script>
</html>

I am trying to call vbscript.hta to run my program below.
Program (vbscript.hta) is below.

<html>
<head>
<title>Run FPA</title>
<hta:application
applicationname="aas2.exe"
maximizebutton="no"
minimizebutton="no"
singleinstance="yes"
innerborder="no"
contextmenu="no"
selection="no"
scroll="no" />
</head>
</html>

Thanks



 
I'm no expert but shouldn't
Code:
dim shell
set shell = createobject("WScript.Shell")
shellobject.run("vbscript.hta")
be
Code:
dim shell
set shell = createobject("WScript.Shell")
shell.run("vbscript.hta")
as shellobject isn't declared.

Glen
 
I tried that and it still will not run.
It just comes up with a blank screen my program never executes.
Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top