View Full Version : OppLocks Settings in SetupBuilder 7
NewsArchive
03-30-2012, 12:42 AM
The attached zip file has the SetupBuilder 7 script that will set the
OppLocks settings for TPS based applications.
Ben E. Brady
NewsArchive
03-30-2012, 12:42 AM
I knew you never did nothin' for nobody, nohow.<g>
Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
This post may self-destruct at any moment
NewsArchive
03-30-2012, 12:43 AM
Dammit Jefferey, I told you to keep your big mouth shut about it...
Ben E. Brady
--
Ben E. Brady via Samsung Skyrocket
NewsArchive
03-30-2012, 12:43 AM
Ben, Ben, Ben
> Dammit Jefferey, I told you to keep your big mouth shut about it...
You referenced Jeff, "mouth" and "shut" in one sentence. You should
know better!<g>
--
Lee White
RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com
Enhanced Reporting: http://CreativeReporting.com
Product Release & Update Notices
http://twitter.com/DeveloperPLUS
NewsArchive
03-30-2012, 12:43 AM
Hey, I resemble that remark<g>
Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
This post may self-destruct at any moment
NewsArchive
03-30-2012, 12:44 AM
Hi Lee,
Yeah, I know... But I guess I was still caught up in all the excitement of doing a favor for someone.
Ben E. Brady
--
Ben E. Brady via Samsung Skyrocket
NewsArchive
03-30-2012, 12:44 AM
I won't tell...<g>
Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
This post may self-destruct at any moment
NewsArchive
03-31-2012, 12:56 AM
Zing!
Mike Hanson
www.boxsoft.net
NewsArchive
03-31-2012, 12:57 AM
Thanks, Ben. I'll check it out later today.
Mike Hanson
www.boxsoft.net
NewsArchive
03-31-2012, 12:57 AM
Ben,
> The attached zip file has the SetupBuilder 7 script that will set the
> OppLocks settings for TPS based applications.
Cool! Would you mind if I converted your project code to a reusable include
(.sbi) script?
Friedrich
NewsArchive
03-31-2012, 12:58 AM
Hi Friedrich,
Why would I mind?
Go for it!
Ben E. Brady
--
Ben E. Brady via Samsung Skyrocket
NewsArchive
03-31-2012, 12:58 AM
Hi Ben,
> Why would I mind?
> Go for it!
Perfect! Thank you!
Friedrich
NewsArchive
03-31-2012, 07:04 AM
Please send me a copy when get it.
Mike Hanson
www.boxsoft.net
NewsArchive
03-31-2012, 07:04 AM
>
> Please send me a copy when get it.
>
No problem, will do.
Friedrich
NewsArchive
05-15-2012, 01:03 AM
Did you ever get a chance to do this, or should I work from Ben's?
Mike Hanson
www.boxsoft.net
NewsArchive
05-15-2012, 05:37 AM
Mike,
>
> Did you ever get a chance to do this, or should I work from Ben's?
>
I'll upload a test "OppLocks.sbi" include script soon. It's a bit different
from Ben's to cover operating system differences.
Friedrich
NewsArchive
05-16-2012, 02:10 AM
BTW, I'll upload the "OpLock.sbi" test script later today or tomorrow...
Friedrich
NewsArchive
05-16-2012, 02:11 AM
Awesome. I promise to give you any pertinent feedback that comes to
mind. <g>
Mike Hanson
www.boxsoft.net
NewsArchive
05-16-2012, 02:11 AM
> Awesome. I promise to give you any pertinent feedback that comes to
> mind. <g>
Cool <g> :-)
I have uploaded a first test version:
http://www.lindersoft.com/projects/oplock_0900.zip
Just add it to your project and compile. Does it work? What do you think?
Thanks,
Friedrich
NewsArchive
05-16-2012, 02:11 AM
That's quite a script! <g> Don't you love registry entries.
You've obviously done a lot of research to determine the correct
registry entries. Are you fairly confident that you've covered the
range of possibilities (server vs. workstation; and NT+ versus 9x)?
Mike Hanson
www.boxsoft.net
NewsArchive
05-16-2012, 02:12 AM
Hi Mike,
> That's quite a script! <g> Don't you love registry entries.
>
> You've obviously done a lot of research to determine the correct
> registry entries. Are you fairly confident that you've covered the
> range of possibilities (server vs. workstation; and NT+ versus 9x)?
<G>
Yes, I think the operation system specific registry keys and values are
correct (e.g. Win9x, NT, 2000+ and Vista+).
By default, the script applies the server, workstation and read caching
registry values. It's possible to configure the script (e.g. by setting the
[_LS_OPLOCKS_READCACHING] configuration to 0 to skip read caching
manipulation).
But perhaps we should ask the user ("Would you like to configure
opportunistic locking? Yes/No") before applying the "hack".
Friedrich
NewsArchive
05-16-2012, 02:12 AM
Friedrich,
> But perhaps we should ask the user ("Would you like to configure
> opportunistic locking? Yes/No") before applying the "hack".
Fine, as long as the request includes...
Failure to change lock setting may result in data file corruption and
loss of free technical support. So, punk, do ya feel lucky?!
--
Lee White
RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com
Enhanced Reporting: http://CreativeReporting.com
Product Release & Update Notices
http://twitter.com/DeveloperPLUS
NewsArchive
05-16-2012, 02:13 AM
> Fine, as long as the request includes...
>
> Failure to change lock setting may result in data file corruption and
> loss of free technical support. So, punk, do ya feel lucky?!
Hehehehehe... :-)
Friedrich
NewsArchive
05-16-2012, 02:13 AM
Hi Friedrich,
I haven't studied your script yet, but do you also turn OFF "smb2" on a
Windows 2008 server (and Windows Vista/Windows 7) in order to disable
oplocks?
Best regards,
Jeffrey
NewsArchive
05-16-2012, 02:14 AM
Hi Jeffrey,
> I haven't studied your script yet, but do you also turn OFF "smb2" on a
> Windows 2008 server (and Windows Vista/Windows 7) in order to disable
> oplocks?
Yes, on Vista+ the script disables SMB 2. But it does not force a reboot.
The developer has to handle this situation wisely (especially on "server"
systems).
Friedrich
NewsArchive
05-16-2012, 02:15 AM
Thanks!
Best regards,
Jeffrey
NewsArchive
05-16-2012, 02:15 AM
I think you can leave the asking up to the master script (or make
asking an option too <g>). In my case, I'm just going to force it.
Two things come to mind:
- Isn't a reboot after this required?
- What if the changes are already in place? If so, then a reboot
isn't required.
Mike Hanson
NewsArchive
05-16-2012, 02:16 AM
Hi Mike,
> I think you can leave the asking up to the master script (or make
> asking an option too <g>). In my case, I'm just going to force it.
>
> Two things come to mind:
>
> - Isn't a reboot after this required?
Microsoft says that you must restart the computer for the registry changes
to take effect.
> - What if the changes are already in place? If so, then a reboot
> isn't required.
If the changes are already in place, they will be re-applied. Similar to
importing a .reg file.
Friedrich
NewsArchive
05-17-2012, 02:17 AM
I guess what would be perfect is if the script first determined
whether the changes were already in place. If not, it would apply
them and set a variable to indicate that a reboot was required.
Mike Hanson
www.boxsoft.net
NewsArchive
05-17-2012, 02:18 AM
Hi Mike,
> I guess what would be perfect is if the script first determined
> whether the changes were already in place. If not, it would apply
> them and set a variable to indicate that a reboot was required.
What you can do is to check (via "Get Registry Key Value...") all the
relevant registry values before you apply the oplock "hack". Then, based on
the result, set the reboot flag and apply the hack. And/or if oplock is
already disabled (Get Registry reports that none of the relevant values have
to be updated), do not apply it at all.
Friedrich
NewsArchive
05-17-2012, 02:19 AM
So you want me to do some work, do you? <g>
Mike Hanson
www.boxsoft.net
NewsArchive
05-17-2012, 02:19 AM
>
> So you want me to do some work, do you? <g>
>
Such a change makes the script VERY complex. See v0.901:
http://www.lindersoft.com/projects/oplock_0901.zip
Because it's such a complex animal now, it is impossible for me to test it.
The oplock.sbi was supposed to be a good "starting point" to apply the
oplock registry changes -- I just wanted to convert Ben's project into an
include script <g>.
So use "oplock.sbi" at your own risk!
Friedrich
NewsArchive
05-17-2012, 02:19 AM
Yes, I realized that potential complexity (having looked at the
original script <g>). I'll take a look to see if I can spot any
gotchas.
Mike Hanson
www.boxsoft.net
NewsArchive
05-17-2012, 02:20 AM
It looks like you may have your "changed" logic backwards. You get
the value from the registry. Then you check if it equals the desired
value, and set Changed=1. Shouldn't it check if the it *doesn't*
equal the desired value?
Mike Hanson
www.boxsoft.net
NewsArchive
05-17-2012, 02:21 AM
Mike,
> It looks like you may have your "changed" logic backwards. You get
> the value from the registry. Then you check if it equals the desired
> value, and set Changed=1. Shouldn't it check if the it *doesn't*
> equal the desired value?
I'll re-check this. Perhaps I got caught in the "copy and paste" hell <g>
Friedrich
NewsArchive
05-17-2012, 02:21 AM
Also, is it only the oplocks setting that requires a reboot? What
about the read caching setting?
Mike Hanson
www.boxsoft.net
NewsArchive
05-17-2012, 02:22 AM
Can you remind me why we need to turn off the oplocks.. and is it only for
tps files? I used to worry about it, but after Vista got a few updates we
had hardly any customers that needed oplocks turned off... at least we
weren't getting any problems. All new files I'm adding to our software, and
any new software I'm building I use tps files... so is there a problem with
those, or still a problem with both tps and dat files?
Thanks,
Ray
NewsArchive
05-18-2012, 12:44 AM
Mike,
> It looks like you may have your "changed" logic backwards. You get
> the value from the registry. Then you check if it equals the desired
> value, and set Changed=1. Shouldn't it check if the it *doesn't*
> equal the desired value?
Argh! You are 100% correct. It should be "Not Equal" instead of "Equal".
I'll upload 0.902 today.
Thank you for bringing this to my attention.
Friedrich
NewsArchive
05-18-2012, 12:44 AM
Okay, here we go:
http://www.lindersoft.com/projects/oplock_0902.zip
Friedrich
NewsArchive
05-18-2012, 12:44 AM
Thanks. I'll check it out.
Mike Hanson
www.boxsoft.net
NewsArchive
05-18-2012, 12:45 AM
It's for ISAM files of any type, when all users are touching the
datafiles directly. In client-server (i.e. SQL), it's not an issue.
Mike Hanson
www.boxsoft.net
NewsArchive
06-08-2012, 01:41 PM
Hi Friedrich,
Please look at this article to disable SMB2 on Vista+:
http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm
You can read the following:
===
To disable SMB 2.0 for Windows Vista or Windows Server 2008 systems that
are the “client” systems run the following commands:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
===
So does that mean that the following registry setting won't work on the
CLIENT MACHINE?!:
HKLM\System\CurrentControlSet\Services\LanmanServe r\Parameters
SMB2=0
Best regards,
Jeffrey
NewsArchive
06-08-2012, 01:42 PM
Jeffrey,
The oplock.sbi makes use of this method to disable SMB 2.0 on Windows
Vista+:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/e2cd9835-6f02-4c03-afaf-6060a2e91ee1
Friedrich
NewsArchive
06-08-2012, 01:43 PM
Hi Friedrich,
Yes, I have seen that.
If I understand correctly, to DISABLE SMB2 (so that you CAN disable
opportunistic locking):
Option 1:
You use the SMB2=0 registry setting when the Vista+ machine is acting as
a SERVER.
Opion 2:
Otherwise, when using the Vista+ machine as a CLIENT, you need to use:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
ONLY after SMB2 is disabled, you CAN disable opportunistic locking.
So my question is:
Will the SMB2=0 registry setting also work when the Vista+ machine is
acting as a CLIENT?
Let me explain further:
My customer has a new Apple OS 10.7.3 Lion Server (before: a Windows
2003 SBS Server).
As of OS 10.7, Apple use *their own* SMB2 protocol and SMB2 can't be
turned off and also opportunistic locking can't be turned off on the
Apple server!
Our TPS files are on a SMB share on the Apple server and the TPS files
are getting corrupted at this moment, because we can't turn off SMB2
(and opportunistic locking) on the Apple server.
This is a big problem!
The clients are Windows 7 machines, so that means that we have to turn
off SMB2 (and opportunistic locking) on the Windows 7 CLIENTS.
So what do we have to use on the Windows 7 clients?
Option 1 or Option 2 (see above)?!
IF we need to use option 2 to turn off SMB2 on the Windows 7 clients,
how can we handle the following with SetupBuilder?:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
I hope you understand my problem?
Best regards,
Jeffrey
NewsArchive
06-08-2012, 01:44 PM
Hi Jeffrey,
The problem is that Microsoft does not provide an official statement. So
you have to find out if "sc config" has negative side effects in your case.
There are quite a few resources available, but no "official" word from
Microsoft.
http://www.axon-it.com/2010/11/16/microsoft-office-files-slow-to-open-from-network-share-on-sbs-2008-from-windows-7-clients/
Yes, you can handle the "sc config" stuff from the include script. Just use
the "Run Command Line..." script function.
Friedrich
NewsArchive
06-08-2012, 01:44 PM
Thanks!
Best regards,
Jeffrey
NewsArchive
06-10-2012, 02:59 AM
Hi Friedrich,
I found this nice article to disable SMB2 and opportunistic locking on
Windows 7 CLIENTS via the registry:
http://www.tcpj.com/caching.pdf
Best regards,
Jeffrey
NewsArchive
06-10-2012, 02:59 AM
Hi Jeffrey,
That looks really good, particularly the Windows 7 and SMB2 stuff.
Thanks for posting.
Graham
NewsArchive
06-10-2012, 03:00 AM
SWEET
Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
This post may self-destruct at any moment
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.