I have this subroutine in my script and it is returning -1 as the value of strIPV6Status when the value is actually 0xfffffff in hexadecimal.
Any ideas why this is happening?
'**************************************************************************
'IP Address Configuration: Check if ipv6 is disabled
'**************************************************************************
Sub CheckIPV6()
WScript.Echo("Check if IPv6 is disabled")
WScript.Echo("------------------------------------")
Const strIPV6Key = "SYSTEM\CurrentControlSet\services\TCPIP6\Parameters\"
strValueName = "DisabledComponents"
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.GetDWORDValue HKEY_LOCAL_MACHINE, strIPV6Key,strValueName,strIPV6Status
WScript.Echo(strIPV6Key & strValueName & " = " & strIPV6Status & vbCrLf)
End Sub