Notes 9.0.1 NotesSession在vbscript中返回null

Notes 9.0.1 NotesSession在vbscript中返回null,vbscript,lotus-notes,Vbscript,Lotus Notes,我在Notes 8.5中运行了一个脚本,它启动了Notes会话并发送了一封带有附件的电子邮件。它工作得很好。然后我升级到Notes 9.0.1,现在当我尝试启动Notes会话时,返回空值。下面是从我使用的代码中剪下的代码。当我回显服务器时,我看到空值。会话中是否需要Notes 9.0.1中的新功能,或者GetEnvironmentString方法中是否需要提供其他参数?谢谢 ' Start a session to notes wscript.echo "## Connecti

我在Notes 8.5中运行了一个脚本,它启动了Notes会话并发送了一封带有附件的电子邮件。它工作得很好。然后我升级到Notes 9.0.1,现在当我尝试启动Notes会话时,返回空值。下面是从我使用的代码中剪下的代码。当我回显服务器时,我看到空值。会话中是否需要Notes 9.0.1中的新功能,或者GetEnvironmentString方法中是否需要提供其他参数?谢谢

    ' Start a session to notes 
    wscript.echo "## Connecting to Lotus Notes session..." 
    Set oSession = CreateObject("Notes.NotesSession") 

    wscript.echo "## GetEnvironmentString..." 
    strServer = oSession.GetEnvironmentString("MailServer",True) 
    wscript.echo("Server           :" & strServer) 

    strUserName = oSession.UserName 

    strMailDbName = Left(strUserName, 1) & Right(strUserName, (Len(strUserName) - InStr(1, strUserName, "")))&".nsf" 
    wscript.echo("MailDbName        :" & strMailDbName) 

    wscript.echo "## Getting current Notes database..." 
    ' open the mail database in Notes 

    set oCurrentMailDb = oSession.CurrentDatabase 

Notes COM类的注册可能有问题。试着打开一个命令行窗口,将CD放入Notes程序目录,然后执行命令“regsvr32 nslxbe.dll”Richard,这就成功了,非常感谢!Richard,注册表在我完成后就可以正常工作,但是经过一段时间之后,我的脚本再次执行,我面临同样的错误。你知道什么会破坏我的注册表设置吗?谢谢你重新安装了吗?有几件事。1.)我刚刚注意到您使用的是Notes.NotesSession而不是Lotus.NotesSession。这意味着您使用的是OLE类而不是COM类。除非您真的需要一个NotesUI类(只能通过OLE使用),否则我将切换到使用Lotus.notession。2.请参阅此处的问题和答案重新测试会话:3。这是在32位还是64位Windows上运行?