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 6984161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:30:50+00:00 2026-05-27T18:30:50+00:00

In my HTA, I hold it it open if an error occurred, and close

  • 0

In my HTA, I hold it it open if an error occurred, and close it if everything was successful. At the start, I have the sysmenu property set to no because I do not want the user to close the HTA until it’s finished. At the end, I want them to be able to click on the close button. Here’s what I typed up to try to achieve this, but it doesn’t seem to work? I suspect there is something I need to do to get the HTA to refresh it’s windows properties?

Please note that any solution that completely reloads the window and/or makes the script execute again is not acceptable

If Not bHoldOpen Then
    Call window.close
Else
    Dim tagHTA
    Set tagHTA = document.getElementsByTagName("hta:application").item(0)
    Call tagHTA.setAttribute("sysmenu","yes")
End If
  • 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-05-27T18:30:50+00:00Added an answer on May 27, 2026 at 6:30 pm

    You cannot change it at runtime, its only available in the HTA: block as its value is used to determine how the physical window is to be initially created.

    I thought you could produce a warning using the onBeforeUnload event & call cancelBubble to abort the close, but I tried it in IE8 and it still seems bugged; http://support.microsoft.com/kb/946214.

    It would probably be simpler and easier for the user to comprehend if you were yo just unhide a “Close” button when the process completed.

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

Sidebar

Related Questions

I have an insane idea: use .hta file as the gui front end of
I have tried to put <a href=page2.hta>Go Page 2</a> inside a .hta file. However,
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
I have a simple HTML (as HTA) application that shows strange behavior on Windows
I'm working on an application that is implemented as an HTA. I have a
I have VBScript inside a HTA getting the ping status from a local WMI
I have searched far and wide for a way to compile my .hta file
I have an .hta file on a mapped drive that I can manually navigate
Application : HTA (therefore IE) This is an application that uses SendKeys to populate

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.