Option Explicit ' Run with /? option for usage information. ' *** Define Constants *** Const szTitle = "Install Validation" Const szVersion = "1.7, 1/13/2005" Const MaxArgs = 4 Const iDefaultOption = 0 ' Option Value Map: Values are additive ' e.g., an Option value of "5" will enable bits 0 and 2 (4 + 1) ' Bit Value Behavior ' --- ----- -------- ' 0 1 Prompt for all input parameters. ' 1 2 When szFind is found in a line, delete the whole line. ' 2 4 Search is Case-Sensitive ' 3 8 Process files in subdirectories (if a directory is specified as the Source) ' 4 16 Confirm operation on each file ' 5 32 Clear all blank lines ' 6 64 Preserve original file(s) with .BAK extension ' 7 128 Display summary dialog when file operations are complete. ' 8 256 Debug Mode 'On Error Resume Next ' Command-line prefixes Const SourceArg = "Source=", FindArg = "Find=", ReplaceArg = "Replace=", OptionArg = "Option=" ' Error codes Const ERR_OK = 0 Const ERR_GENERAL_FAILURE = 1 ' File Access codes Const ForReading = 1, ForWriting = 2, ForAppending = 8 ' Message Box Codes Const MB_OKOnly = 0 Const MB_OKCancel = 1 Const MB_AbortRetryIgnore = 2 Const MB_YesNoCancel = 3 Const MB_YesNo = 4 Const MB_RetryCancel = 5 Const MB_Critical = 16 Const MB_Question = 32 Const MB_Exclamation = 48 Const MB_Information = 64 Const MR_OK = 1 Const MR_Cancel = 2 Const MR_Abort = 3 Const MR_Retry = 4 Const MR_Ignore = 5 Const MR_Yes = 6 Const MR_No = 7 ' *** Init vars *** 'Check if WMI is present first On Error Resume Next Err.Clear Dim oWMI_Service_CIMV2 Set oWMI_Service_CIMV2 = GetObject("winmgmts:{impersonationLevel=impersonate}//./root/cimv2") If Err Then MsgBox "Either the currently logged in user does not have administrative rights or the WMI Service is not running! This software requires the Windows Management Instrumentation service. Please login with administrative rights and start the service.", 0, "Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If On Error GoTo 0 Dim iOption: iOption = iDefaultOption Dim szSource, szFind, szReplace, szLine, szOutput Dim i, iFileCount, iReplaceCount Dim arg Dim szPath: szPath = WScript.ScriptFullName szPath = Mid(szPath,1,InStr(szPath,WScript.ScriptName) - 1) ' *** Init objects *** Dim oTSRead, oTSWrite Dim oArgs: Set oArgs = WScript.Arguments Dim fs: Set fs = CreateObject("Scripting.FileSystemObject") fs.CreateTextFile "C:\Results.txt", True Dim Shell Set Shell = CreateObject("WScript.Shell") Dim oLogFile Dim szComputer szComputer = "." Dim oReg Set oReg=GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\" & _ szComputer & "\root\default:StdRegProv") Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_CLASSES_ROOT = &H80000000 Const HKEY_CURRENT_USER = &H80000001 Const KEY_QUERY_VALUE = &H0001 Const KEY_CREATE = &H0020 Dim szHKLM szHKLM = "HKEY_LOCAL_MACHINE" Dim bAlwaysOutput: bAlwaysOutput = False Dim szExtraAnsFiles(25) Dim bOS32: bOS32 = FALSE Dim bOS32e: bOS32e = FALSE Dim bOS64: bOS64 = FALSE Dim bWindows2000: bWindows2000 = FALSE Dim bWindowsXP: bWindowsXP = FALSE Dim bWindows2003: bWindows2003 = FALSE Dim ANS_NAME: ANS_NAME = "Intel(R) Advanced Network Services Virtual Adapter" Dim szUserOption Dim bInstallationPasses : bInstallationPasses = False Dim szDMiX_Version : szDMiX_Version = 0 Dim szProgramFilesPath Dim szSystemPath Dim szSystemDrive Dim szInfPath Dim szOsPath Dim szTempPath Dim szInstalledLanguage Dim szSupportedLanguages(14) szSystemDrive = Shell.ExpandEnvironmentStrings("%SystemDrive%") szProgramFilesPath = Shell.ExpandEnvironmentStrings("%ProgramFiles%") szOsPath = Shell.ExpandEnvironmentStrings("%WINDIR%") szTempPath = Shell.ExpandEnvironmentStrings("%TEMP%") szSystemPath = szOsPath + "\System32" szInfPath = szOsPath + "\Inf" Set oLogFile = OpenTxtFile(szTempPath + "\results.txt", ForWriting) szSupportedLanguages(0) = "ENU" szSupportedLanguages(1) = "FRA" szSupportedLanguages(2) = "DEU" szSupportedLanguages(3) = "ITA" szSupportedLanguages(4) = "ESN" szSupportedLanguages(5) = "JPN" szSupportedLanguages(6) = "KOR" szSupportedLanguages(7) = "CHT" szSupportedLanguages(8) = "CHS" szSupportedLanguages(9) = "PTB" szSupportedLanguages(10) = "NLD" szSupportedLanguages(11) = "DAN" szSupportedLanguages(12) = "FIN" szSupportedLanguages(13) = "NOR" szSupportedLanguages(14) = "SVE" Class NetworkDevicesInPCISpace Dim Path Dim ClassName Dim ClassGUID Dim CompatibleIDs(10) Dim DeviceDesc Dim Driver Dim HardwareID(10) Dim LocatationInformation Dim Manufacturer Dim Service Dim Number Dim PCI_Bus Dim PCI_Device Dim PCI_Function End Class Class NetworkDevicesInNetworkClass Dim Path Dim CoInstallers32(10) Dim ComponentID Dim DriverDate Dim DriverDesc Dim DriverVersion Dim InfPath Dim MatchingDeviceID Dim ProviderName Dim Number Dim IsANS Dim IsTeam Dim IsVLAN Dim VLANID Dim VlanName Dim VlanDisplayName Dim TotalPhysicalAdapters Dim VlanOnTeam Dim Non8086IntelAdapter Dim BusNumber Dim SlotNumber Dim ANSLoaded End Class Class NetworkDevicesInWMI Dim Caption Dim DeviceName Dim Description Dim OriginalDisplayName Dim PCIDeviceID Dim PCI_Bus Dim PCI_Device End Class Dim AdaptersFoundInPCI(10) Dim AdaptersFoundInNetworkClass(10) Dim AdaptersFoundInWMI(10) ' Check for admin rights to the registry Dim bHasAccessRights: bHasAccessRights = False Dim bHasAccessRights2: bHasAccessRights2 = False Dim bHasAccessRights3: bHasAccessRights3 = False Dim bHasAccessRights4: bHasAccessRights4 = False oReg.CheckAccess HKEY_LOCAL_MACHINE, "SOFTWARE\" , KEY_CREATE, bHasAccessRights oReg.CheckAccess HKEY_LOCAL_MACHINE, "SYSTEM\" , KEY_CREATE, bHasAccessRights2 oReg.CheckAccess HKEY_CURRENT_USER, "CONTROL PANEL\" , KEY_CREATE, bHasAccessRights3 oReg.CheckAccess HKEY_CLASSES_ROOT, "CLSID\" , KEY_CREATE, bHasAccessRights4 If ((bHasAccessRights = False) Or (bHasAccessRights2 = False) or (bHasAccessRights3 = False) or (bHasAccessRights4 = False)) Then MsgBox "The currently logged in user does not have the access rights to use this tool",0,"Intel(R) Validation Tool" WScript.Quit(ERR_OK) Else End If ' Make sure DMiX is install first before doing any more If (IsFile(szSystemPath + "\Ncs2DMIX.dll") = False) Then MsgBox "PROSet was not found on your system. Please install PROSet before running the tool.",0,"Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If ' now get the file version - dmix version installed szDMiX_Version = GetRegistryString("Software\Intel\Network_Services\DMIX", "OEMVersion") If (Not IsNull(szDMiX_Version)) Then LogToFile "The version of PROSet installed is " + szDMiX_Version, 1 Else szDMiX_Version = "0.0.0.0" LogToFile "Unable to determine the version of PROSet installed!", 1 End If If (InStr(szDMiX_Version,"10.0") = 0) Then MsgBox "This tool does not support legacy versions of PROSet. Please upgrade to version 10.",0,"Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If 'WMI IntelNCS2 object On Error Resume Next Err.Clear Dim oWMI_Service_IntelNCS2 Set oWMI_Service_IntelNCS2 = GetObject("winmgmts:{impersonationLevel=impersonate}//./root/IntelNcs2") If Err Then MsgBox "Unable to connect to the Intel WMI Namespace! Please uninstall and then re-install PROSet. ",0,"Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If On Error GoTo 0 ' *** Main Block *** If (WScript.Arguments.Count = 0) Then PrintUsage() Else If (WScript.Arguments(0) = "?" ) OR (LCase(WScript.Arguments(0)) = "/help") Then PrintUsage() Else If WScript.Arguments.Count = 1 Then If ( StrComp(LCase(WScript.Arguments(0)), "/detect") = 0 ) Then szUserOption = "DETECT" 'bAlwaysOutput = True DetermineOS() GetOS_Language() CheckDirectories() CheckNcs2Files() CheckANSFiles() CheckDMiXFiles() CheckLocalizationFiles() CheckRegistry() CheckPath() CheckDllRegistration() CheckPathsInRegistry() 'CheckIntelNamespaces() CheckANSDrivers() CheckUninstall() ElseIf ( StrComp(LCase(WScript.Arguments(0)), "/all") = 0 ) Then szUserOption = "ALL" bAlwaysOutput = True DetermineOS() FindAdapters() GetOS_Language() CheckDirectories() CheckANSFiles() CheckDMiXFiles() CheckNcs2Files() CheckRegistry() CheckANSDrivers() CheckPath() CheckDllRegistration() CheckPathsInRegistry() ElseIf ( StrComp(LCase(WScript.Arguments(0)), "/fixans") = 0 ) Then szUserOption = "FIXANS" CheckANSDrivers() DeleteExtraAnsFiles() ElseIf ( StrComp(LCase(WScript.Arguments(0)), "/fixuninstall") = 0 ) Then szUserOption = "FIXUNINSTALL" CheckUninstall() Else PrintUsage() End If Else PrintUsage() End If End If End If MsgBox "The tool has completed. Please view the result located here: " + szTempPath + "\Results.txt", 0, "Intel(R) Validation Tool" WScript.Quit(ERR_OK) Sub PrintUsage() MsgBox "Supported Options: /detect, /fixans, /fixuninstall", 0, "Intel(R) Validation Tool" End Sub Sub CheckDirectories() Dim szFolderPath ' set this equal to true to test if all files below are present on the system bInstallationPasses = True szFolderPath = szProgramFilesPath + "\Intel" IsDirectory(szFolderPath) szFolderPath = szFolderPAth + "\DMiX" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath szFolderPath = szFolderPAth + "\Intel\Ncs2" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath szFolderPath = szProgramFilesPath + "\Intel\ANS" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath + "\Intel\DMiX\Hlp" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath + "\Intel\DMiX\Resource" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath + "\Intel\DMiX\uninst" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath + "\Intel\Ncs2\Agent" IsDirectory(szFolderPath) szFolderPath = szProgramFilesPath + "\Intel\Ncs2\WMIProv" IsDirectory(szFolderPath) If (bOS32) Then szFolderPath = szProgramFilesPath + "\Intel\Ncs2\FTMI" IsDirectory(szFolderPath) End If If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (1)", 1 End If End Sub Sub CheckNcs2Files() Dim szFileNameAndPath Dim szFolderPath ' set this equal to true to test if all files below are present on the system bInstallationPasses = True szFolderPath = szProgramFilesPath + "\Intel\Ncs2\WMIProv" 'If (bOS32) Then ' ' szFileNameAndPath = szFolderPath ' szFileNameAndPath = szFileNameAndPath + "\msvcp60.dll" ' IsFile(szFileNameAndPath) 'End If szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Boot.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Core.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Diag.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Prov.exe" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Team.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Vlan.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\NCSDiag.exe" IsFile(szFileNameAndPath) szFolderPath = szProgramFilesPath + "\Intel\Ncs2\Agent" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\BootAgnt.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\CoreAgnt.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagAgnt.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Rule.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Rules.dat" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Rules.map" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\TeamAgent.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\VlanAgent.dll" IsFile(szFileNameAndPath) If (bOS32) Then szFolderPath = szProgramFilesPath + "\Intel\Ncs2\FTMI" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\iLADFtmi.dll" IsFile(szFileNameAndPath) End If If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (2)", 1 End If End Sub Sub CheckANSFiles() Dim szFileNameAndPath Dim szFolderPath Dim szSysFileName Dim szInfFileName1 Dim szInfFileName2 Dim szCatFileName Dim szDllFileName If(bOS64)Then szSysFileName = "iansw64.sys" szInfFileName1 = "ANSMW64.inf" szInfFileName2 = "ANSPW64.inf" szCatFileName = "iansw64.cat" szDllFileName = "Intlnc64.dll" ElseIf(bOS32e) Then szSysFileName = "iansw32e.sys" szInfFileName1 = "ANSMW32E.inf" szInfFileName2 = "ANSPW32E.inf" szCatFileName = "iansw32e.cat" szDllFileName = "intnc32e.dll" Else szInfFileName1 = "ANSM2KXP.inf" szInfFileName2 = "ANSP2KXP.inf" szCatFileName = "ians2kxp.cat" szDllFileName = "IntelNIC.dll" If ( bWindowsXP = True ) Then szSysFileName = "ianswxp.sys" Else szSysFileName = "iansw2k.sys" ' Windows 2000 has a different sys file name End If End If ' set this equal to true to test if all files below are present on the system bInstallationPasses = True szFolderPath = szProgramFilesPath + "\Intel\ANS" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\" + szInfFileName1 IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\" + szInfFileName2 IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\" + szCatFileName IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\iansmsg.dll" ' the file name of the message DLL stays constant accross platforms IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\" + szSysFileName IsFile(szFileNameAndPath) If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (3)", 1 End If End Sub Sub CheckDMiXFiles Dim szFolderPath Dim szFileNameAndPath ' set this equal to true to test if all files below are present on the system bInstallationPasses = True szFolderPath = szProgramFilesPath + "\Intel\DMiX" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\BtAgtSrv.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Custom.ini" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagSrv.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\TeamSrv.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\VlanSrv.dll" IsFile(szFileNameAndPath) szFolderPath = szProgramFilesPath + "\Intel\DMiX\Resource" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\BrandRes.dll" IsFile(szFileNameAndPath) CheckLocalizationFiles() szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResCHS.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResCHT.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResDAN.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResDEU.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResENU.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResESN.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResFIN.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResFRA.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResITA.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResJPN.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResKOR.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResNLD.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResNOR.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResPTB.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DiagResSVE.dll" IsFile(szFileNameAndPath) szFolderPath = szProgramFilesPath + "\Intel\DMiX\uninst" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DIBoot.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DICore.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DIDiag.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DITeam.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DIVlan.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DNcs2Cm.mof" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DxSetup.exe" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\InstallANS.exe" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Ncs2Setp.dll" IsFile(szFileNameAndPath) If(bOS32) Then szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Prosafe2.msi" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Prosafe.msi" IsFile(szFileNameAndPath) ElseIf(bOS64) Then szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\PrSafe64.msi" IsFile(szFileNameAndPath) Else szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\ProSafeX.msi" IsFile(szFileNameAndPath) End If szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\SavRes.exe" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\SavResDX.vbs" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\Setup.ini" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Ncs2DMIX.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Ncs2InstUtility.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\NcsCoLib.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Accesor.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\msvcp60.dll" IsFile(szFileNameAndPath) szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\PRONtObj.dll" IsFile(szFileNameAndPath) If (bOS32) Then szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Drivers\iqvw32.sys" IsFile(szFileNameAndPath) ElseIf(bOS64) Then szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Drivers\iqvw64.sys" IsFile(szFileNameAndPath) Else szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Drivers\iqvw64e.sys" IsFile(szFileNameAndPath) End If szFileNameAndPath = szSystemPath szFileNameAndPath = szFileNameAndPath + "\Drivers\iansmsg.dll" IsFile(szFileNameAndPath) If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (4)", 1 End If End Sub Sub CheckLocalizationFiles() Dim nOffset: nOffset = 0 ' set this equal to true to test if all files below are present on the system bInstallationPasses = True If(StrComp(szInstalledLanguage, "ALL") <> 0) Then CheckLocalizedDLLs szInstalledLanguage If((StrComp(szInstalledLanguage, "ENU") <> 0) And (bWindows2000 = TRUE)) Then ' check for the ENU files when using Windows 2000 CheckLocalizedDLLs "ENU" End If Else ' we need to check for all localized files For nOffset = 0 to UBound(szSupportedLanguages) Step 1 CheckLocalizedDLLs szSupportedLanguages(nOffset) Next End If If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (5)", 1 End If End Sub Sub CheckLocalizedDLLs(szLang) Dim szFileNameAndPath Dim szFolderPath: szFolderPath = szProgramFilesPath + "\Intel\DMiX\Resource" szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\BtAgtRes" + szLang + ".dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\DMIXRes" + szLang + ".dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\TeamRes" + szLang + ".dll" IsFile(szFileNameAndPath) szFileNameAndPath = szFolderPath szFileNameAndPath = szFileNameAndPath + "\VlanRes" + szLang + ".dll" IsFile(szFileNameAndPath) End Sub Sub CheckRegistry() Dim szKeyName Dim szValueName Dim hKey ' set this equal to true to test if all files below are present on the system bInstallationPasses = True szKeyName = "Software\Intel\Network_Services\ANS" IsRegistryDWORD szKeyName, "InstalledANS" IsRegistryString szKeyName, "AnsMiniportInf" IsRegistryString szKeyName, "AnsMiniportInf" IsRegistryString szKeyName, "AnsProtocolInf" IsRegistryString szKeyName, "ANSSource" IsRegistryString szKeyName, "CD_Source" szKeyName = "Software\Intel\Network_Services\DMiX" 'IsRegistryDWORD szKeyName, "ASF_Instances" IsRegistryString szKeyName, "InfInstalled" IsRegistryString szKeyName, "InstallDir" IsRegistryString szKeyName, "InstalledDMiX" IsRegistryString szKeyName, "InstalledDMiX_ANS" 'IsRegistryDWORD szKeyName, "InstOpts" 'IsRegistryString szKeyName, "LogFile" IsRegistryString szKeyName, "OEMVersion" IsRegistryString szKeyName, "ResDllName" IsRegistryDWORD szKeyName, "TRACE" IsRegistryString szKeyName + "\BootAgent", "ResDllName" IsRegistryString szKeyName + "\Diag", "ResDllName" IsRegistryString szKeyName + "\Team", "ResDllName" IsRegistryString szKeyName + "\Vlan", "ResDllName" szKeyName = "Software\Intel\Network_Services\DMiX\Hlp" IsRegistryString szKeyName, "Adaptive_IFS" IsRegistryString szKeyName, "AdaptiveIFS" IsRegistryString szKeyName, "AlwaysConnectGoal" IsRegistryString szKeyName, "ChecksumRxIp" IsRegistryString szKeyName, "ChecksumRxTcp" IsRegistryString szKeyName, "ChecksumTxIp" IsRegistryString szKeyName, "ChecksumTxTcp" IsRegistryString szKeyName, "Coalesce" IsRegistryString szKeyName, "ConfigIFS" IsRegistryString szKeyName, "CPUSaver" IsRegistryString szKeyName, "EnablePME" IsRegistryString szKeyName, "FlowControl" IsRegistryString szKeyName, "HPQPriorityLevel" IsRegistryString szKeyName, "LogLinkStateEvent" IsRegistryString szKeyName, "MaxFrameSize" IsRegistryString szKeyName, "NetworkAddress" IsRegistryString szKeyName, "NumCoalesce" IsRegistryString szKeyName, "NumRfd" IsRegistryString szKeyName, "NumRxDescriptors" IsRegistryString szKeyName, "Numtcb" IsRegistryString szKeyName, "NumTxDescriptors" IsRegistryString szKeyName, "Offloading Options" IsRegistryString szKeyName, "PCI Bus Efficiency" IsRegistryString szKeyName, "Performance Options" IsRegistryString szKeyName, "Power Saver Options" IsRegistryString szKeyName, "TaggingMode" IsRegistryString szKeyName, "TcpSegmentation" IsRegistryString szKeyName, "Threshold" IsRegistryString szKeyName, "UcodeSW" IsRegistryString szKeyName, "Wake On LAN" IsRegistryString szKeyName, "WakeOn" IsRegistryString szKeyName, "WakeOnLink" szKeyName = "Software\Intel\Network_Services\DMiX\uninst\PROSet" IsRegistryString szKeyName, "DisplayIcon" IsRegistryString szKeyName, "DisplayName" IsRegistryDWORD szKeyName, "InstallVer" IsRegistryString szKeyName, "UninstallString" szKeyName = "Software\Intel\Network_Services\NCS2" IsRegistryString szKeyName, "InstallDir" IsRegistryString szKeyName, "InstalledBootAgnt" IsRegistryString szKeyName, "InstalledDiag" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "InstalledTeam" IsRegistryString szKeyName, "LCID" IsRegistryString szKeyName, "ResourcePath" IsRegistryDWORD szKeyName, "TRACE" IsRegistryString szKeyName, "Version" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\BootAgnt" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\BootAgnt\Settings" IsRegistryString szKeyName + "\1", "Default" IsRegistryString szKeyName + "\1", "ExposeLevel" IsRegistryString szKeyName + "\1", "MiniHelp" IsRegistryString szKeyName + "\1", "ParamDesc" IsRegistryString szKeyName + "\1", "Type" IsRegistryString szKeyName + "\1\Enum", "0" IsRegistryString szKeyName + "\1\Enum", "1" IsRegistryString szKeyName + "\2", "Default" IsRegistryString szKeyName + "\2", "ExposeLevel" IsRegistryString szKeyName + "\2", "MiniHelp" IsRegistryString szKeyName + "\2", "ParamDesc" IsRegistryString szKeyName + "\2", "Type" IsRegistryString szKeyName + "\2\Enum", "0" IsRegistryString szKeyName + "\2\Enum", "1" IsRegistryString szKeyName + "\2\Enum", "2" IsRegistryString szKeyName + "\2\Enum", "3" IsRegistryString szKeyName + "\2\Enum", "4" IsRegistryString szKeyName + "\3", "Default" IsRegistryString szKeyName + "\3", "ExposeLevel" IsRegistryString szKeyName + "\3", "MiniHelp" IsRegistryString szKeyName + "\3", "ParamDesc" IsRegistryString szKeyName + "\3", "Type" IsRegistryString szKeyName + "\3\Enum", "0" IsRegistryString szKeyName + "\3\Enum", "1" IsRegistryString szKeyName + "\4", "Default" IsRegistryString szKeyName + "\4", "ExposeLevel" IsRegistryString szKeyName + "\4", "MiniHelp" IsRegistryString szKeyName + "\4", "ParamDesc" IsRegistryString szKeyName + "\4", "Type" IsRegistryString szKeyName + "\4\Enum", "0" IsRegistryString szKeyName + "\4\Enum", "1" IsRegistryString szKeyName + "\4\Enum", "2" IsRegistryString szKeyName + "\4\Enum", "3" IsRegistryString szKeyName + "\4\Enum", "4" IsRegistryString szKeyName + "\5", "Default" IsRegistryString szKeyName + "\5", "ExposeLevel" IsRegistryString szKeyName + "\5", "MiniHelp" IsRegistryString szKeyName + "\5", "ParamDesc" IsRegistryString szKeyName + "\5", "Type" IsRegistryString szKeyName + "\5\Enum", "0" IsRegistryString szKeyName + "\5\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\CoreAgnt" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" IsRegistryString szKeyName, "Timeout" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\DiagAgnt" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\NcsCoLib" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\Rules" IsRegistryString szKeyName, "InstalledData" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "InstalledMap" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\BalanceInterval" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\CheckTime" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\GMRPEnabled" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\GMRPJoinTime" IsRegistryString szKeyName, "base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "max" IsRegistryString szKeyName, "min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "scale" IsRegistryString szKeyName, "step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\LinkAggrJoinMethod" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\MaxNumProbeRetry" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\NumRxPackets" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\NumTxPackets" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\PriorityPreference8021P" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" IsRegistryString szKeyName + "\Enum", "2" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\ProbeEnabled" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\ProbePacketType" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\QosLoadBalancing" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\QosLoadBalancingBandwidth" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\QosLoadBalancingThreshold" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\ReceiveLoadBalancing" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" IsRegistryString szKeyName + "\Enum", "0" IsRegistryString szKeyName + "\Enum", "1" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\STForwardDelay" IsRegistryString szKeyName, "Base" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "Max" IsRegistryString szKeyName, "Min" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "SCALE" IsRegistryString szKeyName, "Step" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt\Settings\UserSelectedAddress" IsRegistryString szKeyName, "Default" IsRegistryString szKeyName, "LimitText" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MINIHELP" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "Type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt" IsRegistryString szKeyName, "InstalledDir" IsRegistryString szKeyName, "ResourcePreFix" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\GMRPEnabled" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "type" IsRegistryString szKeyName + "\Enum", "Disabled" IsRegistryString szKeyName + "\Enum", "Enabled" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\GMRPJoinTime" IsRegistryString szKeyName, "base" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "max" IsRegistryString szKeyName, "min" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "scale" IsRegistryString szKeyName, "step" IsRegistryString szKeyName, "type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\GVRPJoinTime" IsRegistryString szKeyName, "base" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "max" IsRegistryString szKeyName, "min" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "scale" IsRegistryString szKeyName, "step" IsRegistryString szKeyName, "type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\GVRPSupport" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "type" IsRegistryString szKeyName + "\Enum", "Disabled" IsRegistryString szKeyName + "\Enum", "Enabled" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\NUMRxPackets" IsRegistryString szKeyName, "base" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "max" IsRegistryString szKeyName, "min" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "scale" IsRegistryString szKeyName, "step" IsRegistryString szKeyName, "type" szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt\Settings\NUMTxPackets" IsRegistryString szKeyName, "base" IsRegistryString szKeyName, "default" IsRegistryString szKeyName, "ExposeLevel" IsRegistryString szKeyName, "max" IsRegistryString szKeyName, "min" IsRegistryString szKeyName, "MiniHelp" IsRegistryString szKeyName, "ParamDesc" IsRegistryString szKeyName, "scale" IsRegistryString szKeyName, "step" IsRegistryString szKeyName, "type" If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (6)", 1 End If End Sub Sub CheckPathsInRegistry() Dim szKeyName Dim hKey bInstallationPasses = True szKeyName = "Software\Intel\Network_Services\DMiX" hKey = GetRegistryString (szKeyName, "InstallDir") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "The path from " + szKeyName + "\" + "InstallDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstallDir - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\DMiX\uninst\PROSet" hKey = GetRegistryString (szKeyName, "DisplayIcon") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "DisplayIcon - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "DisplayIcon - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2" hKey = GetRegistryString (szKeyName, "InstallDir") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "The path from " + szKeyName + "\" + "InstallDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstallDir - Registry key does not exist", 0 bInstallationPasses = False End If hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "The path from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If 'hKey = GetRegistryString (szKeyName, "ResourcePath") 'If (Not IsNull(hKey)) Then ' If Not IsDirectory(CStr(hKey)) Then ' oLogFile.WriteLine ("The path from " + szKeyName + "\" + "ResourcePath - " + CStr(hkey) + " - Does not exist") ' End If 'Else ' oLogFile.WriteLine (szKeyName + "\" + "ResourcePath - Registry key does not exist") 'End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\BootAgnt" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\CoreAgnt" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from" + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\DiagAgnt" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If 'szKeyName = "Software\Intel\Network_Services\NCS2\Agents\NcsCoLib" ' 'hKey = GetRegistryString (szKeyName, "InstalledDir") 'If (Not IsNull(hKey)) Then ' If Not IsFile(CStr(hKey)) Then ' oLogFile.WriteLine ("The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist") ' End If 'Else ' oLogFile.WriteLine (szKeyName + "\" + "InstalledDir - Registry key does not exist") 'End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\Rules" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If hKey = GetRegistryString (szKeyName, "InstalledData") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledData - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledData - Registry key does not exist", 0 bInstallationPasses = False End If hKey = GetRegistryString (szKeyName, "InstalledMap") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledMap - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledMap - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\TeamAgnt" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2\Agents\VlanAgnt" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsFile(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If szKeyName = "Software\Intel\Network_Services\NCS2\WMI\Providers" hKey = GetRegistryString (szKeyName, "InstalledDir") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "The file from " + szKeyName + "\" + "InstalledDir - " + CStr(hkey) + " - Does not exist", 0 bInstallationPasses = False End If Else LogToFile szKeyName + "\" + "InstalledDir - Registry key does not exist", 0 bInstallationPasses = False End If If ( bInstallationPasses = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (7)", 1 End If End Sub Sub CheckANSDrivers() Dim hKey Dim szOEMFile1 Dim szOEMFile2 Dim szLine Dim bInfFound Dim bFinished Dim oOEMFile Dim szOEMTempFile Dim nOemNum: nOemNum = 0 Dim szValue Dim nExtraFile: nExtraFile = 0 ' open the ANS OEM inf files that are listed in the registry and make sure they exist and are valid bInfFound = False hKey = GetRegistryString ("Software\Intel\Network_Services\ANS", "AnsMiniportInf") If (Not IsNull(hKey)) Then 'MsgBox "hKey is " + CStr(hKey) szOEMFile1 = CStr(hKey) 'MsgBox "szOemFile1 is " + szOemFile1 If IsFile(szOEMFile1) Then Set oOEMFile = OpenTxtFile(szOEMFile1, ForReading) While Not oOEMFile.AtEndOfStream And Not bInfFound szLine = oOEMFile.ReadLine if(InStr(szline,"Advanced Network Services Virtual Adapter"))Then bInfFound = True End If Wend End If Else LogToFile "Software\Intel\Network_Services\ANS\AnsMiniportInf - Does not exist in the registry. Please uninstall and then reinstall PROSet.", 1 End If If Not bInfFound Then LogToFile szOEMFile1 + " is an invalid ANS INF file. Please uninstall and then re-install PROSet", 1 End If bInfFound = False hKey = GetRegistryString ("Software\Intel\Network_Services\ANS", "AnsProtocolInf") If (Not IsNull(hKey)) Then szOEMFile2 = CStr(hKey) If IsFile(szOEMFile2) Then Set oOEMFile = OpenTxtFile(szOEMFile2, ForReading) While Not oOEMFile.AtEndOfStream And Not bInfFound szLine = oOEMFile.ReadLine if(InStr(szline,"Advanced Network Services Transport"))Then bInfFound = True End If Wend End If Else LogToFile "Software\Intel\Network_Services\ANS\AnsProtocolInf - Does not exist in the registry. Please uninstall and then reinstall PROSet.", 1 End If ' make sure the ANS paths in the registry point to valid directories If Not bInfFound Then LogToFile szOEMFile2 + " is an invalid ANS INF file. Please uninstall and then re-install PROSet", 1 End If hKey = GetRegistryString ("Software\Intel\Network_Services\ANS", "AnsSource") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "ANS Registry - ANS Source path does not exist", 0 End If Else LogToFile "Software\Intel\Network_Services\ANS\AnsSource - Does not exist in the registry", 0 End If hKey = GetRegistryString ("Software\Intel\Network_Services\ANS", "CD_Source") If (Not IsNull(hKey)) Then If Not IsDirectory(CStr(hKey)) Then LogToFile "ANS Registry - CD Source path does not exist", 0 End If Else LogToFile "Software\Intel\Network_Services\ANS\CD_Source - Does not exist in the registry", 0 End If 'go through all the remaining OEM files are make sure there are not any old ANS files bInfFound = False bFinished = False szOEMTempFile = "oem" + CStr(nOemNum) + ".inf" szOEMTempFile = szInfPath + "\" + szOEMTempFile 'MsgBox "szOEMTempFile is " + szOEMTempFile While fs.FileExists(szOEMTempFile) = True 'MsgBox "szOEMTempFile is " + szOEMTempFile Set oOEMFile = OpenTxtFile(szOEMTempFile, ForReading) While ((Not oOEMFile.AtEndOfStream) And (bInfFound = False) And (bFinished = False)) szLine = oOEMFile.ReadLine If(InStr(UCase(szline),UCase("Advanced Network Services Virtual Adapter")))Then bInfFound = True 'MsgBox "found" ElseIf(InStr(szline,"[Version]"))Then ' parse the INF file until the substring "[Version]" is found bFinished = True ' this will mark the start of the data in the INF file 'MsgBox "Done parsing" End If ' the string we are looking for is only in the header Wend 'MsgBox "checking file " + szOEMTempFile If ((StrComp(szOEMTempFile,szOEMFile1,1) <> 0) And (bInfFound = True)) Then 'MsgBox "szOEMTempFile is " + szOEMTempFile 'MsgBox "szOEMFile1 is " + szOEMFile1 LogToFile szOEMTempFile + " is an extra ANS INF file", 0 szExtraAnsFiles(nExtraFile) = szOEMTempFile nExtraFile = nExtraFile + 1 End If nOemNum = nOemNum + 1 szOEMTempFile = "oem" + CStr(nOemNum) + ".inf" szOEMTempFile = szInfPath + "\" + szOEMTempFile bInfFound = False bFinished = False Wend 'go through all the remaining OEM files are make sure there are not any old ANS files bInfFound = False bFinished = False nOemNum = 0 szOEMTempFile = "oem" + CStr(nOemNum) + ".inf" szOEMTempFile = szInfPath + "\" + szOEMTempFile While fs.FileExists(szOEMTempFile) = True 'MsgBox "szOEMTempFile is " + szOEMTempFile Set oOEMFile = OpenTxtFile(szOEMTempFile, ForReading) While ((Not oOEMFile.AtEndOfStream) And (bInfFound = False) And (bFinished = False)) szLine = oOEMFile.ReadLine If(InStr(szline,"Advanced Network Services Transport"))Then bInfFound = True ElseIf(InStr(szline,"[Version]"))Then ' parse the INF file until the substring "[Version]" is found bFinished = True ' this will mark the start of the data in the INF file End If ' the string we are looking for is only in the header Wend If ((StrComp(szOEMTempFile,szOEMFile2,1) <> 0) And (bInfFound = True)) Then LogToFile szOEMTempFile + " is an extra ANS INF file", 0 szExtraAnsFiles(nExtraFile) = szOEMTempFile nExtraFile = nExtraFile + 1 End If nOemNum = nOemNum + 1 szOEMTempFile = "oem" + CStr(nOemNum) + ".inf" szOEMTempFile = szInfPath + "\" + szOEMTempFile bInfFound = False bFinished = False Wend If ( ( StrComp(szUserOption,"DETECT") = 0 ) And ( IsEmpty(szExtraAnsFiles(0)) = False) ) Then LogToFile "Extra ANS files were found on your system. Please re-run the tool with the /fixans option", 1 End If End Sub Function DeleteExtraAnsFiles() Dim nOffset: nOffset = 0 Dim szPNF Dim MsgBoxReturnValue For nOffSet = 0 To UBound(szExtraAnsFiles) Step 1 If(IsEmpty(szExtraAnsFiles(nOffset)))Then Exit For End If MsgBoxReturnValue = MsgBox (szExtraAnsFiles(nOffset) + " is an extra ANS file. Are you sure you want to delete it?", MB_YesNo,"Intel(R) Validation Tool") If ( MsgBoxReturnValue = MR_Yes ) Then fs.DeleteFile szExtraAnsFiles(nOffset), 1 ' delete the PNF as well szPNF = Left(szExtraAnsFiles(nOffset),(InStr(UCase(szExtraAnsFiles(nOffset)),".INF") - 1)) szPNF = szPNF + ".PNF" 'MsgBox "tmp is " + szPNF If ( fs.FileExists(szPNF) = True ) Then fs.DeleteFile szPNF, 1 End If End If Next End Function Function CheckUninstall() Dim szKeyName: szKeyName = "Software\Microsoft\Windows\CurrentVersion\Uninstall\PROSETDX" Dim szUninstallString: szUninstallString = szProgramFilesPath + "\Intel\DMIX\uninst\DxSetup.exe /x /qr /le " + szTempPath + "\PROSetDX\DMIX\\DxUninst.log" Dim bFixUninstall: bFixUninstall = False Dim szRegResult ' check the uninstall values If ( IsRegistryString ( szKeyName, "DisplayIcon" ) = False ) Then End If If ( IsRegistryString ( szKeyName, "DisplayName" ) = False ) Then End If If ( IsRegistryDWORD ( szKeyName, "InstallVer" ) = False ) Then End If If ( IsRegistryString ( szKeyName, "UninstallString" ) = False ) Then bFixUninstall = True Else szRegResult = GetRegistryString ( szKeyName, "UninstallString" ) If ( (InStr ( szRegResult, szTempPath ) <= 0) ) Then LogToFile szRegResult, 1 LogToFile szTempPath,1 bFixUninstall = True End If End If If ( (StrComp (szUserOption, "DETECT") = 0) And ( bFixUninstall = True ) ) Then LogToFile "A problem was detected in the way PROSet uninstalls. Please re-run the tool with the /fixuninstall option", 1 ElseIf ( bFixUninstall = True ) Then FixUninstall() End If End Function Function FixUninstall() Dim szRegResult Dim nReturnCode: nReturnCode = 0 Dim arrSubKeys Dim szUninstallString: szUninstallString = szProgramFilesPath + "\Intel\DMIX\uninst\DxSetup.exe /x /qr /le " + szTempPath + "\PROSetDX\DMIX\\DxUninst.log" Dim szUninstallPath: szUninstallPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall\PROSETDX" nReturnCode = oReg.EnumKey (HKEY_LOCAL_MACHINE, szUninstallPath , arrSubKeys) If ( nReturnCode <> 0 ) Then nReturnCode = oReg.CreateKey ( HKEY_LOCAL_MACHINE, szUninstallPath) If ( nReturnCode <> 0 ) Then MsgBox "The tool was unable to write to the registry. Please make sure this user has administrative rights.",0,"Intel(R) Validation Tool" End If nReturnCode = oReg.SetExpandedStringValue ( HKEY_LOCAL_MACHINE, szUninstallPath, "DisplayIcon", "%SystemRoot%\system32\Prounstl.exe" ) If ( nReturnCode <> 0 ) Then MsgBox "The tool was unable to write to the registry. Please make sure this user has administrative rights.",0,"Intel(R) Validation Tool" End If nReturnCode = oReg.SetStringValue ( HKEY_LOCAL_MACHINE, szUninstallPath, "DisplayName", "Intel(R) PRO Network Connections Software v10.0.0.0" ) If ( nReturnCode <> 0 ) Then MsgBox "The tool was unable to write to the registry. Please make sure this user has administrative rights.",0,"Intel(R) Validation Tool" End If End If szRegResult = GetRegistryString ( szUninstallPath, "UninstallString" ) If ( IsNull(szRegResult) ) Then nReturnCode = oReg.SetStringValue ( HKEY_LOCAL_MACHINE, szUninstallPath , "UninstallString", szUninstallString ) If ( nReturnCode <> 0 ) Then MsgBox "The tool was unable to write to the registry. Please make sure this user has administrative rights.",0,"Intel(R) Validation Tool" End If Else szRegResult = CStr(szRegResult) If( (InStr (szUninstallString,szTempPath) <= 0 ) ) Then nReturnCode = oReg.SetStringValue ( HKEY_LOCAL_MACHINE, szUninstallPath , "UninstallString", szUninstallString ) If ( nReturnCode <> 0 ) Then MsgBox "The tool was unable to write to the registry. Please make sure this user has administrative rights.",0,"Intel(R) Validation Tool" End If End If End If End Function Sub CheckPath() Dim hKey Dim szDmixPath Dim szPath szDmixPath = szProgramFilesPath szDmixPath = szDmixPath + "\Intel\DMIX" Dim bPathOkay : bPathOkay = True hKey = GetRegistryString ("System\CurrentControlSet\Control\Session Manager\Environment", "Path") If (Not IsNull(hKey)) Then szPath = CStr(hKey) 'MsgBox "szPath is " + szPath 'MsgBox "szDmixPath is " + szDmixPath If(InStr(szPath,szDmixPath) = 0) Then LogToFile "The path in the registry does not contain " + szDmixPath, 0 'oLogFile.WriteLine (szPath) bPathOkay = False End If Else LogToFile "System\CurrentControlSet\Control\Session Manager\Environment\Path - Does not exist in the registry" bPathOkay = False End If szPath = Shell.ExpandEnvironmentStrings("%PATH%") 'MsgBox "szPath is " + szPath If(InStr(szPath,szDmixPath) = 0) Then LogToFile "The path from the command line does not contain " + szDmixPath, 0 'oLogFile.WriteLine (szPath) bPathOkay = False End If If (bPathOkay = False) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (8)", 1 End If End Sub Function IsDirectory(szPathName) If (fs.FolderExists(szPathName)) <> True Then LogToFile szPathName + " - Does not exist", 0 'CriticalError(szPathName + " Does not exist!!") IsDirectory = False bInstallationPasses = False Else IsDirectory = True End If End Function Function IsFile(szFileName) If (fs.FileExists(szFileName)) <> True Then LogToFile szFileName + " - Does not exist", 0 IsFile = False bInstallationPasses = False Else IsFile = True End If End Function Function IsRegistryDWORD(szKeyPath,szValueName) Dim nReturnCode Dim dwValue 'MsgBox "szKeyPath is ->" + szKeyPath + "<-" 'MsgBox "szValueName is ->" + szValueName + "<-" nReturnCode = oReg.GetDWORDValue( HKEY_LOCAL_MACHINE,szKeyPath,szValueName,dwValue) 'MsgBox "dwValue is " + CStr(dwValue) 'MsgBox "nReturnCode is " + CStr(nReturnCode) If nReturnCode <> 0 Then LogToFile szHKLM + "\" + szKeyPath + "\" + szValueName + " - Does not exist", 0 IsRegistryDWORD = False bInstallationPasses = False Else IsRegistryDWORD = True End If End Function Function GetRegistryDWORD(szKeyPath,szValueName) Dim nReturnCode Dim dwValue 'MsgBox "szKeyPath is ->" + szKeyPath + "<-" 'MsgBox "szValueName is ->" + szValueName + "<-" nReturnCode = oReg.GetDWORDValue( HKEY_LOCAL_MACHINE,szKeyPath,szValueName,dwValue) 'MsgBox "dwValue is " + CStr(dwValue) 'MsgBox "nReturnCode is " + CStr(nReturnCode) If nReturnCode = 0 Then GetRegistryDWORD = dwValue Else GetRegistryDWORD = NULL End If End Function Function IsRegistryString(szKeyPath,szValueName) Dim nReturnCode Dim szValue nReturnCode = oReg.GetStringValue ( HKEY_LOCAL_MACHINE,szKeyPath,szValueName,szValue ) If nReturnCode <> 0 Then LogToFile szHKLM + "\" + szKeyPath + "\" + szValueName + " - Does not exist", 0 IsRegistryString = False bInstallationPasses = False Else IsRegistryString = True End If End Function Function GetRegistryString(szKeyPath,szValueName) Dim nReturnCode Dim szValue 'MsgBox "szKeyPath is " + szKeyPath 'MsgBox "szValueName is " + szValueName nReturnCode = oReg.GetStringValue ( HKEY_LOCAL_MACHINE,szKeyPath,szValueName,szValue ) 'MsgBox "nReturnCode is " + CStr(nReturnCode) 'MsgBox "szValue is in function" + szValue If nReturnCode = 0 Then GetRegistryString = szValue Else GetRegistryString = NULL End If End Function Function IsMUI() Dim nReturnCode Dim szValue Dim szValueName: szValueName = "MUILanguagePending" Dim szKeyPath : szKeyPath = "Control Panel\Desktop" nReturnCode = oReg.GetStringValue ( HKEY_CURRENT_USER,szKeyPath,szValueName,szValue ) If nReturnCode <> 0 Then LogToFile "Not a MUI system.", 1 IsMUI = False Else LogToFile "Detected a MUI system.", 1 IsMUI = True End If End Function Function GetOS_Language() If(IsMUI() = TRUE) Then szInstalledLanguage = "ALL" ' if this is a MUI system then all localized files should be installed Exit Function End If Dim szResult Dim szKeyPath: szKeyPath = "System\CurrentControlSet\Control\Nls\Language" Dim szValueName: szValueName = "InstallLanguage" szResult = GetRegistryString(szKeyPath,szValueName) If (Not IsNull(szResult)) Then szInstalledLanguage = GetLanguageAbbreviation(szResult) Else LogToFile szHKLM + "\" + szKeyPath + "\" + szValueName + " - Does not exist, your registry may be corrupted!!", 1 End If End Function Function GetLanguageAbbreviation(szAppreviation) If(StrComp(szAppreviation,"0409") = 0)Then LogToFile "The OS Language is English", 1 GetLanguageAbbreviation = "ENU" ElseIf (StrComp(szAppreviation,"0804") = 0) Then LogToFile "The OS Language is Chinese Traditional", 1 GetLanguageAbbreviation = "CHS" ElseIf (StrComp(szAppreviation,"0404") = 0) Then LogToFile "The OS Language is Chinese Simplified", 1 GetLanguageAbbreviation = "CHT" ElseIf (StrComp(szAppreviation,"0406") = 0) Then LogToFile "The OS Language is Danish", 1 GetLanguageAbbreviation = "DAN" ElseIf (StrComp(szAppreviation,"040C") = 0) Then LogToFile "The OS Language is French", 1 GetLanguageAbbreviation = "FRA" ElseIf (StrComp(szAppreviation,"0407") = 0) Then LogToFile "The OS Language is German", 1 GetLanguageAbbreviation = "DEU" ElseIf (StrComp(szAppreviation,"0410") = 0) Then LogToFile "The OS Language is Italian", 1 GetLanguageAbbreviation = "ITA" ElseIf (StrComp(szAppreviation,"0C0A") = 0) Then LogToFile "The OS Language is Spanish", 1 GetLanguageAbbreviation = "ESN" ElseIf (StrComp(szAppreviation,"0411") = 0) Then LogToFile "The OS Language is Japanese", 1 GetLanguageAbbreviation = "JPN" ElseIf (StrComp(szAppreviation,"0412") = 0) Then LogToFile "The OS Language is Korean", 1 GetLanguageAbbreviation = "KOR" ElseIf (StrComp(szAppreviation,"0416") = 0) Then LogToFile "The OS Language is Portuguese", 1 GetLanguageAbbreviation = "PTB" ElseIf (StrComp(szAppreviation,"0413") = 0) Then LogToFile "The OS Language is Dutch", 1 GetLanguageAbbreviation = "NLD" ElseIf (StrComp(szAppreviation,"040B") = 0) Then LogToFile "The OS Language is Finnish", 1 GetLanguageAbbreviation = "FIN" ElseIf (StrComp(szAppreviation,"0414") = 0) Then LogToFile "The OS Language is Norwegian", 1 GetLanguageAbbreviation = "NOR" ElseIf (StrComp(szAppreviation,"041D") = 0) Then LogToFile "The OS Language is Swedish", 1 GetLanguageAbbreviation = "SVE" Else GetLanguageAbbreviation = "ENU" ' if lang is not one of the 16 supported, default to ENU - English End If End Function Function CheckDllRegistration() ' make sure NCS2Prov and NCSDiag is registered Dim nReturnCode Dim szDLL Dim szValue Dim szValue2 Dim bDLLsRegistered : bDLLsRegistered = True 'AF7799A5-A3E7-455C-92B5-8F9D7C127B15 szDLL = "NCS2Prov.NCS2Inst" nReturnCode = oReg.GetStringValue ( HKEY_CLASSES_ROOT,szDLL + "\CLSID","",szValue ) 'MsgBox "nReturnCode is " + CStr(nReturnCode) 'MsgBox "szValue is in function" + szValue If nReturnCode = 0 Then nReturnCode = oReg.GetStringValue ( HKEY_CLASSES_ROOT,"CLSID\" & szValue & "\LocalServer32","",szValue2 ) 'MsgBox "nReturnCode is " + CStr(nReturnCode) 'MsgBox "szValue is in function" + szValue2 If nReturnCode = 0 Then 'MsgBox "szValue is in function" + szValue If(InStr(UCase(szValue2), UCase("\Intel\NCS2\WMIProv\NCS2Prov.exe")) = 0)Then LogToFile szDLL + " - Is not registered correctly - Bad GUID", 0 bDLLsRegistered = False End If Else LogToFile szDLL + " - Is not registered correctly - Bad GUID", 0 bDLLsRegistered = False End if Else LogToFile szDLL + " - Does not exist under HKEY_CLASSES_ROOT", 0 bDLLsRegistered = False End If szDLL = "NIC_CDM_Prov.ProviderImp" nReturnCode = oReg.GetStringValue ( HKEY_CLASSES_ROOT,szDLL + "\CLSID","",szValue ) 'MsgBox "nReturnCode is " + CStr(nReturnCode) 'MsgBox "szValue is in function" + szValue If nReturnCode = 0 Then nReturnCode = oReg.GetStringValue ( HKEY_CLASSES_ROOT,"CLSID\" & szValue & "\LocalServer32","",szValue2 ) 'MsgBox "nReturnCode is " + CStr(nReturnCode) 'MsgBox "szValue is in function" + szValue2 If nReturnCode = 0 Then 'MsgBox "szValue is in function" + szValue If(InStr(UCase(szValue2), UCase("\Intel\NCS2\WMIProv\NCSDiag.exe")) = 0)Then LogToFile szDLL + " - Is not registered correctly - Bad GUID", 0 bDLLsRegistered = False End If Else LogToFile szDLL + " - Is not registered correctly - Bad GUID", 0 bDLLsRegistered = False End if Else LogToFile szDLL + " - Does not exist under HKEY_CLASSES_ROOT", 0 bDLLsRegistered = False End If If ( bDLLsRegistered = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (9)", 1 End If End Function Function CheckIntelNamespaces() Dim colItems Dim oItem Dim bWMI_Passes : bWMI_Passes = True Dim nOffset : nOffset = 0 Dim IntelNCS2_WMI_Classes(100) IntelNCS2_WMI_Classes(0) = "IANet_VLAN" IntelNCS2_WMI_Classes(1) = "IANet_802dot1QVLANService" IntelNCS2_WMI_Classes(2) = "IANet_Device802dot1QVLANServiceImplementation" IntelNCS2_WMI_Classes(3) = "IANet_VLANFor" IntelNCS2_WMI_Classes(4) = "IANet_Device802dot1QVLANServiceImplementation" IntelNCS2_WMI_Classes(5) = "IANet_VLANSetting" IntelNCS2_WMI_Classes(6) = "IANet_VLANSettingInt" IntelNCS2_WMI_Classes(7) = "IANet_VLANSettingEnum" IntelNCS2_WMI_Classes(8) = "IANet_VLANSettingSlider" IntelNCS2_WMI_Classes(9) = "IANet_VLANSettingMultiSelection" IntelNCS2_WMI_Classes(10) = "IANet_VLANSettingString" IntelNCS2_WMI_Classes(11) = "IANet_VLANToVLANSettingAssoc" IntelNCS2_WMI_Classes(12) = "IANet_LogicalEthernetAdapter" IntelNCS2_WMI_Classes(13) = "IANet_TeamOfAdapters" IntelNCS2_WMI_Classes(14) = "IANet_TeamedMemberAdapter" IntelNCS2_WMI_Classes(15) = "IANet_NetworkVirtualAdapter" IntelNCS2_WMI_Classes(16) = "IANet_TeamSetting" IntelNCS2_WMI_Classes(17) = "IANet_TeamSettingInt" IntelNCS2_WMI_Classes(18) = "IANet_TeamSettingEnum" IntelNCS2_WMI_Classes(19) = "IANet_TeamSettingSlider" IntelNCS2_WMI_Classes(20) = "IANet_TeamSettingMultiSelection" IntelNCS2_WMI_Classes(21) = "IANet_TeamSettingString" IntelNCS2_WMI_Classes(22) = "IANet_TeamToTeamSettingAssoc" IntelNCS2_WMI_Classes(23) = "IANet_DiagTest" IntelNCS2_WMI_Classes(24) = "IANet_DiagSetting" IntelNCS2_WMI_Classes(25) = "IANet_DiagResult" IntelNCS2_WMI_Classes(26) = "IANet_DiagTestForMSE" IntelNCS2_WMI_Classes(27) = "IANet_DiagResultForMSE" IntelNCS2_WMI_Classes(28) = "IANet_DiagResultForTest" IntelNCS2_WMI_Classes(29) = "IANet_DiagSettingForTest" IntelNCS2_WMI_Classes(30) = "IANet_EthernetAdapter" IntelNCS2_WMI_Classes(31) = "IANet_PhysicalEthernetAdapter" IntelNCS2_WMI_Classes(32) = "IANet_Setting" IntelNCS2_WMI_Classes(33) = "IANet_AdapterSetting" IntelNCS2_WMI_Classes(34) = "IANet_AdapterSettingInt" IntelNCS2_WMI_Classes(35) = "IANet_AdapterSettingEnum" IntelNCS2_WMI_Classes(36) = "IANet_AdapterSettingSlider" IntelNCS2_WMI_Classes(37) = "IANet_AdapterSettingMultiSelection" IntelNCS2_WMI_Classes(38) = "IANet_AdapterSettingString" IntelNCS2_WMI_Classes(39) = "IANet_AdapterToSettingAssoc" IntelNCS2_WMI_Classes(40) = "IANet_NetService" IntelNCS2_WMI_Classes(41) = "IANet_ExtendedStatus" IntelNCS2_WMI_Classes(42) = "CIM_ManagedElement" IntelNCS2_WMI_Classes(43) = "CIM_ManagedSystemElement" IntelNCS2_WMI_Classes(44) = "CIM_LogicalElement" IntelNCS2_WMI_Classes(45) = "CIM_LogicalDevice" IntelNCS2_WMI_Classes(46) = "CIM_Controller" IntelNCS2_WMI_Classes(47) = "CIM_PCIController" IntelNCS2_WMI_Classes(48) = "CIM_PCIDevice" IntelNCS2_WMI_Classes(49) = "CIM_ServiceAccessPoint" IntelNCS2_WMI_Classes(50) = "CIM_ProtocolEndpoint" IntelNCS2_WMI_Classes(51) = "CIM_IPProtocolEndpoint" IntelNCS2_WMI_Classes(52) = "CIM_VLAN" IntelNCS2_WMI_Classes(53) = "CIM_Component" IntelNCS2_WMI_Classes(54) = "CIM_RedundancyGroup" IntelNCS2_WMI_Classes(55) = "CIM_RedundancyComponent" IntelNCS2_WMI_Classes(56) = "CIM_NetworkAdapter" IntelNCS2_WMI_Classes(57) = "CIM_ExtraCapacityGroup" IntelNCS2_WMI_Classes(58) = "CIM_NetworkAdapterRedundancyComponent" IntelNCS2_WMI_Classes(59) = "CIM_EthernetAdapter" IntelNCS2_WMI_Classes(60) = "CIM_Dependency" IntelNCS2_WMI_Classes(61) = "CIM_ProvidesServiceToElement" IntelNCS2_WMI_Classes(62) = "CIM_ServiceSAPDependency" IntelNCS2_WMI_Classes(63) = "CIM_Service" IntelNCS2_WMI_Classes(64) = "CIM_VLANService" IntelNCS2_WMI_Classes(65) = "CIM_802dot1QVLANService" IntelNCS2_WMI_Classes(66) = "CIM_VLANFor" IntelNCS2_WMI_Classes(67) = "CIM_DeviceServiceImplementation" IntelNCS2_WMI_Classes(68) = "CIM_LogicalIdentity" IntelNCS2_WMI_Classes(69) = "CIM_NetworkVirtualAdapter" IntelNCS2_WMI_Classes(70) = "CIM_SAPSAPDependency" IntelNCS2_WMI_Classes(71) = "CIM_DeviceSAPImplementation" IntelNCS2_WMI_Classes(72) = "CIM_Configuration" IntelNCS2_WMI_Classes(73) = "CIM_ElementConfiguration" IntelNCS2_WMI_Classes(74) = "CIM_DeviceIdentity" IntelNCS2_WMI_Classes(75) = "CIM_DeviceSoftware" IntelNCS2_WMI_Classes(76) = "CIM_Setting" IntelNCS2_WMI_Classes(77) = "CIM_BootService" IntelNCS2_WMI_Classes(78) = "CIM_SettingContext" IntelNCS2_WMI_Classes(79) = "CIM_ElementSetting" IntelNCS2_WMI_Classes(80) = "CIM_DiagnosticTest" IntelNCS2_WMI_Classes(81) = "CIM_DiagnosticSetting" IntelNCS2_WMI_Classes(82) = "CIM_DiagnosticResult" IntelNCS2_WMI_Classes(83) = "CIM_DiagnosticResultForMSE" IntelNCS2_WMI_Classes(84) = "CIM_DiagnosticResultForTest" IntelNCS2_WMI_Classes(85) = "CIM_DiagnosticTestForMSE" IntelNCS2_WMI_Classes(86) = "CIM_DiagnosticTestInPackage" IntelNCS2_WMI_Classes(87) = "CIM_DiagnosticResultInPackage" IntelNCS2_WMI_Classes(88) = "CIM_DiagnosticTestSoftware" IntelNCS2_WMI_Classes(89) = "CIM_DiagnosticSettingForTest" IntelNCS2_WMI_Classes(90) = "IANet_BootAgent" IntelNCS2_WMI_Classes(91) = "IANet_DeviceBootServiceImplementation" IntelNCS2_WMI_Classes(92) = "IANet_BootAgentSetting" IntelNCS2_WMI_Classes(93) = "IANet_BootAgentSettingEnum" IntelNCS2_WMI_Classes(94) = "IANet_BootAgentToBootAgentSettingAssoc" Dim CIMV2_WMI_Classes(25) CIMV2_WMI_Classes(0) = "IANet_EthernetAdapter" CIMV2_WMI_Classes(1) = "IANet_PhysicalEthernetAdapter" CIMV2_WMI_Classes(2) = "IANet_DiagTest" CIMV2_WMI_Classes(3) = "IANet_DiagSetting" CIMV2_WMI_Classes(4) = "IANet_DiagResult" CIMV2_WMI_Classes(5) = "IANet_DiagTestForMSE" CIMV2_WMI_Classes(6) = "IANet_DiagResultForMSE" CIMV2_WMI_Classes(7) = "IANet_DiagResultForTest" CIMV2_WMI_Classes(8) = "IANet_DiagSettingForTest" CIMV2_WMI_Classes(9) = "CIM_EthernetAdapter" CIMV2_WMI_Classes(10) = "CIM_ProvidesServiceToElement" CIMV2_WMI_Classes(11) = "CIM_DiagnosticTest" CIMV2_WMI_Classes(12) = "CIM_DiagnosticSetting" CIMV2_WMI_Classes(13) = "CIM_DiagnosticResult" CIMV2_WMI_Classes(14) = "CIM_DiagnosticResultForMSE" CIMV2_WMI_Classes(15) = "CIM_DiagnosticResultForTest" CIMV2_WMI_Classes(16) = "CIM_DiagnosticTestForMSE" CIMV2_WMI_Classes(17) = "CIM_DiagnosticTestInPackage" CIMV2_WMI_Classes(18) = "CIM_DiagnosticResultInPackage" CIMV2_WMI_Classes(19) = "CIM_DiagnosticTestSoftware" CIMV2_WMI_Classes(20) = "CIM_DiagnosticSettingForTest" On Error Resume Next For nOffset = 0 To UBound(IntelNCS2_WMI_Classes) Step 1 If ( IsEmpty(IntelNCS2_WMI_Classes(nOffset))) Then Exit For End If Err.Clear Set colItems = oWMI_Service_IntelNCS2.ExecQuery("Select * from " + IntelNCS2_WMI_Classes(nOffset)) For each oItem in colItems Next If Err Then LogToFile IntelNCS2_WMI_Classes(nOffset) + " could not be found!", 0 bWMI_Passes = False End If Next For nOffset = 0 To UBound(CIMV2_WMI_Classes) Step 1 If ( IsEmpty(CIMV2_WMI_Classes(nOffset))) Then Exit For End If Err.Clear Set colItems = oWMI_Service_CIMV2.ExecQuery("Select * from " + CIMV2_WMI_Classes(nOffset)) For each oItem in colItems Next If Err Then LogToFile CIMV2_WMI_Classes(nOffset) + " could not be found!", 0 bWMI_Passes = False End If Next If ( bWMI_Passes = False ) Then LogToFile "The installation of PROSet appears to be corrupted, please uninstall, then re-install PROSet - (10)", 1 End If End Function Function CheckDriversInstalled() Dim nReturnCode Dim szKeyPath Dim arrSubKeys Dim subkey Dim arrSubKeys2 Dim subkey2 Dim arrSubKeys3 Dim subkey3 Dim szIntelDeviceKeyPath Dim szIntelNetworkDeviceKeyPath Dim szValue Dim nDevicesFound: nDevicesFound = 0 szKeyPath = "SYSTEM\CurrentControlSet\Enum\PCI" nReturnCode = oReg.EnumKey (HKEY_LOCAL_MACHINE, szKeyPath, arrSubKeys) If(nReturnCode = 0) Then For Each subkey In arrSubKeys If(InStr(subkey,"VEN_8086")) Then ' an Intel device was found szIntelDeviceKeyPath = szKeyPath + "\" + subkey nReturnCode = oReg.EnumKey (HKEY_LOCAL_MACHINE, szIntelDeviceKeyPath, arrSubKeys2) If (nReturnCode = 0) Then For each subkey2 in arrSubKeys2 nReturnCode = oReg.GetMultiStringValue(HKEY_LOCAL_MACHINE, szIntelDeviceKeyPath + "\" + subkey2,"CompatibleIDs",arrSubKeys3) If(nReturnCode = 0) Then For Each subkey3 In arrSubKeys3 If(InStr(subkey3,"CC_0200")) Then ' an Intel Wired Network device was found ' create a new class object and fill in the adapter information Set AdaptersFoundInPCI(nDevicesFound) = new NetworkDevicesInPCISpace szIntelNetworkDeviceKeyPath = szIntelDeviceKeyPath + "\" + subkey2 AdaptersFoundInPCI(nDevicesFound).Path = szIntelNetworkDeviceKeyPath ' attempt to get the friendly name of the adapter, this string may not be found on all adapter - only multiport szValue = GetRegistryString ( szIntelNetworkDeviceKeyPath,"FriendlyName" ) If (IsNull(szValue)) Then szValue = GetRegistryString ( szIntelNetworkDeviceKeyPath,"DeviceDesc" ) End If ' now we are getting the name of the Intel adapter If ( Not IsNull(szValue)) Then szValue = CStr(szValue) 'oLogFile.WriteLine (szValue + " is installed on the system.") AdaptersFoundInPCI(nDevicesFound).DeviceDesc = szValue oLogFile.WriteLine "PCI ENUM reports " + AdaptersFoundInPCI(nDevicesFound).DeviceDesc GetAdapterPCI_Information szIntelNetworkDeviceKeyPath, nDevicesFound nDevicesFound = nDevicesFound + 1 Exit For Else oLogFile.WriteLine ("(4) Regisry may be corrupted, please check the path to " + szHKLM + "\" + szIntelNetworkDeviceKeyPath) End If End If Next Else oLogFile.WriteLine ("(3) Regisry may be corrupted, please check the path to " + szHKLM + "\" + szIntelDeviceKeyPath + "\" + subkey2) End If Next Else oLogFile.WriteLine ("(2) Regisry may be corrupted, please check the path to " + szHKLM + "\" + szIntelDeviceKeyPath) End If End If Next Else oLogFile.WriteLine ("(1) Regisry may be corrupted, please check the path to " + szHKLM + "\" + szKeyPath) End If ' check if any adapter were found If (nDevicesFound = 0) Then oLogFile.WriteLine ("NO INTEL WIRED ADAPTERS WERE FOUND IN THE SYSTEM!!!!!!!") End If End Function Function CheckNetworkClass() Dim szKeyPath Dim nReturnCode Dim arrSubKeys Dim subkey Dim arrSubKeys2 Dim subkey2 Dim szNetworkDeviceKeyPath Dim hKey Dim nDevicesFound: nDevicesFound = 0 Dim szCoInstallerName Dim bIntelAdapterFound: bIntelAdapterFound = FALSE Dim tmp Dim bNon8086IntelAdapter: bNon8086IntelAdapter = FALSE If(bOS32 = TRUE) Then szCoInstallerName = "INTELNIC.DLL" ElseIf(bOS64 = TRUE) Then szCoInstallerName = "INTLNC64.DLL" Else szCoInstallerName = "INTNC32E.DLL" End If szKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}" nReturnCode = oReg.EnumKey (HKEY_LOCAL_MACHINE, szKeyPath, arrSubKeys) If(nReturnCode = 0) Then For Each subkey In arrSubKeys szNetworkDeviceKeyPath = szKeyPath + "\" + subkey 'MsgBox "registry path is " + szNetworkDeviceKeyPath nReturnCode = oReg.GetMultiStringValue(HKEY_LOCAL_MACHINE, szNetworkDeviceKeyPath,"CoInstallers32",arrSubKeys2) If ( nReturnCode <> 0 ) Then ' device could be a non Intel adapter with 8086 hKey = GetRegistryString ( szNetworkDeviceKeyPath, "MatchingDeviceId" ) If (Not IsNull(hKey)) Then hKey = CStr(hKey) If( InStr(hkey,"pci\ven_8086" )) Then tmp = InStr(UCase(hkey),"SUBSYS_") hkey = Mid(hkey,(tmp + Len("SUBSYS_") + 4),4) 'MsgBox "mid is " + hkey bIntelAdapterFound = IsNonIntel8086Adapter (hkey) If(bIntelAdapterFound = TRUE) Then 'MsgBox "Here" bNon8086IntelAdapter = TRUE End If End If End If Else For Each subkey2 In arrSubKeys2 'MsgBox "subkey is " + subkey2 If(InStr(UCase(subkey2),szCoInstallerName)) Then bIntelAdapterFound = TRUE Exit For End If Next End If If ( bIntelAdapterFound = TRUE ) Then ' it must be an Intel Wired NIC at this point - look for the oldfriendly name first hKey = GetRegistryString (szNetworkDeviceKeyPath, "OldFriendly") If (IsNull(hKey)) Then hKey = GetRegistryString (szNetworkDeviceKeyPath, "DriverDesc") End If If (Not IsNull(hKey)) Then hKey = CStr(hKey) 'MsgBox "DeviceDesc is " + hKey Set AdaptersFoundInNetworkClass(nDevicesFound) = new NetworkDevicesInNetworkClass AdaptersFoundInNetworkClass(nDevicesFound).DriverDesc = hKey oLogFile.WriteLine "Network class reports " + AdaptersFoundInNetworkClass(nDevicesFound).DriverDesc AdaptersFoundInNetworkClass(nDevicesFound).Path = szNetworkDeviceKeyPath If(bNon8086IntelAdapter = TRUE) Then AdaptersFoundInNetworkClass(nDevicesFound).Non8086IntelAdapter = "Yes" End If ' check here if this device is a TEAM or VLAN CheckIfANS szNetworkDeviceKeyPath, nDevicesFound GetAdapterNetworkClass_Information szNetworkDeviceKeyPath, nDevicesFound nDevicesFound = nDevicesFound + 1 End If End If bIntelAdapterFound = FALSE bNon8086IntelAdapter = FALSE Next Else oLogFile.WriteLine ("(1) Regisry may be corrupted, please check the path to " + szHKLM + "\" + szKeyPath) End If ' check if any adapter were found If (nDevicesFound = 0) Then oLogFile.WriteLine ("NO INTEL WIRED ADAPTERS ARE INSTALLED ON THE SYSTEM!!!!!!!") End If End Function Function IsNonIntel8086Adapter(szName) 'MsgBox "name is " + szName If (StrComp(szName, "1028")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1014")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "0E11")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "103C")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1179")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "107B")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1033")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1025")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "110A")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "10CF")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "144D")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1509")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "14A4")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "1186")) Then IsNonIntel8086Adapter = TRUE ElseIf (StrComp(szName, "109F")) Then IsNonIntel8086Adapter = TRUE Else IsNonIntel8086Adapter = FALSE End If End Function Function CheckIfANS(szPath, nDevice) Dim szValue Dim nValue 'MsgBox "Adapter name is: " + AdaptersFoundInNetworkClass(nDevice).DriverDesc + " " + ANS_NAME If(StrComp(AdaptersFoundInNetworkClass(nDevice).DriverDesc,ANS_NAME) = 0) Then AdaptersFoundInNetworkClass(nDevice).IsANS = "Yes" Else Exit Function End If szValue = GetRegistryDWORD (szPath, "TeamMode") If (Not IsNull(szValue)) Then AdaptersFoundInNetworkClass(nDevice).IsTeam = "Yes" szValue = GetRegistryDWORD (szPath, "VlanAdded") If (Not IsNull(szValue)) Then AdaptersFoundInNetworkClass(nDevice).VlanOnTeam = "Yes" End If End If szValue = GetRegistryDWORD (szPath, "VLANID") If (Not IsNull(szValue)) Then AdaptersFoundInNetworkClass(nDevice).IsVLAN = "Yes" End If End Function Function FindAdapters() CheckDriversInstalled() CheckNetworkClass() CheckAdaptersInWMI() Dim nOffSet: nOffSet = 0 Dim nOffSet2: nOffSet2 = 0 Dim bAdapterFound: bAdapterFound = FALSE ' first check and see if everything in PCI is found in WMI For nOffSet = 0 To UBound(AdaptersFoundInPCI) Step 1 If(IsObject(AdaptersFoundInPCI(nOffset)) = FALSE) Then Exit For End If For nOffSet2 = 0 to UBound(AdaptersFoundInWMI) Step 1 If(IsObject(AdaptersFoundInWMI(nOffset2)) = FALSE) Then Exit For End If 'MsgBox "PCI - PCI Bus " + AdaptersFoundInPCI(nOffSet).PCI_Bus 'MsgBox "WMI - PCI Bus " + AdaptersFoundInWMI(nOffSet2).PCI_Bus 'MsgBox "WMI - PCI Device " + AdaptersFoundInPCI(nOffSet).PCI_Device 'MsgBox "WMI - PCI Device " + AdaptersFoundInWMI(nOffSet2).PCI_Device If((StrComp(AdaptersFoundInPCI(nOffSet).PCI_Bus,AdaptersFoundInWMI(nOffSet2).PCI_Bus) = 0 ) And _ (StrComp(AdaptersFoundInPCI(nOffSet).PCI_Device,AdaptersFoundInWMI(nOffSet2).PCI_Device) = 0 ))Then 'oLogFile.WriteLine (NetworkDevicesInNetworkClass(nOffSet2) + " was found in both places in the registry.") 'MsgBox "adapter good!" bAdapterFound = TRUE Exit For End If Next If(bAdapterFound = FALSE)Then oLogFile.WriteLine (AdaptersFoundInPCI(nOffSet).DeviceDesc + " was enumerated by Windows but NOT found in WMI") End If bAdapterFound = FALSE Next bAdapterFound = FALSE ' now check if everything found in the Network Class is found in WMI For nOffSet = 0 To UBound(AdaptersFoundInNetworkClass) Step 1 If(IsObject(AdaptersFoundInNetworkClass(nOffset)) = FALSE) Then Exit For End If ' if this is an ANS device, do not search! If (StrComp(AdaptersFoundInNetworkClass(nOffset).IsANS,"Yes") <> 0 ) Then For nOffSet2 = 0 to UBound(AdaptersFoundInWMI) Step 1 If(IsObject(AdaptersFoundInWMI(nOffset2)) = FALSE) Then Exit For End If 'MsgBox "network bus ->" + AdaptersFoundInNetworkClass(nOffSet).BusNumber + "<-" 'MsgBox "wMI bus ->" + AdaptersFoundInWMI(nOffSet2).PCI_Bus + "<-" 'MsgBox "network device ->" + AdaptersFoundInNetworkClass(nOffSet).SlotNumber + "<-" 'MsgBox "wMI device ->" + AdaptersFoundInWMI(nOffSet2).PCI_Device + "<-" If((StrComp(AdaptersFoundInNetworkClass(nOffSet).BusNumber,AdaptersFoundInWMI(nOffSet2).PCI_Bus) = 0 ) And _ (StrComp(AdaptersFoundInNetworkClass(nOffSet).SlotNumber,AdaptersFoundInWMI(nOffSet2).PCI_Device) = 0 ))Then 'oLogFile.WriteLine (NetworkDevicesInNetworkClass(nOffSet2) + " was found in both places in the registry.") bAdapterFound = TRUE Exit For ElseIf ( StrComp(AdaptersFoundInNetworkClass(nOffSet).Non8086IntelAdapter,"Yes" ) = 0) Then ' if this is an 8086 wired net device, see if the device IDs match End If Next If (bAdapterFound = FALSE) Then oLogFile.WriteLine (AdaptersFoundInNetworkClass(nOffSet).DriverDesc + " was found in the Network Class but NOT found in WMI") End If bAdapterFound = FALSE End If Next bAdapterFound = FALSE ' now check if everything found in PCI can be found in the Network Class For nOffSet = 0 To UBound(AdaptersFoundInPCI) Step 1 If(IsObject(AdaptersFoundInPCI(nOffset)) = FALSE) Then Exit For End If For nOffSet2 = 0 to UBound(AdaptersFoundInNetworkClass) Step 1 ' do not search if the device is an ANS device If(IsObject(AdaptersFoundInNetworkClass(nOffset2)) = FALSE) Then Exit For End If If (StrComp(AdaptersFoundInNetworkClass(nOffset2).IsANS, "Yes") <> 0) Then If((StrComp(AdaptersFoundInPCI(nOffSet).PCI_Bus,AdaptersFoundInNetworkClass(nOffSet2).BusNumber) = 0 ) And _ (StrComp(AdaptersFoundInPCI(nOffSet).PCI_Device,AdaptersFoundInNetworkClass(nOffSet2).SlotNumber) = 0 ))Then 'oLogFile.WriteLine (NetworkDevicesInNetworkClass(nOffSet2) + " was found in both places in the registry.") bAdapterFound = TRUE Exit For End If End If Next If (bAdapterFound = FALSE) Then oLogFile.WriteLine (AdaptersFoundInPCI(nOffSet).DeviceDesc + " was found in PCI but NOT found in the Network Class") End If bAdapterFound = FALSE Next bAdapterFound = FALSE ' now check if everything found in the Network Class was found in PCI For nOffSet = 0 To UBound(AdaptersFoundInNetworkClass) Step 1 If(IsEmpty(AdaptersFoundInNetworkClass(nOffset)) = TRUE) Then Exit For End If If (StrComp(AdaptersFoundInNetworkClass(nOffset).IsANS, "Yes") <> 0) Then For nOffSet2 = 0 to UBound(AdaptersFoundInPCI) Step 1 If(IsEmpty(AdaptersFoundInPCI(nOffset2)) = TRUE) Then Exit For End If If((StrComp(AdaptersFoundInNetworkClass(nOffSet).BusNumber,AdaptersFoundInPCI(nOffSet2).PCI_Bus) = 0 ) And _ (StrComp(AdaptersFoundInNetworkClass(nOffSet).SlotNumber,AdaptersFoundInPCI(nOffSet2).PCI_Device) = 0 ))Then 'oLogFile.WriteLine (NetworkDevicesInNetworkClass(nOffSet2) + " was found in both places in the registry.") bAdapterFound = TRUE If(StrComp(AdaptersFoundInNetworkClass(nOffSet).Number,AdaptersFoundInPCI(nOffSet2).Number) <> 0 )Then oLogFile.WriteLine (AdaptersFoundInPCI(nOffSet).DeviceDesc + " contains an invalid Driver registry key.") End If Exit For End If Next If (bAdapterFound = FALSE) Then oLogFile.WriteLine (AdaptersFoundInNetworkClass(nOffSet).DriverDesc + " was found in the Network Class but NOT found in PCI") End If bAdapterFound = FALSE End If Next End Function Function CheckDriverInfFiles() Dim nOffset Dim szPath szPath = szInfPath + "\" + AdaptersFoundInNetworkClass(nOffset).InfPath For nOffset = 0 to UBound(AdaptersFoundInNetworkClass) Step 1 If(IsEmpty(AdaptersFoundInNetworkClass(nOffset)) = TRUE) Then Exit For End If If IsFile(szPath) Then ' maybe some checking here to make sure the INF file is valid 'Set oOEMFile = OpenTxtFile(szPath, ForReading) 'While Not oOEMFile.AtEndOfStream And Not bInfFound ' szLine = oOEMFile.ReadLine ' if(InStr(szline,"Advanced Network Services Virtual Adapter"))Then ' bInfFound = True ' End If 'Wend Else oLogFile.WriteLine (AdaptersFoundInNetworkClass(nOffset).InfPath + " is an invalid inf file.") End If Next End Function Function CheckAdaptersInWMI() Dim colItems Dim oItem Dim nDevicesFound: nDevicesFound = 0 Dim tmp Set colItems = oWMI_Service_IntelNCS2.InstancesOf("IANet_PhysicalEthernetAdapter") If IsNull(colItems) Then 'MsgBox "error" MsgBox "No adapters could be found. PROSet will not work unless atleast one Intel adapter is installed!", 0, "Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If For each oItem in colItems Set AdaptersFoundInWMI(nDevicesFound) = new NetworkDevicesInWMI AdaptersFoundInWMI(nDevicesFound).Caption = oItem.Caption AdaptersFoundInWMI(nDevicesFound).DeviceName = oItem.Name AdaptersFoundInWMI(nDevicesFound).Description = oItem.Description AdaptersFoundInWMI(nDevicesFound).OriginalDisplayName = oItem.OriginalDisplayName tmp = oItem.SlotID AdaptersFoundInWMI(nDevicesFound).PCI_Bus = Left(tmp,(InStr(tmp,":") - 1)) AdaptersFoundInWMI(nDevicesFound).PCI_Device = Right(tmp,(Len(tmp) - InStr(tmp,":"))) LogToFile "PROSet has identified the following adapter: " + AdaptersFoundInWMI(nDevicesFound).Caption, 1 'AdaptersFoundInWMI(nDevicesFound).PCIDeviceID = oItem.pcideviceid nDevicesFound = nDevicesFound + 1 Next ' check if any adapter were found If (nDevicesFound = 0) Then MsgBox "No adapters could be found. PROSet will not work unless atleast one Intel adapter is installed!", 0, "Intel(R) Validation Tool" WScript.Quit(ERR_OK) End If End Function Function GetAdapterPCI_Information(szPath,nDevice) Dim hKey Dim nOffset: nOffset = 0 Dim nReturnCode Dim subkey Dim arrSubKeys Dim tmp Dim tmp1 hKey = GetRegistryString (szPath, "ClassName") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).ClassName = hKey End If hKey = GetRegistryString (szPath, "ClassGUID") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).ClassGUID = hKey End If hKey = GetRegistryString (szPath, "Driver") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).Driver = hKey AdaptersFoundInPCI(nDevice).Number = Mid(hKey, Len(hKey) - 3, 4) 'MsgBox "the number is " + AdaptersFoundInPCI(nDevice).Number End If hKey = GetRegistryString (szPath, "LocationInformation") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).LocatationInformation = hKey ' strip off the PCI Bus number here tmp = Left(hkey,InStr(hkey,",")) tmp1 = InStr(tmp,"bus")+ Len("bus") AdaptersFoundInPCI(nDevice).PCI_Bus = Mid(tmp,(tmp1 + 1),((Len(tmp) - 1) - tmp1)) ' strip off the PCI Device number tmp = Left(hkey,InStr(hkey,"function") - 2) tmp = Right(tmp,InStr(tmp,",")) tmp1 = InStr(tmp,"device")+ Len("device") AdaptersFoundInPCI(nDevice).PCI_Device = Mid(tmp,(tmp1 + 1),((Len(tmp) - 1) - tmp1)) ' strip off the function number tmp = Right(hkey,(Len(hkey) - (InStr(hkey,"function") - 1))) tmp1 = InStr(tmp,"function")+ Len("function") AdaptersFoundInPCI(nDevice).PCI_Function = Mid(tmp,(tmp1 + 1),(Len(tmp) - tmp1)) End If hKey = GetRegistryString (szPath, "Manufacturer") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).Manufacturer = hKey End If hKey = GetRegistryString (szPath, "Service") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInPCI(nDevice).Service = hKey End If nReturnCode = oReg.GetMultiStringValue(HKEY_LOCAL_MACHINE, szPath,"CompatibleIDs",arrSubKeys) If(nReturnCode = 0) Then For Each subkey In arrSubKeys AdaptersFoundInPCI(nDevice).CompatibleIDs(nOffset) = subkey nOffset = nOffset + 1 Next End If nOffset = 0 nReturnCode = oReg.GetMultiStringValue(HKEY_LOCAL_MACHINE, szPath,"HardwareID",arrSubKeys) If(nReturnCode = 0) Then For Each subkey In arrSubKeys AdaptersFoundInPCI(nDevice).HardwareID(nOffset) = subkey nOffset = nOffset + 1 Next End If End Function Function GetAdapterNetworkClass_Information(szPath,nDevice) Dim hKey Dim nOffset: nOffset = 0 Dim nReturnCode Dim subkey Dim arrSubKeys hKey = GetRegistryString (szPath, "ComponentID") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).ComponentID = hKey End If hKey = GetRegistryString (szPath, "DriverDate") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).DriverDate = hKey End If hKey = GetRegistryString (szPath, "DriverVersion") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).DriverVersion = hKey End If hKey = GetRegistryString (szPath, "InfPath") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).InfPath = hKey End If hKey = GetRegistryString (szPath, "ProviderName") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).ProviderName = hKey End If hKey = GetRegistryString (szPath, "BusNumber") If(Not IsNull(hKey))Then hKey = CStr(hKey) hKey = LTrim(hKey) AdaptersFoundInNetworkClass(nDevice).BusNumber = hKey End If hKey = GetRegistryString (szPath, "SlotNumber") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).SlotNumber = hKey End If nReturnCode = oReg.GetMultiStringValue(HKEY_LOCAL_MACHINE, szPath,"CoInstallers32",arrSubKeys) If(nReturnCode = 0) Then For Each subkey In arrSubKeys AdaptersFoundInNetworkClass(nDevice).CoInstallers32(nOffset) = subkey nOffset = nOffset + 1 Next End If AdaptersFoundInNetworkClass(nDevice).Number = Mid(szPath, Len(szPath) - 3, 4) If(StrComp(AdaptersFoundInNetworkClass(nDevice).Non8086IntelAdapter, "Yes") <> 0) Then hKey = GetRegistryDWORD (szPath, "ANSLoaded") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).ANSLoaded = hKey 'MsgBox "ANSLoaded is " + AdaptersFoundInNetworkClass(nDevice).ANSLoaded End If End If ' if this is an ANS device check if it is a VLAN or TEAM 'MsgBox "isANS ->" + AdaptersFoundInNetworkClass(nDevice).IsANS If(StrComp(AdaptersFoundInNetworkClass(nDevice).IsANS,"Yes") = 0 ) Then If(StrComp(AdaptersFoundInNetworkClass(nDevice).IsTeam,"Yes") = 0 ) Then hKey = GetRegistryDWORD (szPath, "TotalPhysicalAdapters") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).TotalPhysicalAdapters = hKey End If End If If ((StrComp(AdaptersFoundInNetworkClass(nDevice).VlanOnTeam,"Yes") = 0 ) Or _ (StrComp(AdaptersFoundInNetworkClass(nDevice).IsVLAN , "Yes") = 0) ) Then hKey = GetRegistryString (szPath, "VLANDisplayName") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).VLANDisplayName = hKey End If hKey = GetRegistryDWORD (szPath, "VLANID") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).VLANID = hKey 'MsgBox "VLANID is " + AdaptersFoundInNetworkClass(nDevice).VLANID End If hKey = GetRegistryString (szPath, "VLANName") If(Not IsNull(hKey))Then hKey = CStr(hKey) AdaptersFoundInNetworkClass(nDevice).VLANName = hKey End If End If End If End Function Function LogToFile(szOutput,nLogLevel) If( (bAlwaysOutput = True) or (nLogLevel = 1) ) Then oLogFile.WriteLine szOutput End If End Function Function DetermineOS() Is32Bit() Is32e() Is64Bit() CheckOS_Version() End Function Function CheckOS_Version Dim szVersion: szVersion = "" szVersion = fs.GetFileVersion(szSystemPath + "\" + "hal.dll") If Len(szVersion) Then If(InStr(szVersion,"5.0.2195")) Then bWindows2000 = TRUE LogToFile "User's operating system is Windows 2000 " + szVersion, 1 ElseIf(InStr(szVersion,"5.1.2600")) Then bWindowsXP = TRUE LogToFile "User's operating system is Windows XP " + szVersion, 1 ElseIf(InStr(szVersion,"5.2.3790")) Then bWindows2003 = TRUE LogToFile "User's operating system is Windows 2003 " + szVersion, 1 Else LogToFile "Unable to determine the operating system version " + szVersion, 1 End If Else LogToFile "Unable to determine the operating system version", 1 End If End Function Function Is32Bit() Dim szOS szOS = GetRegistryString("HARDWARE\DESCRIPTION\System\CentralProcessor\0","Identifier") If (Not IsNull(szOS)) Then If(InStr(UCase(szOS),"X86"))Then bOS32 = True LogToFile "User's system is 32 bit" , 1 Else bOS32 = False End If Else LogToFile "Unable to determine the OS version/type from the registry", 1 End If End Function Function Is64Bit() Dim szOS szOS = GetRegistryString("HARDWARE\DESCRIPTION\System\CentralProcessor\0","Identifier") If (Not IsNull(szOS)) Then If(InStr(UCase(szOS),"IA64"))Then bOS64 = True LogToFile "User's system is 64 bit", 1 Else bOS64 = False End If Else LogToFile "Unable to determine the OS version/type from the registry", 1 End If End Function Function Is32e() Dim szOS szOS = GetRegistryString("HARDWARE\DESCRIPTION\System\CentralProcessor\0","Identifier") If (Not IsNull(szOS)) Then If((InStr(UCase(szOS),"AMD64")) Or (InStr(UCase(szOS),"EM64T")))Then LogToFile "User's system is x64 bit", 1 bOS32e = True Else bOS32e = False End If Else LogToFile "Unable to determine the OS version/type from the registry", 1 End If End Function ' Sub ErrorCheck() ' Displays Error and Extended Error Info to standard output ' '====================================================================================================== Sub ErrorCheck() Dim errExObject, strErrText oLogFile.WriteLine "Error Number=" & Err.Number oLogFile.WriteLine "Error Description=" & Err.Description Set errExObject = CreateObject("WbemScripting.SWbemLastError") If IsNull(errExObject) = FALSE Then strErrText = errExObject.GetObjectText_ oLogFile.WriteLine "MOF=" & strErrText End If End Sub Function OpenTxtFile(szFileName, IOMode) Const UnicodeUseDefault = -2, UnicodeTrue = -1, UnicodeFalse = 0 'DbgOut "Opening file: " + szFileName If Not fs.FileExists(szFileName) Then Select Case IOMode Case ForReading ' Complain CriticalError "Source File: [" + szFileName + "] does not exist." Case ForWriting, ForAppending fs.CreateTextFile szFileName 'Create a file End Select ElseIf IOMode = ForWriting Then ' Delete file that will be over-written fs.DeleteFile szFileName fs.CreateTextFile szFileName End If Dim f: Set f = fs.GetFile(szFileName) Set OpenTxtFile = f.OpenAsTextStream(IOMode, UnicodeUseDefault) End Function