eriqjaffe
this is what I have it just hangs? not sure why?
can you see what I am doing wrong. It looks right
but when I execute it with the command cmd like this

kix32.exe fspreplace.kix

it juts hangs nothing happens??

 Code:
Break On

Dim $PCList
Dim $array
Dim $loc
$PCList = "isasst", "isasst", "isasst"

$array = ReadFile("fsp.ini")
$loc = AScan($array, "pcAlias=",,,1)

if $loc <> =1
  for each $Element in $PCList
     $array[$loc] = "pcAlias="+$Element
     $ = WriteFile("\\"+$Element+"\c$\windows\fsp.ini")
     ? $Element
  next
endif



;************************************
;    ReadFile() UDF
;************************************

;Function	ReadFile()  
;  
;Author		Radimus  
;  
;Contributors	Lonky... This is basically his code that I trimmed down to its  
;		simplest function  
;  
;Action		Reads a file into an array  
;  
;Syntax		$array=ReadFile($file)  
;  
;Version	1.0.1  
;  
;Date           10/21/2003  
;  
;Date Revised   10-22-2003 - dimmed vars 
;  
;Parameters 	file   
;		source filename  
;  
;Remarks	Pair this with WriteFile() to read and write an entire file easily  
;  
;Returns	@error if failed  
;   
;Dependencies 	None  
;  
;KiXtart Ver	4.02  
;   
;Example(s)	$array=ReadFile('c:\file.txt')  

Function ReadFile($file)
	Dim $lf, $f, $_, $t
	$lf=chr(10)
	$f=freefilehandle
	$_=open($f,$file)
		if @error   exit @error   endif
		do $t=$t+$lf+readline($f) until @error
		$_=close($f)
	$ReadFile=split(substr($t,2),$lf)
	EndFunction

;************************************
;  WriteFile() UDF
;************************************

;Function	WriteFile()  
;  
;Author		Radimus  
;  
;Contributors	Lonky  
;  
;Action		Writes an array as a file  
;  
;Syntax		WriteFile('filename','array')  
;  
;Version	1.1  
;  
;Date           10/21/2003  
;  
;Date Revised   11/13/2003  
;  
;Parameters 	file   
;		destination filename  
;		array   
;		an array of data to write to a file  
;  
;Remarks	Pair this with ReadFile() to read and write an entire file easily  
;  
;Returns	@error if failed  
;   
;Dependencies 	None  
;  
;KiXtart Ver	4.02  
;   
;Example(s)	$=WriteFile('c:\file.txt',$array)  

Function WriteFile($file,$array)
	Dim $, $f, $line
	If Not VarType($Array) & 8192    Exit(1)        EndIf
	$f=freefilehandle
	$=open($f,$file,5)
		if @error   exit @error   endif
		for each $line in $array
			$=writeline($f,$line+@crlf)
			if @error   exit @error   endif
			next
		$=close($f)
	EndFunction
_________________________
Robert
A+, CCNA, MCP
Network Admin
Credit Union Wisconsin