HTA Coding

D

Dave

I understand that an .hta file can launch a .exe file. Can the hta be
programmed so the typical Open, Save etc to your computer will not launch?

Thanks

Dave
 
D

Dave

Thanks for the responses. I went to these sites and being very new to this
I was hoping to see an example of a program that would launch an exe. Is
this as simple as setting a link to myapplication.exe and then setup will
launch without the usual security prompts?

I created a linked hta and opened the exe and I get the same security
message. I probably don't know what I am talking about and I probably am
over simplifying this.

My task to include the Adobe Acrobat, Flash, etc installers on the cd to
support the documents/media that accompanies the cd.

Thanks
 
J

Jack Brewster

Dave,

I think you may be working too hard at this. Because of security issues,
there isn't an easy way to transparently launch an .exe via the browser.
Your users will be exposed to the security message regardless. Also, as far
as I know (which isn't really that far since I've never played with HTA)
calling an HTA will only work from within IE. What if they're using a
browser other than IE?

I'd suggest that you have a page in your site for each application that
states the reason it's needed explains that if the user clicks the link,
they'll see a message and to choose "Open" or "Run" or whatever is
appropriate to launch the installer.

Using this method will alleviate the confusion and you won't have to waste a
lot of time learning HTA scripting. ;)
 
S

Steve Easton

Actually it "should" work in any browser that's running in Windows because the hta
extension is opened by mshta.exe which lives in c:\windows\system mshta.exe then opens it
in IE in nohome mode.

Note I said "should"

;-)


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Easton

No. the hta file itself will launch the "some files are unsafe" panel.

Dave, I've been tinkering with hta's for about a year, and have written a couple of minor
apps with them. I have yet to figure out how to launch an executable with one.
Doesn't mean it can't be done though.

What exactly are you trying or need to do.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
J

Jack Brewster

Well, I probably sit corrected. :)

Still not worth the hassle in my book, though.
 
S

Steve Easton

Agreed it's not worth the hassle.

;-)

I've played with them some. They are actually kind of "interesting" because you can gain
system access with them.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
D

Dave

Thanks everyone.

I was hoping to get a response Yes here's how it works, or No you are
working too hard.

Thanks - you are saving me time.

Dave
 
M

MD Websunlimited

Dave,

Assuming that the exe is local to your system there would not be any Open, Save , etc. If the exe is being downloaded from a server
then you'll get the standard security dialogs. But once on your system you can run that exe.
 
D

Dave

The exe would be on a CD on the local machine. I have tried several links
and I get the security message every time.

The issue for me as the developer is there are numerous versions of IE and
OSes that I have to build for. I have tried giving an example of an error
message, but the user is still confused.

I do not want to turn off security either this a big no-no.

Dave


MD Websunlimited said:
Dave,

Assuming that the exe is local to your system there would not be any Open,
Save , etc. If the exe is being downloaded from a server
 
G

Guest

Hey Dave. It's a little late but you may give this a try. I have had similar issues and this is what I did to solve it.

**** your hta file

<html>
<HTA:APPLICATION
ID="desktop"
APPLICATIONNAME="desktop"
SCROLL="yes"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
BORDER="thin"
/>
<head>
<link rel="stylesheet" type="text/css" href="desktop.css">
<script id="execWord.vbs" type="text/vbscript" src="execWord.vbs" language="vbscript"></script>
</head>

<body>

<p><a onclick="execWord">Word</a></p>

</body>
</html>

*** your vbs file in the same directory

sub execWord
dim oShell

set oShell = createObject("wscript.shell")
oShell.Run "d:\office2k3\office11\winword.exe", 1, false
set oShell = nothing

end sub


***
 
D

Dave

Hi Charlie:

I am really new to this.

I see the html side of the script, I don't know how to creat or deal with
the vbs file.

Can you shed some light?

Thanks

Dave

charlie said:
Hey Dave. It's a little late but you may give this a try. I have had
similar issues and this is what I did to solve it.
 
D

Dave

I got it going - thanks!!

Dave

Dave said:
Hi Charlie:

I am really new to this.

I see the html side of the script, I don't know how to creat or deal with
the vbs file.

Can you shed some light?

Thanks

Dave


similar issues and this is what I did to solve it.
system hta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top