Originally Posted By: Howard Bullock
Logically your FOR loop is the problem

 Code:
	For Each $sShare in Split(ReadProfileString($sShareIni,"LOCATION "+$sGroup,""),Chr(10)) 


It seems to be looping two times when you expect on one iteration.

Can you post more of your INI file for testing?





Yes, no problem, here is more of the ini-file:

[LOCATION AeD_map]
ad=W:| "\\hildesheim\dfs01\AerztlicherDienst"
ad=U:| "\\hildesheim\dfs01\AerztlicherDienst\SD\Psychiatrie"


[LOCATION BA_map]
ba=H:| "\\hildesheim\dfs01\Daten\Betriebsarzt"


[LOCATION Bank_map]
bank=I:| "\\hildesheim\dfs01\Bank"

[LOCATION BH_map]
kidicap=I:| "\\hildesheim\dfs01\KIDICAP"
pdl-rw=P:| "\\hildesheim\dfs01\PDL-RW"


[LOCATION Brunie_map]
brunie=V:| "\\hildesheim\dfs01\brunie"

[LOCATION Brunieformular_map]
brunieformular=Y:| "\\hildesheim\dfs01\Brunieformulare"


[LOCATION Datenschutz_map]
datenschutz=Q:| "\\hildesheim\dfs01\Datenschutz"


[LOCATION DPALLTEST_map]
dp-alltest=W:| "\\hildesheim\dfs01\DP-ALLTEST"


[LOCATION Druckerei_map]
druckerei=K:| "\\hildesheim\dfs01\Druckerei"
ergo_mrv=H:| "\\hildesheim\dfs01\ERGO_MRV"