Created 2012-09-07 08:50:08 by Nils G. Svedmyr on NILS-W510 [ Header and license information ]

Class List


Class cRegCheck2

Source: REGCHECK2.PKG
Baseclass: cObject


Properties

Procedures

Functions

pbRegistryChangesNeeded - Property
***** Properties that are set by the main DoCheckRegistrySettings message.
The pbRegistryChangesNeeded property is set by the DoCheckRegistrySettings and
is set to True if one or more registry change are needed.
See also the property ptRegChangesToDo.
Registry changes are made by the CS_RegChangeProgram program,
and is triggered by the DoCheckRegistrySettings procudure.
The CS_RegChangeProgram program is not run automatically
by the test program - RegCheck2Text.src. Instead there's a button to click.
The pbReportOnlyState property can be used for this purpose.

ptRegChangesToDo - Property
This struct property will hold all registry changes that are necessary.
The struct property is changed by the DoCheckRegistrySettings message.

pbRegistryChangeFailed - Property
Property set by the DoWriteRegistrySettings message - that is called
from the CS_RegChangeProgram program - if a registry value couldn't be set

pbRegistryWriteAccessDenied - Property
Property set by the DoWriteRegistrySettings message - that is called
from the CS_RegChangeProgram program - if writing was denied to the registry

pbServicePackUpdateNeeded - Property
pbServicePackUpdateNeeded is set to True if a service pack needs to be installed
for the current Windows version.

phoLogObject - Property
Log file object. By default it is a text file.
Can be changed to be a database table.

pbAdminRights - Property
Is the program run with administrator rights?

pbReportOnlyState - Property
***** The next series of properties can be set in the ghoRegCheck2 object
to control the behaviour of RegCheck2.
Set to true if you only want to report current registry settings - but not try
to change them. This is e.g. used by the test program to report current settings.

pbDoServerRegistryChanges - Property
Make Server registry changes on all machines?
A machine might be used both as a client and a server, so it safest to
always make registry changes as if the machine is a server. It won't affect
performance if the machine is not used as a server machine.
If you don't want RegCheck2 to make any Server registry changes - set it to False.
It is recommended to set it to True.

pbSilentMode - Property
Ask user before making changes?

pbDriverBruteForce - Property
To force a change of the registry even if there are more than the 'DATAFLEX' database driver loaded.
It is possible that a (example accounting) Pervasive database get consulted for info while
the rest of the data is the embedded DataFlex database.
Note: If you set it to FALSE, and you have more than the 'DATAFLEX' loaded,
NO changes to the registry will be made! (In case this whole package is meaningless)

pbTestServicePack - Property
Should we check for the currently installed service pack and if it is to low
deny running the application?

pbRevertRegistryValues - Property
Be carefull with the following property! If set to True, it will reset all
registry values to their original Windows values as defined by MSDN. This could
come in handy if you previously have used the embedded DataFlex database and are
now going to use an SQL database, where the changes made by this
package aren't needed anymore.

pbChangeHighDataIntegrity - Property
If this property is True, the DF_HIGH_DATA_INTEGRITY will
be set to True. If set to false; DF_HIGH_DATA_INTEGRITY will not be changed.
From the VDF help:
If DF_HIGH_DATA_INTEGRITY is True, all disk writes (save, delete, etc.) are immediately
followed by a low level file close. This forces the O/S to Write the table's buffers
to disk and to update the table's folder entry, while this offers some protection from
power failures and system crashes, it also degrades performance.
This setting only applies to Embedded Database tables.

piRunOnUnknownVersion - Property
Default Settings for on which Windows platforms the VDF program is allowed to run.
Home versions and not known windows version runs with a warning.
Do NOT make changes here, make them in the ghoRegCheck2 object.
However, if older than XP we never allow program to run.

piMinXP_ServicePack - Property
Minimum service packs for various windows versions.
Do NOT make changes here. Change properties in the ghoRegCheck2 object.
Client OS's:

piMinServer2K3_ServicePack - Property
Server OS's:
Windows Server 2003 (released with Windows XP)

piMinServer2K8_ServicePack - Property
Windows Server 2008 (released with Windows Vista)

piMinServer2K8R2_ServicePack - Property
Windows Server 2008 R2 (released with Windows 7)

piMinServer2K12_ServicePack - Property
Windows Server 2012 (released with Windows 8)

pbNTServer - Property
***** The next series of properties are info about the Operating System.
They are set by the procedure DoSetOSProperties, which is send from
the automatically invoked DoCheckRegistrySettings.
The Windows version is a server version

pbWindowsHome - Property
Running on a Windows HOME version.
These are _not_ recommended platforms for business (networking is limited).
So not for running VDF programs on.

pbX64 - Property
pbX64 is set to true if your host OS is x64

pbRemoteDesktop - Property
pbRemoteDesktop is set to true if your application currently runs under a remote desktop session

piMajorVersion - Property
Identifies the major version number of the operating system.
Example: For Windows XP the major version number is 5.

piMinorVersion - Property
Identifies the minor version number of the operating system. For example,
Example: For Windows XP the minor version number is 1.

piBuildNumber - Property
Identifies the build number of the operating system.

piPlatFormId - Property
Identifies the operating system platform. This member can be one of the
following values:
VER_PLATFORM_WIN32_WINDOWS Win32 on Windows 95 or Windows 98.
VER_PLATFORM_WIN32_NT Win32 on Windows NT.

psCSDVersion - Property
Contains a string, such as "Service Pack 3",
that indicates the latest Service Pack installed on the system. If no
Service Pack has been installed, the string is empty.

piServicePackMajor - Property
Identifies the major version number of the latest Service Pack installed
on the system. For example, for Service Pack 3, the major version
number is 3. If no Service Pack has been installed, the value is zero.

piServicePackMinor - Property
Identifies the minor version number of the latest Service Pack installed
on the system. For example, for Service Pack 3, the minor version
number is 0.

piSuiteMask - Property
A set of bit flags that identify the product suites available on the system.

psSuite - Property
The psSuite string only contains features which can be enabled or not, so it is NOT
a direct mapping to piSuiteMask. An example of this is if you are in a remote desktop
session or not.

psEdition - Property
The Edition string contains specific details about the platform that cannot be
enabled as a role. So "Home" Edition or "Datacenter" edition are good examples.
R2 is a peOSVersion

piProductType - Property
Indicates additional information about the system.

psOSVersion - Property
Contains which version of windows is running as a TEXT string.
If it can not sort it out it will be CS_OSVERSION_UNKNOWN (="Windows Version UNKNOWN")

psOSShortVersion - Property
This is the windows version in text only e.g "Windows 7"

psComputerName - Property
***** Other properties that can be queried:
These properties are set by the end_construct_object procedure.

DoCheckRegistrySettings - Procedure
***** MAIN READ Procedure! *****
Checks which Windows version is running and calls the appropiate procedures & functions
to change the registry.
This must be send from your program after the Use of this package (see top of package)
Syntax:
Use RegCheck2.pkg
Send DoCheckRegistrySettings of ghoRegCheck2
Note: There is also a DoWriteRegistrySettings message that you should _not_ send or use.
It is used by the external program CS_RegChangeProgram, that is
used to make registry changes. (Due to the need for administrator rights)

DoWriteRegistrySettings - Procedure
***** MAIN WRITE Procedure! *****
Here registry changes are made (written to the registry)
Note: You should _not_ need to send this message. It is used by the external
program CS_RegChangeProgram - that is automatically run to make registry changes.
This logic is due to the need for administrator rights.
The following registry changes are made if applicable:
Client Settings:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled = 1 (Type = Dword) (Default = 0)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\UseOpportunisticLocking = 0 (Type = Dword) (Default = 1)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\DirectoryCacheLifetime = 0 (Type = Dword) (Default = 10)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\FileNotFoundCacheLifetime = 0 (Type = Dword) (Default = 5)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\FileInfoCacheLifetime = 0 (Type = Dword) (Default = 10)
Server Settings:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\EnableOplocks = 0 (Type = Dword) (Default = 1)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB2 = 0 (Type = Dword) (Default = 1)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB3 = 0 (Type = Dword) (Default = 1?)

DoCheckClientRegistrySettings - Procedure
************************* Client Registry Settings *************************
Message that is called by DoCheckRegistrySettings and checks client registry settings.

DoCheckServerRegistrySettings - Procedure
************************* Server Registry Settings *************************
Message that is called by DoCheckRegistrySettings and checks client registry settings.
VDF requires Opportunistic file locking be disabled at an NT based
server when using the embedded database.
The following registry changes are applied by this procedure:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\EnableOplocks = 0 (Type = Dword)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB2 = 0 (Type = Dword)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB3 = 0 (Type = Dword)

IniFileValue String sSection String sValueName String sValue - Procedure Set
*** Generalized messages to Get & Set values of the ini file.
*** The ini file is CS_IniFileName and is kept in the Data folder.
Set a value in RegCheck2's ini file (write)
Pass a section name, the value name parameter and the value itself to be written.

DoWriteLog String sText - Procedure
Write changes to a log file, which is
either a .txt file or database file depending on the object
used at the bottom of this code. Default = Log to RegCheck2.txt

LoggOffUser - Procedure
Send message to log out the current user from Windows

RebootMachine - Procedure
Send "RebootMachine" to reboot the computer.
120 = 2 minutes before the reboot takes place so user should have plenty of time
to save any unsaved data.

DoSetOSProperties - Procedure
Message that sets all OS related properties.

IniFileValue String sSection String sValueName String sDefaultValue Returns String - Function
Get a value from RegCheck2's ini-file (read)
Pass a section name and the name of the value parameter & a default value.
Returns the value

IsRegistryStringValue String sKey String sSubKey String sValueName Integer ByRef iErrCode Returns String - Function
For a deeper explanation of this function and its params see the IsRegistryValue function.
This function is only here to return a correct type value (STRING)
Important: The iErrCode must be passed as a ByRef parameter! It will contain the
error code - if any - or zero if successful.
If iErrCode <> 0 the return value has no meaning.
Example: Get IsRegistryStringValue CS_MRXSmb CS_Parameters CS_OplocksDisabled (&iErrCode) to sRetval
If iErrCode < 0 an error occured.

IsRegistryDwordValue String sKey String sSubKey String sValueName Integer ByRef iErrCode Returns DWord - Function
For a deeper explanation of this function and its params see the IsRegistryValue function.
This function is only here to return a correct type value (DWORD)
Important: The iErrCode must be passed as a ByRef parameter! It will contain the
error code - if any - or zero if successful.
If iErrCode > 0 the return value has no meaning.
Example: Get IsRegistryDwordValue CS_MRXSmb CS_Parameters CS_OplocksDisabled (&iErrCode) to dwRetval
If iErrCode < 0 an error occured.

IsRegistryValue String sKey String sSubKey String sValueName Boolean bStringValue Returns Integer - Function
To fetch a value from the HKEY_LOCAL_MACHINE registry branch.
Do _not_ use this function - instead use one of the more specialized
functions IsRegistryStringValue or IsRegistryDwordValue above.
Parameters:
sKey - e.g. "System\CurrentControlSet\Services\MRXSmb"
sSubKey - e.g. "\Parameters"
sValueName - e.g. "OplocksDisabled"
bStringValue - True = String value. False = Dword value.
Note: The passed sSubkey _must_ start with a "\" (backslash).
Returns:
Integer equal to 0 or higher if operation was successful! (the actual registry value is returned)
CI_RegObjectNotCreated if the registry object couldn't be created.
CI_KeyDoesNotExist if the sKey doesn't exist
CI_KeyWasNotOpened if the sKey couldn't be opened
CI_SubKeyDoesNotExist if the sSubKey doesn't exist
CI_SubKeyWasNotOpened if the sSubKey couldn't be opened
CI_ValueNameEmpty if the sValueName was empty (program error)
* I don't think this should be returned - it just creates an extra logfile row: CI_ValueNameDoesntExist if the sValueName doesnt' exist

WriteRegistryValue String sKey String sSubKey String sValueName String sValue Boolean bStringValue Returns Integer - Function
To create a new registry dword value name and/or set it's value in
Windows HKEY_LOCAL_MACHINE registry branch.
Parameters:
sKey - e.g. "System\CurrentControlSet\Services\MRXSmb"
sSubKey - e.g. "\Parameters"
sValueName - e.g. "OplocksDisabled"
dWordValue - e.g. 1
bStringValue - True = String value. False = Dword value.
Note: The passed sSubkey _must_ start with a "\" (backslash).
Returns:
CI_Success IF OPERATION WAS SUCCESSFUL (=0)
CI_RegObjectNotCreated if the registry object couldn't be created.
CI_KeyDoesNotExist if the sKey doesn't exist
CI_KeyWasNotOpened if the sKey couldn't be opened
CI_SubKeyDoesNotExist if the sSubKey doesn't exist
CI_SubKeyWasNotOpened if the sSubKey couldn't be opened
CI_ValueNameEmpty if the sValueName was empty (program error)
CI_ValueNameNotCreated if the sValueName could not be created/set
CI_RegValueIncorrect if the dWordValue was not be set correctly

IsRegistryKey String sKey Returns Integer - Function
Helper function.
Used by the two main registry functions; IsRegistryValue & WriteRegistryValue
Parameters:
sKey is a registry key in HKEY_LOCAL_MACHINE
Returns:
CI_Success if operation was successful!
CI_RegObjectNotCreated if the registry object couldn't be created.
CI_KeyDoesNotExist if the sKey doesn't exist
CI_KeyWasNotOpened if the sKey couldn't be opened

ConvertRegistryErrCodeToText Integer iErrCode Returns String - Function
Converts a registry error to an error text string, that can be
written to the logfile.
Parameters:
Pass the iErrCode returned from the IsRegistryStringValue
or IsRegistryDwordValue functions.
Returns:
A corresponding error text to the passed iErrCode

NetbiosComputerName Returns String - Function
Function that returns the Computer Name.
Gets called by the End_Construct_Object and
sets the class psComputerName property.

GetUserLoginName Returns String - Function
Function returns the User Name if user logged on to a network, else returns ''.
Gets called by the End_Construct_Object and
sets the class psUserLoginName property.


Header and license information

****************************************************************************
$Module type: Package
$Module name: RegCheck2.pkg - Evolved from RegCheck.pkg introduced in 1998!
Uses RegCheck2.inc, cOSVersionInfo.pkg, _and_
Language.pkg & LangSymb.pkg from VdfQuery (by Sture Andersen).
$Author : Nils G. Svedmyr, RDC Tools International.
Copyright (c) 1998-2012 RDC Tools International
E-mail : nils.svedmyr@rdctools.com
Web-site : http://www.rdctools.com
Created : 1998-12-21 @ 15:04 (Military date format - Year-Month-Day)
The code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is free software; you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License - see the "GNU Lesser General Public License.txt"
in the help folder for more details.
Sponsors: There was a call on the newsgroup for sponsorship for the update of the RegCheck package to RegCheck2 and
I was very pleased to see that quite a few were willing to make donations to make this project come true.
Newsgroup link: http://support.dataaccess.com/Forums/showthread.php?48205-RegCheck2-sponsorship-invitation&p=240435#poststop
And the proud sponsors are: (Thanks to all of you!)
===================================================
Wil van Antwerpen, Garret Mott, Richard Hogg, Dave Porter, Todd Forsberg, Renato Villa,
Michael Mullan, James Albright, Jim Ward, Robert Worsley, Larry Pint, Anders ™hrt,
Dan Walsh, Riaz Merchant, Dave Robinson, Mike Cooper, Pieter van Dieren and Mika Vainio.
These persons are also listed as sponsors at vdf-guidance:
http://www.vdf-guidance.com/ContribPage.asp?Page=PKGCLSREGCHECK2N&ContribRecId=130
Contributors: (To the code)
Frank G. Vandervelpen, Peter H. van Wijk, Vincent Oorsprong, Ulbe Stellema, Peter Tawse,
Sergey Natarov, SJK, Bob Worsley and Wil van Antwerpen and Chuck Atkinson.
Thanks also goes to Dennis Piccioni at Data Access Worldwide for putting together
the white paper: "Opportunistic Locking and Read Caching on Microsoft Windows Networks"
http://www.dataaccess.com/whitepapers/opportunlockingreadcaching.html
Quote from the above white paper:
=================================
- "Improperly configured Windows networks can lead to data corruption in any file system
database, including the embedded (DataFlex) database. Two Windows networking behaviors,
opportunistic locking (on Windows servers) and read caching (on Windows clients) are sources
for corruption potential."
- "Windows Terminal Services and Citrix:"
"Under normal use for these environments, users log onto a Windows server and run applications
locally on that server. If, however, an embedded database is located on another server than the
one running WTS/Citrix, oplocks between the WTS/Citrix server and the database server must be disabled."
Purpose: This package only applies to the embedded DataFlex database. It does NOT apply if
you are running MS-SQL, Pervasive, IBM DB2 or some other database system.
Why use it? Even If you're careful to implement the correct registry settings when deploying
your VDF application with the embedded DataFlex DBMS, some weirdo - e.g. a system administrator ;-)
or other installed software - e.g. Norton Security Suite - will apply changes that potentially
will be very dangerous to the integrity of your database. This package - when put at the top of
your program - will simply detect the client/server Windows version and check that the machine
registry settings are correct. If applicable it will perform necessary registry changes, although
it will - by default - ask the user for confirmation first. Changes to the registry is performed by
an external program also included in the RegCheck2 workspace - REGCHECKCHANGER.SRC
You will need to deploy the RegCheckChanger program _and_ its manifest file with your application.
IMPORTANT: If you run this code on a workstation - the package will change
settings for that workstation only!
*** If you need to change settings on a SERVER, you need to
run your program on the server as well (at least once)!
To clarify: Newer server editions of Windows supported by this
package does _not_ need to be changed - UNLESS you are
also using the server as a workstation.
After registry changes has been made by RegCheck2, the USER IS ASKED TO REBOOT THE MACHINE
for changes to take effect. This is a precaution because nowere in the Windows documention
does it read that these registry settings are read for each network communication request (simply unlikely).
Compatability:
Structs are used by this package and were introduced with VDF 11.0 so it is the
earliest VDF version that this code can be used with.
Usage: Put a "Use RegCheck.pkg" at the top code of your VDF .src file, after
the cWorkspace or cApplication Object and add the following line to run the logic:
"Send DoCheckRegistrySettings of ghoRegCheck2 // Start registry checking (Main procedure)"
See also: The IsLicenseSingleUser function for an alternative syntax.
NOTE! This is a change from how the older RegCheck version worked,
were the DoCheckRegistrySettings was send automatically - it no longer is!
object at the bottom of this file.
IMPORTANT: You also MUST DEPLOY REGCHECKCHANGER.EXE and its manifest file.
You may want to check/adjust the default property settings, which can be done
in the ghoRegCheck2 object at the end of this package.
NOTE: There is a 'EmbedManifestFile.bat' in the programs folder
of the RegCheck2 workspace. What it does is to embed the
RegCheck2Changer.exe.manifest (the manifest file) into the
RegCheck2Changer.exe executable.
Run the 'EmbedManifestFile.bat' after a recompile of the RegCheck2Changer
program to embed the manifest into the exe file.
Then you don't need to deploy the manifest file!
The Mt.exe program in the programs folder is a Microsoft program and should
_never_ be deployed. It is used by the .bat file.
Main messages:The two main messages are:
DoCheckRegistrySettings - Reads registry and sets properties
DoWriteRegistrySettings - Write registry changes. Called by the RegCheckChanger.exe program.
Bugs: There's a WhatsNew.txt in the AppSrc folder that describes changes and
known bugs.
Documentation:The cRegCheck2.htm file in the Help folder contains the full class documentation.
It can also be read by pressing the Help button in the test program.
Note: If you are using *SAMBA* you need to turn off oplocks by placing the following
lines in your [Global] section or in the section relevant to the share your data resides
RegCheck2 does NOT do this for you - You need to do it yourself manually.
- Actually I dont' know where the SAMBA ini file is stored...
Code:
oplocks = No
level2 oplocks = No
Samba is used on Linux/Unix machines and on many NAS devices and provides file and print services for
various Microsoft Windows clients and can integrate with a Windows Server domain. It
can also be part of an Acive Directory domain.
$Rev History (Most of this is from the old RegCheck package)
1998-12-21 Module header created
1999-01-02 NGS Changed package into a class.
1999-01-03 NGS Added standard status log support.
1999-01-08 NGS Removed hard-coded channels for Direct_Input and
Direct_Output. The Seq_Chnl package is now used instead.
This is to avoid possible conflicts with other packages or
source code that might use the same channels.
1999-01-28 NGS Added the function FindNetwareConnection to check if user is
logged on to a Novell Server (Not only has Client32 installed).
1999-02-08 NGS Added public properties psComputerName psUserLoginName (Strings).
1999-02-21 NGS Added property to force the possible change of the setting even if there are
two database drivers loaded. It is possible that a (example accounting) BTrieve
database get consulted for info while the rest of the data is in DataFlex
Property Integer pbDriverBruteForce PUBLIC TRUE
Also added piFiles property, which is the number of FILES setting for Config.sys
2000-11-16 PHvW Made Changed for Windows NT 2K.
Added test for NT sp1.
Ironed out compiler error for VDF 7. So this is possible not working for VDF6
2001-11-22 PHvW Added logic for NT2k and higher. Not tested for XP
I would like this pkg to work in a way that it does stop the program or gives a warning
when run on ME and XP-Home. Do not think any vdf software should run on it.
2002-04-22 PHvW Changed a lot of code. Romeved the stuff mentioned above.
Added logic for detecting the windows version. Added properties to select
On what windows version you want to allow your application to run.
Added several error messages. Did not translate them. And are
for improvement.
Cleaned up the code for remarked not needed code since vdf7
Not tested on vdf8, minor testing (only on win2k sp2)
So far debug mode is set to on
2002-09-29 PHvW Removed stuff because of VDF8
2002-11-26 WvA Added compiler directive to avoid redefine errors for external
function Win32_WNetGetUser
Reintroduced VDF7 compatibility for now. Be aware that this
is not going to last for ever.
2003-05-05 WvA Changed references to .NET server into 2003 Server
2003-05-05 WvA Windows server 2000, 2003 and XP honour the traditional NT settings
but for these platforms there is a new setting
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled
See also: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q296264
This setting has been added for Clients only
2003-05-22 WvA Fixed a problem with the translations for the english language (Thanks Peter Tawse for finding this)
2003-06-09 WvA The DriveWriteBehind settings were wrongly written out as string while
the value should have been binary. (Thanks Renato Villa)
Renamed function ComputerName into NetbiosComputerName in order to avoid
a naming clash with Tufware's report classes.
2004-01-30 PAT Added/Improved support for windows 2003 and netware
2005-11-19 SJK Changed "Run_With_Warning" behaviour so that it doesn't bail out, but actually runs
Changed Steve's suggestion a little bit to still write out a logfile entry.
2006-09-02 RLW Add "RegCheck" to all stop_box captions so we can tell where the error comes from
2007-08-21 WvA Added support for detecting Windows Vista and windows
Server editions. Replaced OS strings with constants
Fixed uppercase for W2K stop run detection and changed defaults
A unknown windows version will warn not stop, same for the home version.
2007-09-24 WvA The Defaults were also set in the oRegCheck object which i missed to amend.
The introduction of the OS string constants missed another W2k typo in the tests.
2007-09-25 WvA There was some really funky code for detecting if run on a server,
this is now simplified and uses results from the standard API.
Fixed so that any changes for setting server properties are logged (wrong condition)
Fixed text in english/dutch, you need to restart the PC not just the program in order
to see the difference in oplock settings!
2012-07-23 NGS *** MAJOR OVERHAUL *** Class is now called RegCheck2 to distinguish from earlier version.
IMPORTANT! This package now starts with Windows 2003 Server & Windows XP.
*** It does not check for earlier versions - nor does it check for Netware ***
Removed all Netware checking and for earlier Windows versions than NT 3.1 & Windows 95.
It uses a new cOSVersionInfo class to retrieve all the OS version info.
Added support for Vista, Windows 7, up to and including Windows 8 and Server 2012.
Here is some explanatory text about the changes in newer Windows versions - Vista and up -
that is important to this package:
http://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx
With the advent of Windows Vista and Windows 7, Microsoft introduced a new network
protocol (SMB2) to optimize file sharing for WAN and low bandwidth and high latency
scenarios. to optimize these types of file access scenarios, Microsoft performed design
decisions which lead to the inability of the new SMB2 protocol to handle cache coherency
of file meta information such as the file size, the last update time and whether the file
actually exists on the server ("file not found" status).
As a result of this design decision made by Microsoft, the SMB2 protocol with its default
configuration breaks any application relying on shared, concurrent data access. It is therefore
absolutely required to reconfigure the SMB2 cache of the local _workstation_ to not cache
file meta information - the server is not affected by these settings, unless used as a workstation also...
The workstation settings can be found under this key:
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\LanmanWorkstation\Parameters
- For server versions the following key is used:
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\LanmanServer\Parameters
The following values needs to be created and set to zero.
Microsoft Recommendations:
"If you suspect metadata caching in the redirector as cause for misbehaving applications, disable the
caches in the following order to determine which of these caches is affecting the application. Disabling the
file information cache can have significant effect on client performance and show an increase in the number
of metadata requests that are sent to the server."
1. DirectoryCacheLifetime REG_DWORD=0
2. FileNotFoundCacheLifetime REG_DWORD=0
3. FileInfoCacheLifetime REG_DWORD=0
Also note: Vista and Win 7 have automatic failover so if SMB 2 is not available,
then SMB 1 would be used instead.
With Windows 8 and Server 2012 - SMB3 is introduced. The SMB3 is disabled in the same way as SMB2 (but for the SMB3 key)
The RegCheckChanger.exe manifest file has the following setting:
// *** Administrator rights ***
Failure to provide confirmation results in the program not being launched.
****************************************************************************