I'm trying to convert a piece of existing VBA code to VBS and I've hit a snag. Here's the VBA code I'm looking at.
The problem is the GetSetting function is not supported in VBS. Any ideas on how to work around this? Is there another way that I can get the same information that GetSettings returns?
Code:
Sub ShowUserName()
Dim pt As GwxPoint
On Error GoTo ErrorHandler
If SecSvr Is Nothing Then Exit Sub
Set pt = ThisDisplay.GetPointObjectFromName("~~USER~~")
If SecSvr.LoggedIn <> "" Then
pt.Value = GetSetting("HTS", "Security", "UserName", "DEFAULT")
Else
pt.Value = " "
End If
Exit Sub
ErrorHandler:
pt.Value = "Error"
End Sub
The problem is the GetSetting function is not supported in VBS. Any ideas on how to work around this? Is there another way that I can get the same information that GetSettings returns?