Hi,
I have an HTA that displays multiple textbox's for user input and a readonly textarea that I want to display a description of the textbox selected.
What I'm looking for is the code that will allow me to change the contents of the textarea when the textbox focus changes. For example, when...
Tried adding the <HTA:Applicaion> tag but still getting the access denied error...
What is happening is that the script runs, and terminates ok with the self.close, but the access deined error then occurs when I rerun the script.?
You can use the code below to obtain an existing environment variable:
set objShell=CreateObject("wscript.shell")
strTemp=objShell.ExpandEnvironmentStrings("%temp%")
I believe there is a related function to set a variable aswell - just not sure exactly what it is !
Thankyou for your reply, unfortantley this has not resolved the error :-(
I still get an access denied error referencing the line of the resizeto code.
Hi all,
What is the correct way to cleanly terminate an HTA application/script?
I am using self.close however when doing so in the script below I get an access deined error when rerunning the HTA , I have noticed this only happens with the window.resizeto method (i.e. if this line is removed...
Not to worry - sussed it !
The code below allows me to obtain the updated textvalues and apply them back to the corresponding reg string!
set dvalue = document.getElementsByTagName("INPUT")
for each ivalue in dvalue
objReg.setStringValue HKLM,strKeyPath,ivalue.name,ivalue.value
next
Take a look at this Microsoft page for an example script to restart a computer:
http://www.microsoft.com/technet/scriptcenter/scripts/desktop/state/dmstvb07.mspx
You could wrap this into a script with a popup message, something like this:
host="."
set oshell =...
Your absolutley right, it's only because I know that the regkey I'm querying will only ever contain string values that I'm taking this (lazy) approach!
Many thanks for your continued help - I'm learning a lot !
Maybe your could advise how I now go about obtaining the updated values from the...
Many thanks for the script - this has been most usefull!
It was the enumvalues method I wanted though as its the values of subkeys that I want the user to be able to change (apologies for any confusion).
I now have the following script that obtains the values of each subkey and puts them each...
Thanks for the response, still struggling with this though...
The 1st line of the code below obtains a reg string value and puts it in the var strValue, I want the second line to create a textbox populated with this value, however all I'm getting is a textbox populated with the string '&...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.