Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you check leasingmode setting through the program?

Vince Wen

Programmer
Jun 15, 2024
27
HK
Is there a way to query SMB share leasing mode directly through the program? To be clear, I don't want to do this through a powershell script, as there are permissioning issues around this (simply put, I don't have the permission).

I've dug around quite a bit and I think the answer is no. But wanted to double check.

If so, is there a creative way to trigger oplocks then check if 'file access is denied' to indirectly determine if leasingmode is set to none?
 
I think you're trying to tackle this from the wrong side. It's in the interest of the users you don't have oplock problems on their LAN, so make it a requirement of your software to establish the leasing mode settting, otherwise you'll not warrant for the flawless working of your software. There's nothing to be sneaky about. Software requirements are nothing special, if there's othe requirements like minimum RAM, mimimum disk space, they also can't insist on not fulfilling them, if they want to use that software.
 
Last edited:

Part and Inventory Search

Sponsor

Back
Top