This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Moving 64bit clients to new server

I have recently upgraded Sophos EC from 3.1 to 4.5 by installing new server and using migration guide to move clients to new server (clients are still on 7.1 until i'm sure they are all moved then will begin upgrade to 9.5)  

Problem i'm having is that none of my 64bit clients are getting updated to the new server, 32bit are moving and changing update locations with no problems.  Is there a step that i missing that someone has found (i'm sure i'm not the first one to migrate 64bit clients) been searching through knowledge base and boards and still haven't found anything.

Any help appreciated..

:8797


This thread was automatically locked due to age.
Parents
  • HI,

    Hi,

    Are the 64-bit machines pointing at the new management server in terms of RMS?

    if you take one of the 64-bit machines as an example, does the key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sophos\Messaging System\Router\ParentAddress

    point to the new server?

    I wrote a script a while back to try and check some of the RMS settings to save manually doing it.  I've pasted it below, it's a VBScript so you'll need to save it as RMSCheck.vbs for example.

    The idea being that you run it on the client, it asks for the address of the management server and then attempts to read the registry values of the server (certauthstore) using WMI and compare the machines local identify keys against those on the server.  The 3 keys should be the same and it will alert if that's not the case.  It also displays the parent address of the local machine and if the certificate cac is the same on the server and client.  It could do more but I stopped adding to it.  Hopefully it'll work and give you something to go on. As I say it uses WMI to read the remote registry so it all hinges on ability to do that.

    You would need to run it as an account which is a administrator both locally on the client and over the server.  I'd be interested to know if it helps.   I should probably overhaul it at some point as in theory it's quite useful and can be a good first check. 

    Regards,

    Jak

    ' Script to run on the client to ensure that the SEC Server and client registry keys are in sync in terms of the values
    ' cac.pem and mrinit.conf.
    ' Note: Requires the remote registry service on the Sophos Management Server to be running.
    '-------------------------------------------------------------------------------------------------------------------
    Option Explicit
    on error resume next
    
    'Constants
    const HKEY_LOCAL_MACHINE = &H80000002
    
    'Variables
    dim strAddressOfMS, strAddressOfCli
    dim strServerFriendly, strWOW6432Node, strCertPath, strClientFriendly
    dim strServerRouterKey, strServerManagedAppKey, strServerDelegatedManagerKey, strServerCAC
    dim strClientRouterKey, strClientManagedAppKey, strClientDelegatedManagerKey, strClientCAC
    dim strMessage, strParentAddress
    dim strRouterPKC, strRouterPKP
    dim strRouterPKCExists, strRouterPKPExists
    dim strAgentPKC, strAgentPKP
    dim strAgentPKPExists, strAgentPKCExists
    dim objNetwork, strProcessorKey, strProcessorName
    
    strAddressOfMS  = InputBox("Address of SEC Server", "RMS Checker")
    
    set objNetwork = WScript.CreateObject( "WScript.Network" )
    strAddressOfCli = objNetwork.ComputerName
    set objNetwork = nothing
    
    if strAddressOfCli = "" then
      strAddressOfCli = "."
    end if  
    
    strProcessorKey  = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
    strProcessorName = "Identifier"
    strCertPath     = "Sophos\Certification Manager\CertAuthStore"
    strMessage      = "" ' will contain the output string
    strWOW6432Node  = "" ' will contain the string wow6432node if on 64 bit machine
    
    'Server Keys
    
    if Is64 (strAddressOfMS) then 
       strWOW6432Node ="WOW6432Node\"
       strServerFriendly = "64-bit"
    else
      strWOW6432Node =""   
       strServerFriendly = "32-bit"
    end if
    
    strServerRouterKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "RouterKey", strAddressOfMS)
    strServerManagedAppKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "ManagedAppKey", strAddressOfMS)
    strServerDelegatedManagerKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "DelegatedManagerKey", strAddressOfMS)
    strServerCAC  = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "cac", strAddressOfMS)
    
    
       
    'Client Keys
    If Is64(strAddressOfCli) then
       strWOW6432Node ="wow6432node\"
       strClientFriendly = "64-bit"
    else
       strWOW6432Node ="" 
       strClientFriendly = "32-bit"   
    end if
    
    strClientRouterKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System\CertificationIdentityKeys", "CertificationIdentityKey", strAddressOfCli)
    	 
    strClientManagedAppKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Remote Management System\CertificationIdentityKeys", "ManagedApplication", strAddressOfCli)
    	 
    strClientDelegatedManagerKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "CertificationIdentityKey", strAddressOfCli)
    	 
    strClientCAC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System", "cac", strAddressOfCli)
    	 
    strParentAddress = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System\Router", "ParentAddress", strAddressOfCli)
    
    strRouterPKC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Messaging System\Router\Private", "pkc", strAddressOfCli)
    
    strRouterPKP = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Messaging System\Router\Private", "pkp", strAddressOfCli)   
    
    strAgentPKC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "pkc", strAddressOfCli)
    
    strAgentPKP = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "pkp", strAddressOfCli) 
       
    if len(strRouterPKC) > 50 then
      strRouterPKCExists = "Yes"
    else
      strRouterPKCExists = strRouterPKC
    End if
    
    if len(strRouterPKP) > 50 then
      strRouterPKPExists = "Yes"
    else
      strRouterPKPExists = strRouterPKP
    End if
    
    if len(strAgentPKC) > 50 then
      strAgentPKCExists = "Yes"
    else
      strAgentPKCExists = strAgentPKC
    End if
    
    if len(strAgentPKP) > 50 then
      strAgentPKPExists = "Yes"
    else
      strAgentPKPExists = strAgentPKP
    End if
     
    strMessage = strMessage &  "SEC SERVER RMS" & " (" & strServerFriendly & ") Name: " & ucase(strAddressOfMS) & vbcrlf
    strMessage = strMessage &  "Checking Identity Keys in CertAuthStore:" &vbcrlf
    strMessage = strMessage & strAddressOfMS & "\HKLM\SOFTWARE\" & strWOW6432Node & strCertPath &vbcrlf
    strMessage = strMessage &  "RouterKey = " & strServerRouterKey &vbcrlf
    strMessage = strMessage &  "ManagedAppKey = " & strServerManagedAppKey &vbcrlf
    strMessage = strMessage &  "DelegatedManagerKey = " & strServerDelegatedManagerKey &vbcrlf 
    strMessage = strMessage &  "" &vbcrlf
    strMessage = strMessage &  "CLIENT RMS" & " (" & strClientFriendly & ") Name: " & strAddressOfCli & vbcrlf
    strMessage = strMessage &  "CertificationIdentityKey = " & strClientRouterKey &vbcrlf
    strMessage = strMessage &  "ManagedApplication = " & strClientManagedAppKey &vbcrlf
    strMessage = strMessage &  "CertificationIdentityKey = " & strClientDelegatedManagerKey &vbcrlf
    strMessage = strMessage &  "Router PKC = " & strRouterPKCExists &vbcrlf
    strMessage = strMessage &  "Router PKP = " & strRouterPKPExists &vbcrlf
    strMessage = strMessage &  "Agent PKC  = " & strAgentPKCExists &vbcrlf
    strMessage = strMessage &  "Agent PKP  = " & strAgentPKPExists &vbcrlf
    strMessage = strMessage &  "ParentAddress = " & strParentAddress & vbcrlf
    if strParentAddress = "" then
      strMessage = strMessage &  "Note: ParentAddress should be blank on the server." &vbcrlf
    end if
    strMessage = strMessage &  "" &vbcrlf
    strMessage = strMessage &  "RESULTS" &vbcrlf
    
    
    
    If strServerRouterKey = strClientRouterKey then
      strMessage = strMessage & "PASS : Router identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : Router identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerManagedAppKey = strClientManagedAppKey then
      strMessage = strMessage &  "PASS : ManagedApp identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : ManagedApp Identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerDelegatedManagerKey = strClientDelegatedManagerKey then
      strMessage = strMessage &  "PASS : DelegatedManager identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : DelegatedManager identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerCAC = strClientCAC then
      strMessage = strMessage &  "PASS : Server and Client CAC values match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : Server and Client CAC values don't match or can't be read" &vbcrlf
    End if
    
    If strRouterPKCExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Router PKC value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Router has a PKC" &vbcrlf
    End if
    
    If strRouterPKPExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Router PKP value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Router has a PKP" &vbcrlf
    End if
    
    If strAgentPKCExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Agent PKC value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Agent has a PKC" &vbcrlf
    End if
    
    If strAgentPKPExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Agent PKP value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Agent has a PKP" &vbcrlf
    End if
    
    msgbox strMessage,0,"RMS Checker"
    
    '*************************************************************************
    Function GetStringFromRegistry(intType, strTopLevel, strKey, strName, strMachineName)
      
      on error resume next
      
      dim oReg
      dim arrValues, strValue
      dim i
      dim strOut
      dim intRet
      
      err.clear
      
      Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
          strMachineName & "\root\default:StdRegProv")
      
      if err.number <> 0 then
        strMessage = strMessage &  "Error: Could not connect to the registry on machine: " & strMachineName & "." &vbcrlf
    	strMessage = strMessage &  "Description: " & err.description &vbcrlf
    	strMessage = strMessage &  "Error Number: " & err.number &vbcrlf
    	strMessage = strMessage &  "Error Source: " & err.source &vbcrlf
    	msgbox strMessage , 1, "RMS Checker"
    	wscript.quit(1)
      end if
      
      if intType = 1 then	
        strOut = ""
    	
    	intRet = oReg.GetBinaryValue  (strTopLevel, strKey, strName, arrValues)
    	if intRet <> 0 then
    	  GetStringFromRegistry = "No value or no permissions to read."
    	  Exit Function
    	end if
    	
    	For i = lBound(arrValues) to uBound(arrValues)
    	  strOut = strOut & chr(arrValues(i))
    	Next
    	
    	GetStringFromRegistry = strOut
      end if
      
      if intType = 2 then
        oReg.GetStringValue strTopLevel, strKey, strName, strValue
    	GetStringFromRegistry = strValue
      end if	
      
      Set oReg = nothing
    
      End Function
    '*************************************************************************
    
    
    
    '*************************************************************************
    'FUNCTION TO GET PLATFORM
    'INPUT: NOTHING
    'OUTPUT: RETURN TRUE FOR 64, False for 32
    '*************************************************************************
    Function Is64(strMachineName)
    
        'on error resume next
        err.clear
    	
        dim oReg, strValue, intReturn
    
        Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strMachineName & "\root\default:StdRegProv")
    
        if err.number <> 0 then
           wscript.quit(1)
        end if
    
        intReturn = oReg.GetStringValue (HKEY_LOCAL_MACHINE, strProcessorKey, strProcessorName, strValue)
    
        if intReturn <> 0 then
            wscript.quit(1)
        end if
    
        if (instr(strValue,"86")) then
            Is64 = false
        end if
    
        if (instr(strValue,"64")) then
            Is64 = true
        end if
    
        Set oReg = nothing 
    
    
    End Function
    '*************************************************************************
    
    :8807
Reply
  • HI,

    Hi,

    Are the 64-bit machines pointing at the new management server in terms of RMS?

    if you take one of the 64-bit machines as an example, does the key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sophos\Messaging System\Router\ParentAddress

    point to the new server?

    I wrote a script a while back to try and check some of the RMS settings to save manually doing it.  I've pasted it below, it's a VBScript so you'll need to save it as RMSCheck.vbs for example.

    The idea being that you run it on the client, it asks for the address of the management server and then attempts to read the registry values of the server (certauthstore) using WMI and compare the machines local identify keys against those on the server.  The 3 keys should be the same and it will alert if that's not the case.  It also displays the parent address of the local machine and if the certificate cac is the same on the server and client.  It could do more but I stopped adding to it.  Hopefully it'll work and give you something to go on. As I say it uses WMI to read the remote registry so it all hinges on ability to do that.

    You would need to run it as an account which is a administrator both locally on the client and over the server.  I'd be interested to know if it helps.   I should probably overhaul it at some point as in theory it's quite useful and can be a good first check. 

    Regards,

    Jak

    ' Script to run on the client to ensure that the SEC Server and client registry keys are in sync in terms of the values
    ' cac.pem and mrinit.conf.
    ' Note: Requires the remote registry service on the Sophos Management Server to be running.
    '-------------------------------------------------------------------------------------------------------------------
    Option Explicit
    on error resume next
    
    'Constants
    const HKEY_LOCAL_MACHINE = &H80000002
    
    'Variables
    dim strAddressOfMS, strAddressOfCli
    dim strServerFriendly, strWOW6432Node, strCertPath, strClientFriendly
    dim strServerRouterKey, strServerManagedAppKey, strServerDelegatedManagerKey, strServerCAC
    dim strClientRouterKey, strClientManagedAppKey, strClientDelegatedManagerKey, strClientCAC
    dim strMessage, strParentAddress
    dim strRouterPKC, strRouterPKP
    dim strRouterPKCExists, strRouterPKPExists
    dim strAgentPKC, strAgentPKP
    dim strAgentPKPExists, strAgentPKCExists
    dim objNetwork, strProcessorKey, strProcessorName
    
    strAddressOfMS  = InputBox("Address of SEC Server", "RMS Checker")
    
    set objNetwork = WScript.CreateObject( "WScript.Network" )
    strAddressOfCli = objNetwork.ComputerName
    set objNetwork = nothing
    
    if strAddressOfCli = "" then
      strAddressOfCli = "."
    end if  
    
    strProcessorKey  = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
    strProcessorName = "Identifier"
    strCertPath     = "Sophos\Certification Manager\CertAuthStore"
    strMessage      = "" ' will contain the output string
    strWOW6432Node  = "" ' will contain the string wow6432node if on 64 bit machine
    
    'Server Keys
    
    if Is64 (strAddressOfMS) then 
       strWOW6432Node ="WOW6432Node\"
       strServerFriendly = "64-bit"
    else
      strWOW6432Node =""   
       strServerFriendly = "32-bit"
    end if
    
    strServerRouterKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "RouterKey", strAddressOfMS)
    strServerManagedAppKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "ManagedAppKey", strAddressOfMS)
    strServerDelegatedManagerKey = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "DelegatedManagerKey", strAddressOfMS)
    strServerCAC  = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & strCertPath, "cac", strAddressOfMS)
    
    
       
    'Client Keys
    If Is64(strAddressOfCli) then
       strWOW6432Node ="wow6432node\"
       strClientFriendly = "64-bit"
    else
       strWOW6432Node ="" 
       strClientFriendly = "32-bit"   
    end if
    
    strClientRouterKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System\CertificationIdentityKeys", "CertificationIdentityKey", strAddressOfCli)
    	 
    strClientManagedAppKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Remote Management System\CertificationIdentityKeys", "ManagedApplication", strAddressOfCli)
    	 
    strClientDelegatedManagerKey = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "CertificationIdentityKey", strAddressOfCli)
    	 
    strClientCAC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System", "cac", strAddressOfCli)
    	 
    strParentAddress = GetStringFromRegistry (2, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
         strWOW6432Node & "Sophos\Messaging System\Router", "ParentAddress", strAddressOfCli)
    
    strRouterPKC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Messaging System\Router\Private", "pkc", strAddressOfCli)
    
    strRouterPKP = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Messaging System\Router\Private", "pkp", strAddressOfCli)   
    
    strAgentPKC = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "pkc", strAddressOfCli)
    
    strAgentPKP = GetStringFromRegistry (1, HKEY_LOCAL_MACHINE, "SOFTWARE\" &_
       strWOW6432Node & "Sophos\Remote Management System\ManagementAgent\Private", "pkp", strAddressOfCli) 
       
    if len(strRouterPKC) > 50 then
      strRouterPKCExists = "Yes"
    else
      strRouterPKCExists = strRouterPKC
    End if
    
    if len(strRouterPKP) > 50 then
      strRouterPKPExists = "Yes"
    else
      strRouterPKPExists = strRouterPKP
    End if
    
    if len(strAgentPKC) > 50 then
      strAgentPKCExists = "Yes"
    else
      strAgentPKCExists = strAgentPKC
    End if
    
    if len(strAgentPKP) > 50 then
      strAgentPKPExists = "Yes"
    else
      strAgentPKPExists = strAgentPKP
    End if
     
    strMessage = strMessage &  "SEC SERVER RMS" & " (" & strServerFriendly & ") Name: " & ucase(strAddressOfMS) & vbcrlf
    strMessage = strMessage &  "Checking Identity Keys in CertAuthStore:" &vbcrlf
    strMessage = strMessage & strAddressOfMS & "\HKLM\SOFTWARE\" & strWOW6432Node & strCertPath &vbcrlf
    strMessage = strMessage &  "RouterKey = " & strServerRouterKey &vbcrlf
    strMessage = strMessage &  "ManagedAppKey = " & strServerManagedAppKey &vbcrlf
    strMessage = strMessage &  "DelegatedManagerKey = " & strServerDelegatedManagerKey &vbcrlf 
    strMessage = strMessage &  "" &vbcrlf
    strMessage = strMessage &  "CLIENT RMS" & " (" & strClientFriendly & ") Name: " & strAddressOfCli & vbcrlf
    strMessage = strMessage &  "CertificationIdentityKey = " & strClientRouterKey &vbcrlf
    strMessage = strMessage &  "ManagedApplication = " & strClientManagedAppKey &vbcrlf
    strMessage = strMessage &  "CertificationIdentityKey = " & strClientDelegatedManagerKey &vbcrlf
    strMessage = strMessage &  "Router PKC = " & strRouterPKCExists &vbcrlf
    strMessage = strMessage &  "Router PKP = " & strRouterPKPExists &vbcrlf
    strMessage = strMessage &  "Agent PKC  = " & strAgentPKCExists &vbcrlf
    strMessage = strMessage &  "Agent PKP  = " & strAgentPKPExists &vbcrlf
    strMessage = strMessage &  "ParentAddress = " & strParentAddress & vbcrlf
    if strParentAddress = "" then
      strMessage = strMessage &  "Note: ParentAddress should be blank on the server." &vbcrlf
    end if
    strMessage = strMessage &  "" &vbcrlf
    strMessage = strMessage &  "RESULTS" &vbcrlf
    
    
    
    If strServerRouterKey = strClientRouterKey then
      strMessage = strMessage & "PASS : Router identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : Router identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerManagedAppKey = strClientManagedAppKey then
      strMessage = strMessage &  "PASS : ManagedApp identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : ManagedApp Identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerDelegatedManagerKey = strClientDelegatedManagerKey then
      strMessage = strMessage &  "PASS : DelegatedManager identity keys match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : DelegatedManager identity keys don't match or can't be read" &vbcrlf
    End if
    
    If strServerCAC = strClientCAC then
      strMessage = strMessage &  "PASS : Server and Client CAC values match" &vbcrlf
    else
      strMessage = strMessage &  "FAIL : Server and Client CAC values don't match or can't be read" &vbcrlf
    End if
    
    If strRouterPKCExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Router PKC value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Router has a PKC" &vbcrlf
    End if
    
    If strRouterPKPExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Router PKP value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Router has a PKP" &vbcrlf
    End if
    
    If strAgentPKCExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Agent PKC value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Agent has a PKC" &vbcrlf
    End if
    
    If strAgentPKPExists <> "Yes" then
      strMessage = strMessage &  "FAIL : No Agent PKP value" &vbcrlf
    else
      strMessage = strMessage &  "PASS : Agent has a PKP" &vbcrlf
    End if
    
    msgbox strMessage,0,"RMS Checker"
    
    '*************************************************************************
    Function GetStringFromRegistry(intType, strTopLevel, strKey, strName, strMachineName)
      
      on error resume next
      
      dim oReg
      dim arrValues, strValue
      dim i
      dim strOut
      dim intRet
      
      err.clear
      
      Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
          strMachineName & "\root\default:StdRegProv")
      
      if err.number <> 0 then
        strMessage = strMessage &  "Error: Could not connect to the registry on machine: " & strMachineName & "." &vbcrlf
    	strMessage = strMessage &  "Description: " & err.description &vbcrlf
    	strMessage = strMessage &  "Error Number: " & err.number &vbcrlf
    	strMessage = strMessage &  "Error Source: " & err.source &vbcrlf
    	msgbox strMessage , 1, "RMS Checker"
    	wscript.quit(1)
      end if
      
      if intType = 1 then	
        strOut = ""
    	
    	intRet = oReg.GetBinaryValue  (strTopLevel, strKey, strName, arrValues)
    	if intRet <> 0 then
    	  GetStringFromRegistry = "No value or no permissions to read."
    	  Exit Function
    	end if
    	
    	For i = lBound(arrValues) to uBound(arrValues)
    	  strOut = strOut & chr(arrValues(i))
    	Next
    	
    	GetStringFromRegistry = strOut
      end if
      
      if intType = 2 then
        oReg.GetStringValue strTopLevel, strKey, strName, strValue
    	GetStringFromRegistry = strValue
      end if	
      
      Set oReg = nothing
    
      End Function
    '*************************************************************************
    
    
    
    '*************************************************************************
    'FUNCTION TO GET PLATFORM
    'INPUT: NOTHING
    'OUTPUT: RETURN TRUE FOR 64, False for 32
    '*************************************************************************
    Function Is64(strMachineName)
    
        'on error resume next
        err.clear
    	
        dim oReg, strValue, intReturn
    
        Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strMachineName & "\root\default:StdRegProv")
    
        if err.number <> 0 then
           wscript.quit(1)
        end if
    
        intReturn = oReg.GetStringValue (HKEY_LOCAL_MACHINE, strProcessorKey, strProcessorName, strValue)
    
        if intReturn <> 0 then
            wscript.quit(1)
        end if
    
        if (instr(strValue,"86")) then
            Is64 = false
        end if
    
        if (instr(strValue,"64")) then
            Is64 = true
        end if
    
        Set oReg = nothing 
    
    
    End Function
    '*************************************************************************
    
    :8807
Children
No Data