Then you will have to enumerate the groups for the user. The code would now look like this:
code:
$groupcount=0
do
redim preserve $groups[$groupcount]
$group=ENUMGROUP($groupcount)
$groups[$groupcount]=$group
$groupcount=$groupcount+1
until len($group)=0
if $groupcount
$groupcount=$groupcount-1
endif
$selection=-1
do
cls
for $group=0 to ubound($groups)
? ''+$group+') '+$groups[$group]
next
gets $selection
$selection=val($selection)
until $selection>=0 and $selection<=ubound($groups)
$class=$groups[$selection]
$classmapping=readprofilestring(@scriptdir+'\classes.ini','Classes',$class)
if $classmapping
net use H: $classmapping
if @error
? 'Error mapping drive H: to '+$classmapping
? 'Error code: '+@ERROR+' - '+@SERROR
endif
else
? 'Class '+$class+'does not have a drive mapping'
endif
$homeshare='\\server\'+@USERID+'$$'
net use I: $homeshare
if @error
? 'Error mapping drive I: to '+$homeshare
? 'Error code: '+@ERROR+' - '+@SERROR
endif
The group enumeration is straight out of the KiXtart manual and i haven't tested the code but it should give you a start.
_________________________
There are two types of vessels, submarines and targets.