I will try this again.
I am trying to map drive for groups in a domain via an INI file. I have been using Diederik de Groot login.ix and am modifying as required.

I am trying to get the variable $group to change by using EnumGroup function with no success. It sees the groups but will no connect drives.

Any help would be appreciated.

code:
Function ConnectGroupDrives()
;******************************
; GroupShares
;******************************

;Initialise $group so it is not empty

$group=0

If Exist($FileLocation + "\shares.ini")
If $group=0
For $x = 1 to 10
$group = EnumGroup($Index)
$Index=$Index+1
$DriveDefinition = ReadProfileString($FileLocation + "\shares.ini", $group, "drive" + $x)
If @ERROR = 0
If $DriveDefinition<>""
ConnectShare($DriveDefinition)
EndIf
Else
Return
EndIf

Next
EndIf
EndIf
EndFunction

SAMPLE Share.ini file
[MAPAll]
Drive1="F:, \\Server1\PUBLIC, MAPAll"

[CompServAdmin]
Drive1="J:, \\Server1\CCshare,CCshare"
Drive2="K:, \\Server1\e$,E"
Drive3="L:, \\Server1\c$,C"

TIA [Smile]

[ 30. July 2003, 05:23: Message edited by: dataman_42 ]
_________________________
dataman