I have a batch script that checks the group membership list for a group with the name *LOC*, then reads the comment field on this group from AD, then splits the comment field based on ";", then maps a network drive based on the second part of the comment field. If the mapping fails, then a "default" network drive is mapped.

Anyone want to give me some hints about how to convert it to kix ?

Batch Code
-------------------------------------
if exist w:\ net use /d W: >>%log% 2>&1

:FIND_W_GROUP
for /f "tokens=2 delims=\." %%A in ('%SystemDrive%\Temp\ifmember /list^|find /i "LOC"') do call :MAP_W %%A
goto check

:MAP_W
if /i "%1"=="" goto end
for /f "tokens=2 delims=;" %%A in ('%SystemDrive%\Temp\ntuser -s %LOGONSERVER% group show %1^|find/i "comment"') do net use W: %%A >>%log% 2>&1
goto end

:check
if not exist w:\ call :fail
goto end

:fail
echo ..We will map W:\ to the default tempdrive in Location.
echo %computername%;%gwadr%;%username%;%loc%;>>%loclog%\_Mapped_default.txt
net use W: \\Server\Share >>%log% 2>&1

:end