Hello everyone,
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.
Function GetDomainsAndWorkgroups
' DISCONNECTED RECORDSET
Const adVarChar = 200
Const MaxCharacters = 255
Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "Domain", adVarChar, MaxCharacters
DataList.Open
Set NameSpace = GetObject("WinNT:")
For Each DomainObj In NameSpace
DataList.AddNew
DataList("Domain") = DomainObj.Name
DataList.Update
Set DomainObj = Nothing
Next
Set NameSpace = Nothing
DataList.Sort = "Domain" ' & " ASC"
Set GetDomainsAndWorkgroups = DataList
Set DataList = Nothing
End Function