Can't find registry key to disable OPlocks(opportunistic locking)

I'm having a problem with a server side application that randomly freezes up on all workstations. I contacted the vendor and they suggested disabling opportunistic locking. They sent me the location of the key and I've also looked it up on Microsoft but the key OplocksDisabled & EnableOplocks are not present.

From Vendor:

(Workstation registry entry)
1.      OplocksDisabled REG_DWORD 0 or 1
2.      Default: 0 (not disabled)
3.      Set to "1"
Note: The OplocksDisabled registry value configures Windows clients to either request or not request opportunistic locks on a remote file.
(Server registry entry)
1.      EnableOplocks REG_DWORD 0 or 1
2.      Default: 1 (Enabled by Default)
3.      Set to "0"

Here are snapshots of regedit:

 Windows XP
 Server 2003

Server 2008 R2
Can someone help me disable opportunistic locking on my Workstations and Servers. Thanks.
Who is Participating?
themrrobertConnect With a Mentor Commented:
Add both keys and then Set enabled = 0   and  oplocksdisabled = 1

afterwards restart the program, maybe even the computer.

then I would search through the registry for Keys named OplocksDisabled and the other one as well, to make sure they aren't in a different branch.

mlsbravesAuthor Commented:
Would there be an easy way to make a .reg file so I can easily merge this into the registry?
mlsbravesAuthor Commented:
Would this be the correct syntex?:

Windows Registry Editor Version 5.00


Open in new window

johnb6767Connect With a Mentor Commented:
I am partial to cmd line......

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters" /v "OplocksDisabled" /t reg_dword /d "0x1" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "EnableOplocks" /t reg_dword /d "0x0" /f

Or .reg format.....

Windows Registry Editor Version 5.00

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.