Is there a method in the framework for adding an OS user (Win 2008 R2 64). I have a method in my source called AddOSuser() that does this:
lcAdminUser = [someusername]
lcAdminPass = [someuserpass]
lcsystem= Alltrim ( Substr ( Sys ( 0 ) ,1,At ( [#],Sys ( 0 ) ) -1 ) )
lcSystemName= [WinNT://] + lcsystem
oDomain = Getobject ( lcSystemName )
If Upper ( oDomain.Parent ) == [WINNT:]
*-WRONG SYSTEM NAME
Return .F.
Endif
oUser = oDomain.Create ( "user", lcAdminUser )
oUser.SetPassword ( lcAdminPass )
oUser.FullName = lcAdminUser
oUser.Description = "Store Admin for:" + lcStoreName
This worked famously only Win 2003 but no longer works for 2008.
If anyone has any code to contribute or can give me the WWWC method that would brilliant!
Thanks