I write a vb code to know the novell server name, but it gives me my computer name like //computername
|
Code:
|
Function get_novell_user() As String '* This function will return the Novell Username for the currently logged-in user. '* Returns String Dim oShell As Object Dim oEnvironment As Object '* Create a reference to the Windows Script Host (WSH) shell object Set oShell = CreateObject("WScript.Shell") Set oEnvironment = oShell.Environment("Process") '* oEnvironment is a collection of environment variables. Pass the key of the variable you're '* looking for and it will return the corresponding value. In this case, the key is NWUSERNAME get_novell_user = oEnvironment("logonserver")End Function |