#109246 - 2003-11-2906:11 PMNew functionality in Win32Admin3
Howard BullockHoward Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
This post is the result of a request from Jose:
I have updated the Win32Admin.Zip with a new DLL and updated test scripts. A new script "LookupPrimaryGrp.kix" shows two ways how one can determine the primary group name of a user.
The first uses GetUserGroupFromRID to do a direct resolution of the RID to the name of the object identified by the RID. The RID was obtained using primary_group_id value retrieved via UserGetInfo.
The second, although it is longer, show additional methods and object that would be very useful in other applications. It uses, EnumTrustedDomains, VBS Dictionary Object (CreateObject("Scripting.Dictionary")), UserGetInfo, and LsaLookupSids.
I would be happy to answer any question about the methods of the DLL or the accompanying script.
#109247 - 2003-12-0108:22 PMRe: New functionality in Win32Admin3
JoseJose
Seasoned Scripter
Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Dear Howard: Actually I am working-playing with the win32dll3.kix you sent me on friday. I cannot find the above reference of the LookupPrimaryGrp.kix in your page wich I would like to work with. BTW...As I have decided to make full usage of your dll there is actully one thing I still do with WinNt object wich is GetUserList($DomainName). Do you think it could be possible to add this feature to your dll too? I am on an export script on Winnt server, I think you already told me that Win32Admin was compatible with 2000 server, Am i right? Thanks again Howard.
I will look into adding what you need. Could you explain in a little more detail how you would like the method to work and what you would like to be returned?
#109249 - 2003-12-0205:59 PMRe: New functionality in Win32Admin3
JoseJose
Seasoned Scripter
Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Howard: What I have made here is a script that dumps all the users properties to an excel sheet. What I tried to say above was that the only left appart from Win32Admin is how I get the users array (for UserGetInfo) to get the properties. Code:
This has been very helpfull cause appart from backing up the database I saw lots of silly errors that I had. Thanks Howard.
#109250 - 2003-12-0206:56 PMRe: New functionality in Win32Admin3
Howard BullockHoward Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Jose, you should be able to remove your "for each" loop and build a faster script by assigning the values directly to the spreadsheet cells. "primary_group_id" also seems to be used two times.