Here you go.. This should be about a simple as they come.. This is assuming that you have Outlook 2000 on the system..

code:
 $prf='Outlook.prf'
$serverloc=@lserver+'\Netlogon\Profgen\Outlook2000' ; Outlook Executables/files location
$exch='EXCHANGESERVER'

;Registry locations
$ushelfolders='HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
$userwinkey='HKCU\Software\Microsoft\Windows'
$profilelocation=$userwinkey+' NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
$scriptdir=SUBSTR(READVALUE($ushelfolders,'Desktop'),1,LEN(READVALUE($ushelfolders,'Desktop'))-8)
$prffile=$scriptdir+'\'+$prf
$ppru=$profilelocation+'\'+@userid
$mses=$profilelocation+'\MS Exchange Settings'

IF KeyExist($ppru) OR KeyExist($mses)
RETURN
ELSE
COPY $serverloc+'\'+$prf $profiledir

IF @userid<>ReadProfileString($prffile,'General','ProfileName')
$rc=WriteProfileString($prffile,'General','ProfileName',@userid)
ENDIF
IF 'Yes'<>ReadProfileString($prffile,'General','DefaultProfile')
$rc=WriteProfileString($prffile,'General','DefaultProfile','Yes')
ENDIF
IF $exch<>ReadProfileString($prffile,'Service2','HomeServer')
$rc=WriteProfileString($prffile,'Service2','HomeServer',$exch)
ENDIF
IF @userid<>ReadProfileString($prffile,'Service2','MailboxName')
$rc=WriteProfileString($prffile,'Service2','MailboxName',@userid)
ENDIF

IF 0=Exist($scriptdir+'\Profgen.exe')
COPY $serverloc+'\Profgen.exe' $scriptdir
ENDIF
IF 0=Exist($scriptdir+'\NEWPROF.EXE')
COPY $serverloc+'\NEWPROF.EXE' $scriptdir
ENDIF
SHELL '%COMSPEC% /C '+$scriptdir+'\Profgen.exe '+$scriptdir+'\Newprof.exe -p '+$prffile+' -X -R -L > nul'
ENDIF
RETURN

HTH,

Kent

[ 21. September 2003, 19:39: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's