Connecting Tech Pros Worldwide Forums | Help | Site Map

how to execute .hta from IE ?

Anupama.sh@gmail.com
Guest
 
Posts: n/a
#1: Jul 10 '06
Hi!

I need to read a registry entry(path of a file) from a .htm file. On
doing so it gives an alert "ActiveX maybe harmful..". To avoid this, I
wanted to try a hta file instead. All the files including the htm files
will be used locally & will have nothing to do with the internet.

I was hoping I could have the user just open an htm file, which
executes the hta ( this .hta will in return give the path read from the
registry).

Is there some way this could be done? Any help appreciated!


Thank you.


Randy Webb
Guest
 
Posts: n/a
#2: Jul 10 '06

re: how to execute .hta from IE ?


Anupama.sh@gmail.com said the following on 7/10/2006 2:56 PM:
Quote:
Hi!
>
I need to read a registry entry(path of a file) from a .htm file.
No can do in an Internet Environment.
Quote:
On doing so it gives an alert "ActiveX maybe harmful..".
Yep, as it should.
Quote:
To avoid this, I wanted to try a hta file instead.
So far so good.
Quote:
All the files including the htm files will be used locally & will
have nothing to do with the internet.
First time that ActiveX warning comes up, you give it permission and all
is fine.
Quote:
I was hoping I could have the user just open an htm file, which
executes the hta ( this .hta will in return give the path read from the
registry).
See above, then the .hta isn't needed.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Kevin Darling
Guest
 
Posts: n/a
#3: Jul 10 '06

re: how to execute .hta from IE ?



Anupama.sh@gmail.com wrote:
Quote:
I need to read a registry entry(path of a file) from a .htm file. On
doing so it gives an alert "ActiveX maybe harmful..". To avoid this, I
wanted to try a hta file instead. All the files including the htm files
will be used locally & will have nothing to do with the internet.
Have you tried simply renaming that .htm file to .hta ? A lot of
times, that's all you need to do.

Then you don't have to worry about trying to access .hta info from a
..htm file, which I'm not sure is possible these days anyway. (I just
went through this entire .hta ordeal a few months ago, but have had
major surgery since then and my memory isn't so good ;-)

Cheers, Kev

Anupama.sh@gmail.com
Guest
 
Posts: n/a
#4: Jul 10 '06

re: how to execute .hta from IE ?


Thanks Kevin!

the problem is, I have to make a chm file ( which needs some data, for
which i need to read the registry).

I couldn't find a way to include .hta in a chm file. Any idea??


Kevin Darling wrote:
Quote:
Anupama.sh@gmail.com wrote:
Quote:
I need to read a registry entry(path of a file) from a .htm file. On
doing so it gives an alert "ActiveX maybe harmful..". To avoid this, I
wanted to try a hta file instead. All the files including the htm files
will be used locally & will have nothing to do with the internet.
>
Have you tried simply renaming that .htm file to .hta ? A lot of
times, that's all you need to do.
>
Then you don't have to worry about trying to access .hta info from a
.htm file, which I'm not sure is possible these days anyway. (I just
went through this entire .hta ordeal a few months ago, but have had
major surgery since then and my memory isn't so good ;-)
>
Cheers, Kev
Closed Thread