Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7796219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:18:20+00:00 2026-06-01T23:18:20+00:00

I have an .hta file on a mapped drive that I can manually navigate

  • 0

I have an .hta file on a mapped drive that I can manually navigate to, double-click on the .hta file and it executes fine. However, I added a link to the full path on the share (from an IE 8 page) and when I try to run it from the link, as in:

Q:\path…\.hta

Then I get a javascript error an error occurred in running the script “length is null or not an object”. The javascript code is coming from the .hta file itself on this line:

...
for (var i = 0; i < matches.length; i++) { 
...

I’m guessing that for some reason “i” isn’t initialized when the .hta is run off the link, rather than manually.

In any event, when I try to directly go to the file from the link, I do get a dialog asking if I want to run, save, or cancel the .hta file. When I try to run it, I get the javascript error.

So my questions are:

  1. how do I run this .hta file from a browser link?
  2. why do I get the javascript error when run from a link and not when it’s run manually?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:18:22+00:00Added an answer on June 1, 2026 at 11:18 pm

    HTA does not recognize mapped drives.

    I assume you have your application saved at server, and then you run it at workstation, where you have this mapped driver Q as a shortcut to the server.

    The correct path to server is something like this:

    //Your_Server_Name/path_in_server/file.hta
    

    An actual IP can also be used instead of the Your_Server_Name.

    To run the HTA in browser (IE only) without prompts, you’ll need to change many settings in Intranet zone security- and Advanced-tab to very insecure mode.

    About the error message:

    It seems, that matches has not a property named length. If matches is defined, it’s probably a number or a boolean, or some other type of object which has not the length property.

    If the message is something like this: Can't get the property length: object is null or not defined. This means, that matches is undefined.

    Notice, that HTA is an independent application with it’s own top.window, and it can’t interact with the browser window. (There is no way to refer the opener in HTA, if the opener is a browser window.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried to put <a href=page2.hta>Go Page 2</a> inside a .hta file. However,
I have an insane idea: use .hta file as the gui front end of
I'm working on an application that is implemented as an HTA. I have a
I have written an HTML Application (hta file) and am wondering if there is
I'm using HTA and in it I have a function that should run a
Have an app that can use tts to read text messages. It can also
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
I have a simple HTML (as HTA) application that shows strange behavior on Windows
I have searched far and wide for a way to compile my .hta file
everytime when i try to add javascript in a hta file with vbscript it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.