Hi,

Please can someone help me use the WriteProfileString function? I am trying to create a list of desktop machines on my domain and I'm having difficulties getting WriteProfileString to insert more than one entry in the file that should contain the list of machine names.

I have written the following code and it just overwrites the same entry each time the code is run:-

code:
 	
$Target=@Wksta
$IniFile="\\Alpha\Allshare\CLIST.INI"

If Exist($IniFile) = 1
$result=WriteProfileString($IniFile,'Workstations',"Name",'$Target')
EndIf

BTW hope I've written this msg correctly, I'm new to this forum ;-)

Kind Regards, Greg