I have a function which retrieves existing domains in the network and stores the names in a disconnected recordset (to show them in a part of the page).
It is called inside a HTA, and while it runs (it is a somewhat lengthy process, around 30 seconds) the HTA interface is completely frozen.
I tried to show an animated GIF to indicate a running task, but it gets frozen too.
I tried various techniques like "Sleep", "SetInterval", "SetTimeOut", but nothing seems to work acceptably.
Ideal would be to make it run as a separate thread/process, but I did not find any useful information.
Does anyone have some suggestions about that?
Thank you very much.
' DISCONNECTED RECORDSET
Const adVarChar = 200
Const MaxCharacters = 255
Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "Domain", adVarChar, MaxCharacters
Set NameSpace = GetObject("WinNT:")
For Each DomainObj In NameSpace
DataList("Domain") = DomainObj.Name
Set DomainObj = Nothing
Set NameSpace = Nothing
DataList.Sort = "Domain" ' & " ASC"
Set GetDomainsAndWorkgroups = DataList
Set DataList = Nothing