我的脚本中有这个子例程,它返回-1作为strIPV6Status的值,而这个值实际上是十六进制的0xfffffff。
你知道为什么会发生这种情况吗?
'**************************************************************************
'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发布于 2012-09-18 23:49:09
不确定问题is...believe 0xffffffff是-1的十六进制表示(有符号32位整数)
https://stackoverflow.com/questions/12480435
复制相似问题