By far the easiest method you can do this with would be WRITEPROFILESTRING into an INI file format.

If that is not an option, then -
code:
 IF EXIST('H:\TROUBLE.TXT')
DEL 'H:\TROUBLE.TXT' ; Delete the diagnostic each time
ENDIF
IF Open(3,'H:\TROUBLE.TXT',5)=0
$x=WriteLine(3,' Last Logon Date: '+@date+@CRLF)
$x=WriteLine(3,' Last Logon Time: '+@time+@CRLF)
$x=WriteLine(3,' Kixtart Version: '+@kix+@CRLF)
$x=WriteLine(3,' Logon Server: '+@lserver+@CRLF)
$x=WriteLine(3,'User/ Machine data below this line.'+@CRLF)
$x=WriteLine(3,' Full Name: '+@fullname+@CRLF)
$x=WriteLine(3,' User ID: '+@userid+@CRLF)
$x=WriteLine(3,' OS Type: '+$client+@CRLF)
$x=WriteLine(3,' Workstation Name: '+@wksta+@CRLF)
$x=WriteLine(3,' Ip Address: '+$ipadr+@CRLF)
$x=WriteLine(3,' MAC Address: '+@address+@CRLF)
$x=WriteLine(3,' Machine Priveleges: '+@priv+@CRLF)
$x=WriteLine(3,'Virus information below this line.'+@CRLF)
$x=WriteLine(3,' Virus DAT Version: '+$datnum+@CRLF)
$x=WriteLine(3,' Virus Engine Version: '+$engine+@CRLF)
$x=WriteLine(3,' Virus Product Version: '+$product+@CRLF)
$x=WriteLine(3,'Browser Settings Below this line.'+@CRLF)
$x=WriteLine(3,' Hidden PC=1.'+@CRLF)
$x=WriteLine(3,' Browsable PC=0.'+@CRLF)
$x=WriteLine(3,' Browser Setting: '+$hidden+@CRLF)
$x=WriteLine(3,'ePO Anti-Virus Agent Info'+@CRLF)
$x=WriteLine(3,' ePO Agent Installed: '+$epo+@CRLF)
$x=WriteLine(3,' Microsoft Outlook Version: '+$outlookver+@CRLF)
ENDIF
$x=Close(3)

HTH,

Kent

[ 04. November 2003, 14:07: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's