Reading Registry



Hi,

I am using the below script to determine the users which are still not
on LotusNotes Ver7.0. For this I am checking the registry. But a lot
of times I get no output out on the LNVer(). Does anyone has an idea
why ??

strComputer = "."
Set WSShell = CreateObject("WScript.Shell")
abc = "%comspec% /c Echo " &LNVer()&">\\xxxx\yyy$
\"&compname()&"_"&"%username%.txt"
WSShell.run abc ,0, True

Function LNVer()
Const HKLM = &H80000002
Set oReg =GetObject("Winmgmts:root\default:StdRegProv")
sKeyPath = "Software\Lotus\Notes\7.0"
sRegKey = Trim(sRegKey)
If oReg.EnumValues(HKLM, sKeyPath, aValueNames, aValueTypes) = 0
Then
LNVer = "7.0"
Else
LNVer = "Not 7.0"
End If
End Function

.


Loading