hostname entry page
<%
'Get the values sent by tasks page and store them in session variables
Dim strCurrentPage
Dim strCurrentTask
Dim strFocusItem
Dim bPartOfDomain
Dim strStatus
Dim objLocMgr
Dim varReplacementStrings
Dim strDomainErrorText
Dim strUnknownErrorText
Const DOMAIN_ERROR_TEXT = "&H40020001"
Const UNKNOWN_ERROR_TEXT = "&H40020004"
On Error Resume Next
Err.Clear
Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
If Err.number = 0 Then
strDomainErrorText = objLocMgr.GetString("salocaluimsg.dll",DOMAIN_ERROR_TEXT,varReplacementStrings)
strUnknownErrorText = objLocMgr.GetString("salocaluimsg.dll",UNKNOWN_ERROR_TEXT,varReplacementStrings)
Set objLocMgr = Nothing
End If
If strDomainErrorText = "" Then
strDomainErrorText = "Cannot change host name for domain machine. Please go to Web UI."
End If
If strUnknownErrorText = "" Then
strUnknownErrorText = "Encountered problem in setting host name. The change has been canceled."
End If
Err.Clear
strCurrentPage = Request.QueryString("CurrentPage")
strCurrentTask = Request.QueryString("CurrentTask")
strFocusItem = Request.QueryString("FocusItem")
If strCurrentPage <> "" Then
Session("Task_CurrentPage") = strCurrentPage
End If
If strCurrentTask <> "" Then
Session("Task_CurrentTask") = strCurrentTask
End If
If strFocusItem <> "" Then
Session("Task_FocusItem") = strFocusItem
End If
Dim objSaHelper
Dim strCurrentName
Set objSaHelper = Server.CreateObject("ServerAppliance.SAHelper")
bPartOfDomain = objSaHelper.IsPartOfDomain
If Err.Number <> 0 Then
strStatus = strUnknownErrorText
ElseIf bPartOfDomain = true Then
strStatus = strDomainErrorText
ElseIf bPartOfDomain = false Then
strStatus = "WorkGroup"
If Session("Hostname_Hostname") = "" Then
Session("Hostname_Hostname") = objSaHelper.HostName
End If
End If
Set objSaHelper = Nothing
%>
<%=strStatus%>
">