viewpoint-particle

Author Topic: wntMemberGrps - Windows 8  (Read 2312 times)

scotts

  • Newbie
  • *
  • Posts: 23
wntMemberGrps - Windows 8
« on: February 19, 2015, 07:34:51 am »
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)

scotts

  • Newbie
  • *
  • Posts: 23
Re: wntMemberGrps - Windows 8
« Reply #1 on: February 19, 2015, 08:07:44 am »
Update:

Tried it with wwwnt34i.dll version 39023 - same result

scotts

  • Newbie
  • *
  • Posts: 23
Re: wntMemberGrps - Windows 8
« Reply #2 on: February 19, 2015, 10:01:02 am »
Figured it out. I had to change commands as below:

CurUser = wntGetUser(@DEFAULT) ; changed to accomidate windows 8

IsAdmin = wntMemberGet("","Administrators",CurUser,@LOCALGROUP,0)