有一个朋友问:如何获取data目录的路径
经查帮助:发现@ConfigFile 可以获取notes.ini的绝对路径
通过解析该路径可以获取lotus/domino/data或lotus/notes/data的绝对路径
帮助里:
@ConfigFile (适用于R6以上版本)
Returns the file path for the initialization file for Lotus Notes (notes.ini).
Note This function is new with Release 6.
Syntax
@ConfigFile
Return value
notes.ini path
String. Returns the file path to the notes.ini initialization file.
Usage
When the formula is executed on the Notes client,
it returns the filename and path of the notes.ini initialization file for the Notes client.
When the formula is executed on the server or Web server (when accessed in a Web page, for example), it returns the filename and path of the notes.ini initialization file for the server.
如果运行在客户端,返回的是客户端的notes.ini路径
如果是在服务器,或是通过web运行,返回的是服务器的notes.ini的路径
还有一个方法
可以通过注册表获取lotus的路径,但是这种方法有一个问题:如果lotus是通过安装的,可以获取,不是安装的,是不能获取的,
最好的方法是还是通过@ConfigFile
博客围绕如何获取Lotus data目录路径展开。介绍了使用@ConfigFile获取notes.ini绝对路径,进而解析出lotus/domino/data或lotus/notes/data绝对路径的方法,还提到运行环境不同返回路径不同。此外,也提及通过注册表获取路径的方式,但存在局限性,推荐用@ConfigFile。
218

被折叠的 条评论
为什么被折叠?



