Hi guys,

I am just getting back to testing this and I think I need a hand with the syntax...I'm a newbie to KIX...

I've tried putting the UDF in a seperate file and also incorporating it in the KIX script - I haven't had luck with either. I would prefer to have it in a seperate *.udf file...

1. So if I had this code in computeringroup.udf:

Function ComputerInGroup($group,optional $Domain)
Dim $oGrp
if not $domain $domain=@domain endif
$oGrp = GetObject("WinNT://" + $domain + "/" + $group + ",group" )
if @error exit 1 endif

if $oGrp.IsMember("WinNT://" + $domain + "/" + @wksta + "$$" )
$ComputerInGroup=1
else
$ComputerInGroup=0
endif
endfunction

2. I called upon the .udf with this code in my KIX script:

call @scriptdir+'\computeringroup.udf'

if ComputerInGroup("$groups","Bruns Pod 1;") AND INSTR("$ipadd","10.1.1.")
if ADDPRINTERCONNECTION ($ptrpod1) = 0 ? "Added printer connection...." endif
endif

3. I have put the computer account in the group called "Bruns Pod 1".

I know I'm missing syntax...could you help me out?

Thanks a million!
Mike