1

These 2 statements, where the only difference is the order in the conditional, give different results.

What is the reason for this behavior? Is my usage of OR incorrect?

wmic /Node:%computername% path Win32_GroupUser WHERE (GroupComponent = "Win32_Group.Domain=\"%COMPUTERNAME%\",Name=\"Remotedesktopbenutzer\"" OR GroupComponent = "Win32_Group.Domain=\"%COMPUTERNAME%\",Name=\"Administratoren\"")

wmic /Node:%computername% path Win32_GroupUser WHERE (GroupComponent = "Win32_Group.Domain=\"%COMPUTERNAME%\",Name=\"Administratoren\"" OR GroupComponent = "Win32_Group.Domain=\"%COMPUTERNAME%\",Name=\"Remotedesktopbenutzer\"")
jordanm
  • 869
  • 5
  • 9
marcel
  • 11
  • 1

0 Answers0