I have an HTML Application that I am using to build a kiosk environment. At the end of every session (when the user clicks "Logout" or after a timeout) I want the HTA to close itself and restart*. I was wondering how I would go about achieving this programatically with VBScript.
The process should go something like this
- User clicks "logout" or if there has been no input for 5 minutes
- Delete temporary internet files
- Close HTA
- Reopen HTA
It's the reopening part I'm having trouble with.
One thing I did consider is; before closing the application, set a once-only scheduled task to run the HTA again. I don't think this is a very elegant solution though :(
Thanks for your help guys!
Cheers
Iain
.* The reason I want the HTA to restart itself is that after extended use, strange things start to happen that I think are related to bugs in mshta.exe or the IE engine. My HTA relys quite heavily on dynamically created IFRAMEs and for some reason the HTA doesn't clean them up properly once they're closed. It's kind of hard to explain the bug in detail but an example of the weirdness is; I spawn a new IFRAME and when I interrogate the DOM everything looks like it should, but what the browser renders is whatever was in the previously focussed IFRAME.