Hi,
I get Will Extender Error: 564 when using wntMemberGrps in Windows 8. It works fine in Windows 7.
Winbatch 2015A
wwnt34i.dll version 39022
Code:
AddExtender("WWWNT34i.DLL")
;DialogcontrolSet(Handle, 4, 5, ResList)
;DialogControlSet(Handle, 4, 13, "255|0|0")
GoodOS = 0
; user
CurUser = wntUserInfo(0)
DetList = StrCat("USER: ", CurUser)
ResList = ""
;DialogControlSet(Handle, 3, 5, DetList)
message("List", ItemExtract(1, DetList, @TAB))
; pc
PCInfo = WinSysInfo()
CurPC = ItemExtract(1, PCInfo, @TAB)
DetList = StrCat(DetList, @TAB, "PC NAME: ", CurPC)
;DialogControlSet(Handle, 3, 5, DetList)
message("List", ItemExtract(2, DetList, @TAB))
; domain
CurDomain = wntuserInfo(1)
DetList = StrCat(DetList, @TAB, "DOMAIN: ", CurDomain)
;DialogControlSet(Handle, 3, 5, DetList)
message("List", ItemExtract(3, DetList, @TAB))
; security groups
CurGroups = wntMemberGrps("", StrCat(CurDomain, "\", CurUser), @LocalGroup, 1)
CurGroups = StrReplace(CurGroups, @TAB, ",") ; changed ", " to "," to remove leading space
GroupNum = ItemCount(CurGroups, ",")
Message("Group List", CurGroups)
Update:
Tried it with wwwnt34i.dll version 39023 - same result
Figured it out. I had to change commands as below:
CurUser = wntGetUser(@DEFAULT) ; changed to accomidate windows 8
IsAdmin = wntMemberGet("","Administrators",CurUser,@LOCALGROUP,0)