Speed up Lotus Notes on Windows

Here is VBScript code for setting the Java optimization flag for Lotus Notes on Windows, that you can use to speed up Lotus Notes in your company using Group Policies. It should work on Windows 7 and on Windows XP, both 32 and 64 bit.

Please give feedback if you have anything to add here. I would like to do a better script. When I tested this it worked as intended. I thing it breaks the jvp.properties file by changing the line break to Windows type (originally unix style). But Notes does not seem to mind this.

Thanks to Hogis for the original code and sorry that comments are in Swedish.



‘Speed up notes 2012-04-23

‘0 Initiera variabler
Set objFSO = CreateObject(“Scripting.FileSystemObject”) ‘Laddar FSO (File System Object) för att hantera kataloger och filer lokalt.
Set oShell = CreateObject(“WScript.Shell”) ‘Laddar oShell för att bla kunna ta ut systemvariabler, “set-parametrar”.
Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2”) ‘Connectar WMI lokalt (Windows Management Instrumentation), för att hantera processer.
Set WshShell = WScript.CreateObject(“WScript.Shell”) ‘Laddar WshShell för att kunna starta en cmd-process.
Dim strProgramPath32
Dim strProgramPath64
strProgramPath32 = oShell.ExpandEnvironmentStrings(“%PROGRAMFILES%”) ‘Tar ut sökvägen till programkatalogen.
strProgramPath64 = oShell.ExpandEnvironmentStrings(“%PROGRAMFILES(x86)%”)
Const ForReading = 1
Const ForWriting = 2

On Error Resume Next ‘ Avbryt inte för errors

Const HKEY_CLASSES_ROOT         = &H80000000
Const HKEY_CURRENT_USER         = &H80000001
Const HKEY_LOCAL_MACHINE        = &H80000002
Const HKEY_USERS                = &H80000003
Const HKEY_CURRENT_CONFIG         = &H80000005
Set oRegistry=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)

MemoryOptimizeNotes ‘Run this

Sub MemoryOptimizeNotes
Dim strJvmProp32
Dim strJvmProp64
Dim objFile
strJvmProp32 = strProgramPath32 & “\IBM\Lotus\Notes\framework\rcp\deploy\”
strJvmProp64 = strProgramPath64 & “\IBM\Lotus\Notes\framework\rcp\deploy\”

If objFSO.FolderExists(strJvmProp64) = True Then

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objFile = objFSO.OpenTextFile(strJvmProp64 & “jvm.properties”, ForReading)

strText = objFile.ReadAll
strNewText = Replace(strText, “vmarg.Xmx=-Xmx256m”, “vmarg.Xmx=-Xmx768m”)

Set objFile = objFSO.OpenTextFile(strJvmProp64 & “jvm.properties”, ForWriting)
objFile.WriteLine strNewText

ElseIf objFSO.FolderExists(strJvmProp32) = True Then

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objFile = objFSO.OpenTextFile(strJvmProp32 & “jvm.properties”, ForReading)

strText = objFile.ReadAll
strNewText = Replace(strText, “vmarg.Xmx=-Xmx256m”, “vmarg.Xmx=-Xmx768m”)

Set objFile = objFSO.OpenTextFile(strJvmProp32 & “jvm.properties”, ForWriting)
objFile.WriteLine strNewText

End If

End Sub


2 Responses to “Speed up Lotus Notes on Windows”

  1. JF Says:

    In essence, all this does is modify the maximum RAM allowed in the jvm.properties files in the Lotus program install dir under framework\rcp\deploy\

  2. Alex Says:

    You can make a guide for install?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: