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

Posted on 2011-10-10
Last Modified: 2012-05-12
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.
Question by:mlsbraves
    LVL 13

    Accepted Solution

    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.

    LVL 3

    Author Comment

    Would there be an easy way to make a .reg file so I can easily merge this into the registry?
    LVL 3

    Author Comment

    Would this be the correct syntex?:

    Windows Registry Editor Version 5.00

    Open in new window

    LVL 66

    Assisted Solution

    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


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now