thank you mmcdonal,
After a long trial and error i found this code working for me. I would like to share it to you all. It was found on the technetsite of microsoft for VBS but it seems to work fine for AccessVBA; source
http://www.microsoft.com/technet/scr.../osrgvb17.mspx
Here is the modified code;
Function fnReadTheDescription(machine)
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
Dim arrValues(0)
strComputer = machine
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\lanmanserver\pa rameters"
strValueName = "srvcomment"
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
arrValues(0) = "Description: " & strValue
fnReadTheDescription = arrValues
End Function