Use Windows.pkg Use DFClient.pkg Use cForm.pkg Use RegCheck2.pkg Activate_View Activate_oRegCheck2_View for oRegCheck2_View Object oRegCheck2_View is a dbView Set Border_Style to Border_Thick Set Size to 285 479 Set Location to 0 0 Set Label to "RegCheck 2 Test View" Set Maximize_Icon to True Set View_Mode to Viewmode_Zoom Object oViewLogFile_btn is a Button Set Size to 14 71 Set Location to 262 242 Set Label to "View Logfile" Set psToolTip to ("Open the logfile (" - CS_LogFileName - ") with the Windows associated program.") Set peAnchors to anNone Procedure OnClick String sPath Get psDataPath of (phoWorkspace(ghoApplication)) to sPath Get PathAtIndex of (phoWorkspace(ghoApplication)) sPath 1 to sPath #IF (FMAC_VERSION < 14) Runprogram Background (sPath - "\" - CS_LogFileName) #ELSE Runprogram Shell Background (sPath - "\" - CS_LogFileName) #ENDIF End_Procedure End_Object Object oRunChangeProgram_btn is a Button Set Size to 14 75 Set Location to 262 318 Set Label to "Run Change Program" Set psToolTip to "Run the change program that performs registry changes. It is only necessary to do so if the 'Registry Changes Needed' checkbox is checked and has a RED background. Else the Change Program will inform you that no changes are needed." Set peAnchors to anNone Procedure OnClick Integer iRetval String sPath sProgram Move CS_RegChangeProgram to sProgram Get psProgramPath of (phoWorkspace(ghoApplication)) to sPath Get PathAtIndex of (phoWorkspace(ghoApplication)) sPath 1 to sPath // The shell option was introduced with VDF 14. #IF (FMAC_VERSION < 14) Runprogram Background (sPath - "\" - sProgram) #ELSE Runprogram Shell Background (sPath - "\" - sProgram) #ENDIF Get YesNo_Box ("Has the" * CS_RegChangeProgram * "program changed the registry?") to iRetval If (iRetval = MBR_Yes) Begin Send RetrieveOSInfo Send DoFillList of oList End End_Procedure End_Object Object oRunWindowsUpdate_btn is a Button Set Size to 14 75 Set Location to 262 396 Set Label to "Run Windows Update" Set psToolTip to "Run Windows Update. It is only necessary to do so if the 'Service Pack Update Needed' checkbox is checked and has a RED background." Set peAnchors to anNone Procedure OnClick Runprogram Background CS_WindowsUpdate End_Procedure End_Object Object oVersionInfo_grp is a Group Set Size to 116 304 Set Location to 41 9 Set Label to "Operative System Properties" Set peAnchors to anNone Object oWindowsVersion is a cForm Set Size to 13 231 Set Location to 11 66 Set Label to "Windows Version" Set psToolTip to "Full Windows version description" Set peAnchors to anTopLeftRight End_Object Object oVersionNumber is a cForm Set Size to 13 231 Set Location to 26 66 Set Label to "Version Number" Set psToolTip to "piMajorVersion and piMinorVersion" Set peAnchors to anTopLeftRight End_Object Object oEdition is a cForm Set Size to 13 231 Set Location to 41 66 Set Label to "Edition" Set psToolTip to "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." Set peAnchors to anTopLeftRight End_Object Object oBuildNumber is a cForm Set Size to 13 231 Set Location to 56 66 Set Label to "Build Number" Set psToolTip to "Identifies the build number of the operating system" Set peAnchors to anTopLeftRight End_Object Object oServicePack is a cForm Set Size to 13 96 Set Location to 71 66 Set Label to "Service Pack" Set psToolTip to "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." Set peAnchors to anNone End_Object Object oMinServicePack is a cForm Set Size to 13 59 Set Location to 71 238 Set Label to "Min Service Pack" Set psToolTip to "piMinxxx_ServicePack. Minimum service pack that is required for the current windows version. If it is lower than the 'Service Pack' version to the left AND pbTestServicePack = True, user will get informed that this service pack needs to be installed before the program can be run." Set peAnchors to anTopLeftRight End_Object Object oFeatures is a cForm Set Size to 13 231 Set Location to 86 66 Set Label to "Features" Set psToolTip to "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." Set peAnchors to anTopLeftRight End_Object Object oX64OS is a CheckBox Set Size to 13 230 Set Location to 102 66 Set Label to "X64 version" Set psToolTip to "pbX64 is set to true if your host OS is x64 (64-bits)" End_Object Object oNTServer is a CheckBox Set Size to 13 230 Set Location to 102 157 Set Label to "Windows Server" Set psToolTip to "Running windows version is a server version." End_Object Object oWindowsHome is a CheckBox Set Size to 13 230 Set Location to 102 237 Set Label to "Windows Home" Set psToolTip to "The Windows HOME version is NOT a recommended platform for running business applications (networking is limited)." End_Object End_Object Object oComputerAndUserInfo_grp is a Group Set Size to 44 304 Set Location to 160 9 Set peAnchors to anNone Set Label to "Computer and User Info" Object oComputerName is a cForm Set Size to 13 231 Set Location to 10 66 Set Label to "Computer Name" Set peAnchors to anTopLeftRight End_Object Object oUserLoginName is a cForm Set Size to 13 231 Set Location to 25 66 Set Label to "User Login Name" Set psToolTip to "The user network login name" Set peAnchors to anTopLeftRight End_Object End_Object Object oOtherClassProperties_grp is a Group Set Size to 50 304 Set Location to 207 9 Set peAnchors to anNone Set Label to "Standard RegCheck2 Class Properties" Object oBruteForce is a CheckBox Set Size to 13 230 Set Location to 10 66 Set Label to "Driver Brute Force" Set psToolTip to "pbDriverBruteForce. To force a change of the registry even if there are more than the 'DATAFLEX' database driver loaded. It is possible that an (accounting) Pervasive table gets queried for info while the rest of the tables are in the embedded DataFlex database." End_Object Object oReportStateOnly is a CheckBox Set Size to 13 230 Set Location to 10 157 Set Label to "Report State Only" Set psToolTip to "pbReportStateOnly. Set to true if you only want to report current registry settings - but not try to change them." End_Object Object oAdminRights is a CheckBox Set Size to 13 230 Set Location to 10 237 Set Label to "Admin Rights" Set psToolTip to "pbAdminRights. Is the program run with administrator rights?" End_Object Object oHighDataIntegrity is a CheckBox Set Size to 13 230 Set Location to 22 66 Set Label to "High Data Integrity" Set psToolTip to "pbChangeHighDataIntegrity. If True the DF_HIGH_DATA_INTEGRITY will be set to True. If false the DF_HIGH_DATA_INTEGRITY is not changed." End_Object Object oTestServicePack is a CheckBox Set Size to 13 230 Set Location to 22 157 Set Label to "Test Service Pack" Set psToolTip to "pbTestServicePack. Should we check for the service pack and if it is to low deny the running of the application?" End_Object Object oSilentMode is a CheckBox Set Size to 13 230 Set Location to 22 237 Set Label to "Silent Mode" Set psToolTip to "pbSilentMode. Ask user before making changes?" End_Object Object oDoServerRegistryChanges is a CheckBox Set Size to 13 230 Set Location to 35 66 Set Label to "Do Server Changes" Set psToolTip to "pbDoServerRegistryChanges. 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." End_Object End_Object // Note: Object needs to be after the oRunChangeProgram_btn object. Object oImportantClassProperties_grp is a Group Set Size to 50 152 Set Location to 207 318 Set Label to "Important RegCheck2 Class Properties" Set peAnchors to anNone Object oRegistryChangesNeeded is a CheckBox Set Size to 13 230 Set Location to 10 10 Set Label to "Registry Changes Needed" Set psToolTip to "pbRegistryChangesNeeded. This property is set to true when at least one registry change is needed. Registry changes can be done by clicking the 'Run Change Program' button." Procedure OnChange Boolean bState Get Checked_State to bState Set Color to (If(bState = True, clRed, clLime)) End_Procedure End_Object Object oServicePackUpdateNeeded is a CheckBox Set Size to 13 230 Set Location to 22 10 Set Label to "Service Pack Updates Needed" Set psToolTip to "pbServicePackUpdateNeeded. New Service Pack(s) needs to be installed." Procedure OnChange Boolean bState Get Checked_State to bState Set Color to (If(bState = True, clRed, clLime)) End_Procedure End_Object End_Object Object oRegChangesToDo_grp is a Group Set Size to 163 152 Set Location to 41 318 Set Label to "Red = Registry Change Needed. Green = OK" Object oList is a Grid Set Size to 148 140 Set Location to 11 6 Set Header_Visible_State to False Set Line_Width to 1 0 Set Form_Width 0 to 140 // The code should work with VDF 11 and later. Thus // CodeJock controls cannot be used. Procedure DoFillList tRegChangesToDo RegChangesToDo Boolean bState Integer iColor Get ptRegChangesToDo of ghoRegCheck2 to RegChangesToDo Send Delete_Data Send Add_Item Msg_None CS_OplocksDisabled Move RegChangesToDo.bOplocksDisabled to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_UseOpportunisticLocking Move RegChangesToDo.bUseOpportunisticLocking to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_DirectoryCacheLifetime Move RegChangesToDo.bDirectoryCacheLifetime to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_FileNotFoundCacheLifetime Move RegChangesToDo.bFileInfoCacheLifetime to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_FileInfoCacheLifetime Move RegChangesToDo.bFileNotFoundCacheLifetime to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_EnableOplocks Move RegChangesToDo.bEnableOplocks to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False Send Add_Item Msg_None CS_SMB2 Move RegChangesToDo.bSMB2 to bState Set ItemColor (Item_Count(Self) -1) to (If(bState = True, clRed, clLime)) Set Entry_State item (Item_Count(Self) -1) to False End_Procedure Procedure Set Select_State Integer iItem Integer bSelect End_Procedure End_Object End_Object Procedure RetrieveOSInfo Boolean bState String sValue String sMajor String sMinor // We just want to report the state of this // machine - not make any suggested changes. Get pbReportOnlyState of ghoRegCheck2 to bState Set pbReportOnlyState of ghoRegCheck2 to True Send DoCheckRegistrySettings of ghoRegCheck2 Set pbReportOnlyState of ghoRegCheck2 to bState // Get OS version info: Get psOSVersion of ghoRegCheck2 to sValue Set Value of oWindowsVersion to sValue Get piMajorVersion of ghoRegCheck2 to sMajor Get piMinorVersion of ghoRegCheck2 to sMinor Set Value of oVersionNumber to (Trim(sMajor) + "." + Trim(sMinor)) Get piBuildNumber of ghoRegCheck2 to sValue Set Value of oBuildNumber to sValue Get psEdition of ghoRegCheck2 to sValue Set Value of oEdition to sValue Get psCSDVersion of ghoRegCheck2 to sValue Set Value of oServicePack to sValue Get CurrentMinServicePack of ghoRegCheck2 to sValue Set Value of oMinServicePack to sValue Get psSuite of ghoRegCheck2 to sValue Set Value of oFeatures to sValue Get pbX64 of ghoRegCheck2 to bState Set Checked_State of oX64OS to bState Get pbWindowsHome of ghoRegCheck2 to bState Set Checked_State of oWindowsHome to bState Get pbNTServer of ghoRegCheck2 to bState Set Checked_State of oNTServer to bState Get psComputerName of ghoRegCheck2 to sValue Set Value of oComputerName to sValue Get psUserLoginName of ghoRegCheck2 to sValue Set Value of oUserLoginName to sValue Get pbDriverBruteForce of ghoRegCheck2 to bState Set Checked_State of oBruteForce to bState Get pbReportOnlyState of ghoRegCheck2 to bState Set Checked_State of oReportStateOnly to bState Get pbAdminRights of ghoRegCheck2 to bState Set Checked_State of oAdminRights to bState Get pbChangeHighDataIntegrity of ghoRegCheck2 to bState Set Checked_State of oHighDataIntegrity to bState Get pbSilentMode of ghoRegCheck2 to bState Set Checked_State of oSilentMode to bState Get pbDoServerRegistryChanges of ghoRegCheck2 to bState Set Checked_State of oDoServerRegistryChanges to bState Get pbTestServicePack of ghoRegCheck2 to bState Set Checked_State of oTestServicePack to bState Get pbRegistryChangesNeeded of ghoRegCheck2 to bState Set Checked_State of oRegistryChangesNeeded to bState Get pbServicePackUpdateNeeded of ghoRegCheck2 to bState Set Checked_State of oServicePackUpdateNeeded to bState End_Procedure Procedure Activating Returns Integer Integer iRetVal Forward Get msg_activating to iRetval If (iRetval=0) Begin Send RetrieveOSInfo Send DoFillList of oList End Procedure_Return iRetval End_Procedure Object oInfo_tb is a TextBox Set Auto_Size_State to False Set Size to 26 456 Set Location to 12 11 Set Label to ("NOTE: This is just info about the current machine's settings. Do NOT make changes here, it will do nothing. Instead, make changes to the ghoRegCheck2 object - or click the '" + Label(oRunChangeProgram_btn) + "' button if registry changes are wanted. Hover the mouse over an item to read its tooltip text.") Set Justification_Mode to JMode_Left End_Object Object oAbout_btn is a Button Set Size to 14 71 Set Location to 262 9 Set Label to "About" Set psToolTip to "Info about the program" Set peAnchors to anNone Procedure OnClick Send Activate_About End_Procedure End_Object End_Object