Mosaic1
03-06-2003, 12:00 PM
I am trying to create an HTA which allows a person to change the menuext key in the registry. VBS cannot enumerate a registry key. I solved that. I now have a folder created by a set of scripts executed by the hta which contains a registry file for each subkey(I only had to go one layer deep) under menuext. Also, it seems when you have a registry file created using regedit /e in XP ,WSH cannot read it correctly. I was not able to use any string manipulation to get the subkey names from the original menuext key when exported in its entirety. I resolved that problem by putting a copy of the Win98SE regedit.exe in the same folder as the script. The file is exported in "Classic" format and I can then use String Manipulation on it. The point is to let the script get the files. I wish there were a switch available to export a reg file in XP using REGEDIT4.
My problem is I am very new to scripting and am not sure if this next part can be done.
I want to create a form. Possibly an array of Checkboxes? Each checkbox would represent one of the files in the folder.
Here's the code for an hta which enumerates each file name in the folder and returns a messagebox for each filename.
<script Language = "vbscript">
Dim fso, f, f1, fc, s ,X, Y,key, Z, B, Q
Set WshShell =CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("Regfiles")
Set fc = f.Files
For Each f1 in fc
X = f1.name
MsgBox f1.name
Next
</script>
In the end, when the submit button is pressed, a file executes to remove the current menuext key and recreate it by importing the selected registry files.
Could someone point me to a tutorial please? Either JavaScript or VBS. I have been looking but so far have not found a way to create the form. I need to write a function to do it, but am stumped.
I am such a Newbie!
Thanks in Advance,
Mo
My problem is I am very new to scripting and am not sure if this next part can be done.
I want to create a form. Possibly an array of Checkboxes? Each checkbox would represent one of the files in the folder.
Here's the code for an hta which enumerates each file name in the folder and returns a messagebox for each filename.
<script Language = "vbscript">
Dim fso, f, f1, fc, s ,X, Y,key, Z, B, Q
Set WshShell =CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("Regfiles")
Set fc = f.Files
For Each f1 in fc
X = f1.name
MsgBox f1.name
Next
</script>
In the end, when the submit button is pressed, a file executes to remove the current menuext key and recreate it by importing the selected registry files.
Could someone point me to a tutorial please? Either JavaScript or VBS. I have been looking but so far have not found a way to create the form. I need to write a function to do it, but am stumped.
I am such a Newbie!
Thanks in Advance,
Mo