求大神,IF语句在一些环境无法判断..
我在我自己的环境上(XP和WIN7)测试都是正常..但在客户机的XP和WIN7都无法正常判断的后面不得不修改判断方式来解决...
下面是有环境不能正常的
Local $F = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\F_CONFIG","IsAdmin")
Local $K = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\K_CONFIG","IsAdmin")
Local $Q = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\Q_CONFIG","IsAdmin")
If $F <> "" Then
MsgBox(64,"F","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
ElseIf$K <> "" Or $Q <> "" Then
MsgBox(64,"K OR Q","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
Else
MsgBox(64,"test","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
EndIf
变量Q K F只会同时存在一个. 如果存在是返回 0 或者 1,
下面是能正常判断的...
Local $F = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\F_CONFIG","IsAdmin")
Local $K = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\K_CONFIG","IsAdmin")
Local $Q = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\Q_CONFIG","IsAdmin")
If StringIsXDigit($F) Then
MsgBox(64,"F","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
ElseIfStringIsXDigit($K) Or StringIsXDigit($Q) Then
MsgBox(64,"K OR Q","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
Else
MsgBox(64,"test","F:"&$F&@CRLF&"K:"&$K&@CRLF&"Q:"&$Q)
EndIf
求大神指点...我已经晕了..... 你确定别人机器上注册表有这几个项目? 回复 2# veket_linux
肯定有的.后面那种就能正常..挺郁闷的. msgbox 测试测试,说不定有发现哦
页:
[1]