By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

Win32_UserAccount problem

P: n/a
I am using the following code to get the list of all groups that the
user "blaz" on the domain "BCOMAPQ" belongs to:

Dim myDomain As String = "BCOMPAQ"
Dim theUser As String = "blaz"
Dim Query As String = _
"associators of {Win32_UserAccount.domain='" & _
myDomain & "',name='" & theUser & _
"'} where ResultClass=Win32_Group"
Dim Groups = New ManagementObjectSearcher(Query)
Dim Group As ManagementObject
For Each Group In Groups.Get

It works fine, but for some unknown reason the computer tries to read
from a floppy disk when I run it (don't know what the user groups and
accessing a floppy drive have in common, but anyway). Why does it do
that and how can I avoid it?

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.