Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
#DefineFunction JoinWG(workgroup) dll=StrCat(DirWindows(1),"netapi32.dll") ret2=1 ret=DllCall(dll, long:"NetUnjoinDomain", lpnull, lpnull,lpnull,long:0) If ret==0 Then q=(StrLen(workgroup)*2) +2 bb=BinaryAlloc(q) BinaryPokeStr(bb,0,workgroup) BinaryConvert(bb,0,3,0,0) ret2=DllCall(dll, long:"NetJoinDomain", lpnull,lpbinary:bb,lpnull,lpnull,lpnull,long:0) ; BinaryFree(bb) EndIf If ret2==0 Then Return(1) Else Return(0) EndIf #EndFunction If JoinWG("Workgroup")==@TRUE Then Message ("Results","Join Workgroup suceeded") Else Message ("Results","Join Workgroup Failed") EndIf
Article ID: W17254
File Created: 2007:07:03:14:29:02
Last Updated: 2007:07:03:14:29:02