I have the user name and the group name. I need to figure out if the user is in the group... is there a way to do this?
Printable View
I have the user name and the group name. I need to figure out if the user is in the group... is there a way to do this?
I would use WMI to check that out. There's a WMI class that enumerates everthing in the registered program groups part of the registry.
You just need to use an If statement to check if it fits your search criteria.
http://www.netfokus.dk/vbadmincode/
There are some good example to solve this problem
what's wmi?
WMI stands for Windows Management Instrumentation.
It's a new microsoft scripting technology that's very powerful and fairly easy to use.
Check it out at http://msdn.microsoft.com/downloads/...mi/default.asp
There's a link for downloading the WMI SDK as well as to WMI resources.
The package contains dozens of classes that allow you to programmatically get just about all possible system info.
Like : BIOS info, Disk, Registry, Network (IP, subnet mask...), processor, sys resources of every kind plus video adapt. info. you name it you got it!
No more complicated searching for API calls to try and get some basic info. WMI does all this and more. It's still new tech. though so do thorough testing before deploying. ;)
WMI stands for Windows Management Instrumentation.
It's a new microsoft scripting technology that's very powerful and fairly easy to use.
Check it out at http://msdn.microsoft.com/downloads/...mi/default.asp
There's a link for downloading the WMI SDK as well as to WMI resources.
The package contains dozens of classes that allow you to programmatically get just about all possible system info.
Like : BIOS info, Disk, Registry, Network (IP, subnet mask...), processor, sys resources of every kind plus video adapt. info. you name it you got it!
No more complicated searching for API calls to try and get some basic info. WMI does all this and more. It's still new tech. though so do thorough testing before deploying.
;)
Check out someof my other posts for examples.
ok, but how come you posted it twice>?
I didn't! But I must be doing somethin' wrong cause that's
the second time that has happened. I did several "preview
reply" commands before doing a submit.
Maybe there's a bug there somewhere.:eek:
there must be something wrong with the thingo