Call 'K:\KixLib\EnumIni.kxf'
Global $SpecialSharesIniFile
$SpecialSharesIniFile = '.\special.ini'
ConnectSpecialShares(); Call the function being tested & show the error result message
@SERROR ?
; Updated ConnectSpecialShares function:
Function ConnectSpecialShares()
Progress("Connecting Special Shares")
DbgMessage("Info", "Connecting Special Shares")
DbgMessage("Info", " SpecialSharesinifile = " + $SpecialSharesIniFile)
; Exit now if the file doesn't exist
If Not Exist($SpecialSharesIniFile) Exit 2 EndIf
; Get a list of sections from the ini file using the EnumINI UDF
$aSections = EnumINI($SpecialSharesIniFile)
; enumerate the sections (which are AD group names)
For Each $Group in $aSections
; check group membership
If InGroup($Group)
; get the list of drive map definitions
$aMappings = EnumINI($SpecialSharesIniFile, $Group)
; Enumerate the mappings and make the connection using the ConnectShare UDF
For Each $Share in $aMappings
$DriveDefinition = ReadProfileString($SpecialSharesIniFile, $Group, $Share)
ConnectShare($DriveDefinition)
Next
EndIf
Next
Exit 0
EndFunction
; Dummy support functions follow
Function ConnectShare($Def)
$aDat = Split($Def, ',')
'Mapping ' $aDat[0] ' to ' $aDat[1] ?
Exit 0
EndFunction
Function Progress($Msg)
'Progress: ' $Msg ?
EndFunction
Function DbgMessage($Lvl, $Msg)
'Debug: ' $Lvl ' - ' $Msg ?
EndFunction