I have used profgen.exe extensively for the past 4 years. Now that I am moving my users to Outlook2003 I find that I need another solution since the old tools are no longer supported. Kent Dyer has created a fantastic kix script that autogenerates profiles that for Outlook2000 and 2003. Here is the code that I am using (Kent wrote).
NOTE: the areas in RED are those that you will want to customize. Otherwise, everything can be left as-is, and placed in a seperate (or your current) KiX script. If it is a seperate script, just "call" it from your main scripts with
Code:
CALL @ldrive+'\outlook.kix' ; This script creates Outlook2000/2003 profiles.
Code:
OUTLOOK
; -- OUTLOOK - ALL >> MAIN CONFIGURATION FOR MICROSOFT OUTLOOK TO EXCHANGE SERVERS
;Function OUTLOOK()
;
;Author Kent Dyer (leptonator@hotmail.com
;
;Contributors Lonkero
; Matt "EvilHearted"
; Rad
; Anthony Harper
;
;Action Configure Outlook
;
;Syntax OUTLOOK
;
;Version 1.17
;
;Date 1-April-2001
;
;Date Revised 11-April-2005
;
;Parameters none
;
;Remarks This function is used to configure Outlook with Exchange Server,
; Change 'EXCHANGESERVER' to your server name
;
;Returns Nothing
;
;Dependencies Outlook.prf, MODPROF.EXE (for Outlook 9x/20000, profupdt.exe to integrate
;http://www.microsoft.com/office/ork/2000/download/Outlook.prf
;http://download.microsoft.com/download/f/6/e/f6e04362-83d7-4107-be59-91e0658fa198/outlook.prf
;http://www.microsoft.com/office/orkarchive/2000ddl.htm
;http://download.microsoft.com/download/b/c/3/bc3c8c90-550c-4d22-96d3-616298490c0c/modifyprofile.exe (contains MODPROF.EXE)
;
;KiXtart Ver 4.02
;
;Example(s) OUTLOOK
FUNCTION OUTLOOK()
DIM $prfrem,$waste,$explorview,$editorpref,$prf,$serverloc,
$exchgsvr,$prfloc,$prffile,$ppru,$exe,$ver,$idx,$keyname,$rc,
$outlook,$ns,$unread,$fldr,$x,$regexp,$MSOdir
$waste='FALSE' ; Empty Outlooks Deleted Items Folder on Exit
$explorview='Yes' ; Outlook Explorer View 'Yes' or Standard View 'No'
$editorpref=30001 ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf='Outlook.prf'
$prffile='%temp%\'+$prf
$serverloc=@LSERVER+'\Netlogon\Profgen' ; Outlook Executables files location
$exchgsvr='MAILSVR' ; Main Exchange Server Location
IF @INWIN ;Windows NT/2k/XP/2003
$prfloc='HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
ELSE
;Windows 9x
$prfloc='HKCU\Software\Microsoft\Windows Messaging Subsystem\Profiles'
ENDIF
; -- Current User Profile
$ppru=$prfloc+'\'+@USERID
; -- Determine version of Outlook
$exe=ReadValue('HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE','')
$ver=SPLIT(GetFileVersion($exe),'.')[0]+'.0'
$MSOdir=SUBSTR($exe,1,Len($exe)-11)
; -- This is used for when you have people come into the company from another Exchange Server into yours
IF INGROUP('GROUPNAME') AND READVALUE($ppru+'\13dbb0c8aa05101a9bb000aa002fc45a','001e6602')<>$exchgsvr
$rc=WriteValue($ppru+'\13dbb0c8aa05101a9bb000aa002fc45a','001e6602',$exchgsvr,'REG_SZ')
$rc=WriteValue($ppru+'\13dbb0c8aa05101a9bb000aa002fc45a','001e6608',$exchgsvr,'REG_SZ')
ENDIF
; -- Look for Outlook Profile
;IF ReadValue($prfloc,'DefaultProfile')<>@USERID AND ReadValue($prfloc,'DefaultProfile')<>'MS Exchange Settings' OR @ERROR
IF (ReadValue($prfloc,'DefaultProfile')<>@USERID AND NOT INSTR(ReadValue($prfloc,'DefaultProfile'),'MS Exchange')) OR @ERROR
COPY $serverloc+'\'+$prf $prffile
$rc=WriteProfileString($prffile,'General','ProfileName',@USERID)
$rc=WriteProfileString($prffile,'General','DefaultProfile','Yes')
$rc=WriteProfileString($prffile,'General','OverwriteProfile','Yes')
$rc=WriteProfileString($prffile,'General','BackupProfile','No')
$rc=WriteProfileString($prffile,'Service1','AutoNameCheck','TRUE')
$rc=WriteProfileString($prffile,'Service1','EmptyWastebasket',$waste)
$rc=WriteProfileString($prffile,'Service1','CloseOriginalMessage','TRUE')
$rc=WriteProfileString($prffile,'Service2','HomeServer',$exchgsvr)
$rc=WriteProfileString($prffile,'Service2','MailboxName',@USERID)
SELECT
CASE
$ver='8.0' OR $ver='9.0' ;(e.g. 8.5.5104.0)
;SHELL '%COMSPEC% /C '+$scriptdir+'\Profgen.exe '+$scriptdir+'\Newprof.exe -p '+$prffile+' -X -R -L -T '+$profiledir+'> nul'
; -- THIS IS DANGEROUS as you will want to setup/modify the PRF File on the local workstation
;%0\..\OLProfiles\newprof.exe -p %0\..\OLProfiles\McMinn.prf
SHELL '%COMSPEC% /C '+$serverloc+'\newprof.exe -p '+$prffile+' -x'
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook','Machine Name',@WKSTA,'REG_SZ')
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook','CheckInternetAccounts',1,'REG_DWORD')
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook','FirstRunDialog','False','REG_SZ')
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\Setup','PrimaryClient',1,'REG_DWORD')
$rc=WriteValue('HKLM\Software\Microsoft\Office\'+$ver+'\Outlook\Setup','MailSupport',1,'REG_DWORD')
$rc=WriteValue('HKLM\Software\Microsoft\Office\'+$ver+'\Outlook\Setup','First-Run','df83b12adc9cd511b57c0002a57ce19c','REG_BINARY')
IF $explorview='Yes'
$rc=WriteValue($prfloc+@userid+'\0a0d020000000000c000000000000046','001e0360','','REG_SZ')
$expview='010000002c0000000200000003000000ffffffffffffffffffffffffffffffff62000000270000003'
$expview=$expview+'c030000ac02000001000000000000000100000000000000c00000006400000003000000'
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\Office Explorer','Frame',$expview,'REG_BINARY')
ENDIF
CASE
$ver='10.0' OR $ver='11.0' ;(e.g. 10.0.2627.1)
$rc=DelValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\Setup','First-Run')
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\Setup','ImportPRF',$prffile,'REG_SZ')
IF $ver='10.0'
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\IM','Enabled',0,'REG_DWORD')
ENDIF
; -- This was added as we needed to generate Outlook Profiles in a Citrix Session - thanks Rad!
$outlook=CreateObject('Outlook.Application')
$ns=$outlook.getnamespace('MAPI')
$fldr=$ns.getdefaultfolder(6)
$unread=$fldr.unreaditemcount
$outlook=0
ENDSELECT
DEL $MSOdir+'welcome.msg'
ENDIF
ENDFUNCTION