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\"")

0

You must log in to answer this question.

Browse other questions tagged .