#137184 - 2005-04-05 08:36 PM
Need Help with Outlook configuration script
|
Gummby
Lurker
Registered: 2005-03-24
Posts: 3
|
I am having a issue with the outlook configuration script. It works great when there is no profile built at all for the user but if the machine that you are logging onto has any profile at all it won't delete those profiles and then proceed to build the new one for the user logging in. Here is the script im using: (note i have excluded the exchange server & company for security reasons)
Code:
OUTLOOK
; -- OUTLOOK - ALL >> MAIN CONFIGURATION FOR MICROSOFT OUTLOOK TO EXCHANGE SERVERS
FUNCTION OUTLOOK()
DIM $profile_remove,$deleteitems,$explorview,$editorpref,$prf,$company,$serverloc,$exchangeserver,
$ushefolders,$userwinkey,$machinewinkey,$mofckey,$uofckey,$profilelocation,$scriptdir,$profiledir,
$prffile,$ppru,$mses,$exe,$ver,$verchk,$index,$keyname
$profile_remove='Yes' ; Remove All other Outlook profiles under current user
$deleteitems='no'; 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'
$company='company'
$serverloc=@lserver+'\Netlogon\Profgen\Outlook2000' ; Outlook Executables files location
$exchangeserver='exchangeserver' ; Main Exchange Server Location
$ushefolders='HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
$userwinkey='HKCU\Software\Microsoft\Windows'
$machinewinkey='HKLM\Software\Microsoft\Windows'
$mofckey='HKLM\Software\Microsoft\Office\'
$uofckey='HKCU\Software\Microsoft\Office\'
IF @inwin=1
;Windows NT/2k/XP/2003
$profilelocation=$userwinkey+' NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
ELSE
;Windows 9x
$profilelocation=$userwinkey+' Messaging Subsystem\Profiles'
ENDIF
$scriptdir=split('%WINDIR%',':')[0]+':\Scripts'
$profiledir='%temp%'
$prffile=$profiledir+'\'+$prf
;$prffile=$scriptdir+'\'+$prf
$ppru=$profilelocation+'\'+@userid
$mses=$profilelocation+'\MS Exchange Settings'
$exe=ReadValue($machinewinkey+'\CurrentVersion\App Paths\OUTLOOK.EXE','')
$ver=GetFileVersion($exe)
$verchk=SPLIT($ver,'.')[0]
IF 0=Exist($scriptdir)
MD $scriptdir
ENDIF
; -- IF YOU WANT TO REMOVE THE OFFICE PERSONALIZATION, COMMENT THE NEXT LINE
MSUSERINFO($uofckey,$verchk)
IF INGROUP('A GROUP')
IF READVALUE($ppru+'\13dbb0c8aa05101a9bb000aa002fc45a','001e6602')=$exchangeserver
RETURN
ELSE
IF 0=Exist ($scriptdir+'\profupdt.exe') ; - profupdt.exe is from Exchange 24/7
COPY $serverloc+'\profupdt.exe' $scriptdir
ENDIF
SHELL '%COMSPEC% /C '+$scriptdir+'\profupdt.exe '+$exchangeserver
;SHELL '%COMSPEC% /C '+$scriptdir+'\Modprof.exe -p '+$prffile
RETURN
ENDIF
ENDIF
IF KeyExist($ppru) OR KeyExist($mses)
RETURN
ELSE
COPY $serverloc+'\'+$prf $profiledir+'\'+$prf
PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
; Custom Profile Settings
IF $profile_remove='YES'
$index=0
$keyname=EnumKey($profilelocation,$index)
WHILE @error=0
IF $keyname<>@userid $rc=DelTree($profilelocation+'\'+$keyname)
ENDIF
$index=$index+1
$keyname=EnumKey($profilelocation,$index)
LOOP
ENDIF
SELECT
CASE
$verchk=8 or $verchk=9 ;(e.g. 8.5.5104.0) OR (e.g. 9.0.0.2416)
OUTLOOK8AND9($verchk+'.0',$scriptdir,$prffile,$mofckey,$uofckey,$serverloc,$explorview,$profilelocation)
RETURN
CASE
$verchk=10 or $verchk=11 ;(e.g. 10.0.2627.1) OR (e.g. 11.0.5329.6)
;$ver=$verchk+'.0'
OUTLOOK10AND11($verchk+'.0',$uofckey,$prffile,$explorview)
RETURN
ENDSELECT
ENDIF
ENDFUNCTION
; -- OUTLOOK BRANCHOUT FOR OUTLOOK XP/2003 - ALL
FUNCTION OUTLOOK10AND11($vers,$uofckey,$prffile,$explorview)
DIM $rc,$expview
$rc=DelValue($uofckey+$vers+'\Outlook\Setup','First-Run')
$rc=WriteValue($uofckey+$vers+'\Outlook\Setup','ImportPRF',$prffile,'REG_SZ')
SLEEP 1
;If '196610'<>ReadValue($uofckey+$vers+'\Outlook\Options\Mail','EditorPreference')
; $rc=WriteValue($uofckey+$vers+'\Outlook\Options\Mail','EditorPreference','196610','REG_DWORD')
;EndIf
;$pltextfont='3c0000000f0000e800000040c80000000600000000000000002056657264616e6100020000000000000000'
;$pltextfont=$pltextfont+'0000000000201a493a38e9070001000000'
;$rc=WriteValue($uofckey+$vers+'\Outlook\Preferences','TextFontSimple',$pltextfont,'REG_BINARY')
IF $explorview='Yes'
$expview='010000002c0000000200000003000000ffffffffffffffffffffffffffffffff2c0000002c00000084'
$expview=$expview+'020000dc01000001000000000000000100000000000000c0000000640000001800000003000000'
$rc=WriteValue($uofckey+$vers+'\Outlook\Office Explorer','Frame',$expview,'REG_BINARY')
ENDIF
IF $vers='10.0' ; - TURN OFF INSTANT MESSAGING FOR OUTLOOK-XP
$rc=ADDKEY($uofckey+$vers+'\Outlook\IM')
$rc=WriteValue($uofckey+$vers+'\Outlook\IM','Enabled',0,'REG_DWORD')
ENDIF
ENDFUNCTION
; -- OUTLOOK BRANCH OUT FOR OUTLOOK 98/2000
FUNCTION OUTLOOK8AND9($vers,$scriptdir,$prffile,$mofckey,$uofckey,$serverloc,$explorview,$profilelocation)
DIM $expview,$rc
IF 0=Exist ($scriptdir+'\Profgen.exe')
COPY $serverloc+'\Profgen.exe' $scriptdir
ENDIF
IF 0=Exist ($scriptdir+'\NEWPROF.EXE')
COPY $serverloc+'\NEWPROF.EXE' $scriptdir
ENDIF
IF @inwin=1
SHELL '%COMSPEC% /C '+$scriptdir+'\Profgen.exe '+$scriptdir+'\Newprof.exe -p '+$prffile+' -X -R -L > nul'
ELSE
SHELL '%COMSPEC% /C '+$scriptdir+'\Newprof.exe -p '+$scriptdir+' -X -R -L > nul'
ENDIF
SLEEP 1
IF $explorview='Yes'
IF 0=KeyExist($mofckey+$vers)
$rc=AddKey($mofckey+$vers)
ENDIF
IF 0=KeyExist($uofckey+$vers)
$rc=AddKey($uofckey+$vers)
ENDIF
IF 0=KeyExist($mofckey+$vers+'\Common')
$rc=AddKey($mofckey+$vers+'\Common')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Common')
$rc=AddKey($uofckey+$vers+'\Common')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Preferences')
$rc=AddKey($uofckey+$vers+'\Preferences')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Common\UserInfo')
$rc=AddKey($uofckey+$vers+'\Common\UserInfo')
ENDIF
IF 0=KeyExist($mofckey+'Outlook')
$rc=AddKey($mofckey+'Outlook')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Outlook\Options')
$rc=AddKey($uofckey+$vers+'\Outlook\Options')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Outlook\Options\Mail')
$rc=AddKey($uofckey+$vers+'\Outlook\Options\Mail')
ENDIF
IF 0=KeyExist($mofckey+$vers+'\Outlook\Setup')
$rc=AddKey($mofckey+$vers+'\Outlook\Setup')
ENDIF
IF 0=KeyExist($uofckey+$vers+'\Outlook\Office Explorer')
$rc=AddKey($uofckey+$vers+'\Outlook\Office Explorer')
ENDIF
IF @wksta<>ReadValue($uofckey+$vers+'\Outlook','Machine Name')
$rc=WriteValue($uofckey+$vers+'\Outlook','Machine Name',@wksta,'REG_SZ')
ENDIF
IF 1<>ReadValue($uofckey+$vers+'\Outlook','CheckInternetAccounts')
$rc=WriteValue($uofckey+$vers+'\Outlook','CheckInternetAccounts','1','REG_DWORD')
ENDIF
IF 'False'<>ReadValue($uofckey+$vers+'\Outlook','FirstRunDialog')
$rc=WriteValue($uofckey+$vers+'\Outlook','FirstRunDialog','False','REG_SZ')
ENDIF
IF 1<>ReadValue($uofckey+$vers+'\Outlook\Setup','PrimaryClient')
$rc=WriteValue($uofckey+$vers+'\Outlook\Setup','PrimaryClient','1','REG_DWORD')
ENDIF
IF 1<>ReadValue($mofckey+$vers+'\Outlook\Setup','MailSupport')
$rc=WriteValue($mofckey+$vers+'\Outlook\Setup','MailSupport','1','REG_DWORD')
ENDIF
IF 1<>ReadValue($mofckey+$vers+'\Outlook\Setup','First-Run')
$rc=WriteValue($mofckey+$vers+'\Outlook\Setup','First-Run','df83b12adc9cd511b57c0002a57ce19c','REG_BINARY')
ENDIF
;If '196610'<>ReadValue($uofckey+$vers+'\Outlook\Options\Mail','EditorPreference')
; $rc=WriteValue($uofckey+$vers+'\Outlook\Options\Mail','EditorPreference','196610','REG_DWORD')
;EndIf
$rc=WriteValue($profilelocation+@userid+'\0a0d020000000000c000000000000046','001e0360','','REG_SZ')
$expview='010000002c0000000200000003000000ffffffffffffffffffffffffffffffff62000000270000003'
$expview=$expview+'c030000ac02000001000000000000000100000000000000c00000006400000003000000'
$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$vers+'\Outlook\Office Explorer','Frame',$expview,'REG_BINARY')
;$pltextfont='3c0000000f0000e800000040c80000000600000000000000002056657264616e6100020000000000000000'
;$pltextfont=$pltextfont+'0000000000201a493a38e9070001000000'
;$rc=WriteValue($uofckey+$vers+'\Outlook\Preferences','PlainTextFont',$pltextfont,'REG_BINARY')
ENDIF
ENDFUNCTION
; -- OUTLOOK PROFILE SETTINGS - ALL >> USED FOR OUTLOOK CONFIGURATION
FUNCTION PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
DIM $rc
; Custom Profile Settings
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 'Yes'<>ReadProfileString($prffile,'General','OverwriteProfile')
$rc=WriteProfileString($prffile,'General','OverwriteProfile','Yes')
ENDIF
IF $exchangeserver<>ReadProfileString($prffile,'Service2','HomeServer')
$rc=WriteProfileString($prffile,'Service2','HomeServer',$exchangeserver)
ENDIF
IF @userid<>ReadProfileString($prffile,'Service2','MailboxName')
$rc=WriteProfileString($prffile,'Service2','MailboxName',@userid)
ENDIF
IF 'TRUE'<>ReadProfileString($prffile,'Service1','AutoNameCheck')
$rc=WriteProfileString($prffile,'Service1','AutoNameCheck','TRUE')
ENDIF
IF 'FALSE'<>ReadProfileString($prffile,'Service1','ConfirmOnDelete')
$rc=WriteProfileString($prffile,'Service1','ConfirmOnDelete','FALSE')
ENDIF
IF $deleteitems='YES'
IF 'TRUE'<>ReadProfileString($prffile,'Service1','EmptyWastebasket')
$rc=WriteProfileString($prffile,'Service1','EmptyWastebasket','TRUE')
ENDIF
ELSE
IF 'FALSE'<>ReadProfileString($prffile,'Service1','EmptyWastebasket')
$rc=WriteProfileString($prffile,'Service1','EmptyWastebasket','FALSE')
ENDIF
ENDIF
IF 'FALSE'<>ReadProfileString($prffile,'Service1','RemoveSchdPlus')
$rc=WriteProfileString($prffile,'Service1','RemoveSchdPlus','FALSE')
ENDIF
IF 'TRUE'<>ReadProfileString($prffile,'Service1','SelectEntireWord')
$rc=WriteProfileString($prffile,'Service1','SelectEntireWord','TRUE')
ENDIF
IF 'TRUE'<>ReadProfileString($prffile,'Service1','CloseOriginalMessage')
$rc=WriteProfileString($prffile,'Service1','CloseOriginalMessage','TRUE')
ENDIF
IF 'FALSE'<>ReadProfileString($prffile,'Service1','GenReadReceipt')
$rc=WriteProfileString($prffile,'Service1','GenReadReceipt','FALSE')
ENDIF
IF 'FALSE'<>ReadProfileString($prffile,'Service1','GenDeliveryReceipt')
$rc=WriteProfileString($prffile,'Service1','GenDeliveryReceipt','FALSE')
ENDIF
IF 'True'<>ReadProfileString($prffile,'Service1','SaveSentMail')
$rc=WriteProfileString($prffile,'Service1','SaveSentMail','True')
ENDIF
IF 'No'<>ReadProfileString($prffile,'General','BackupProfile')
$rc=WriteProfileString($prffile,'General','BackupProfile','No')
ENDIF
ENDFUNCTION
; -- MSUSERINFO - ALL - USED BY THE OUTLOOK CONFIGURATION FUNCTION
FUNCTION MSUSERINFO($uofckey,$ver)
DIM $x,$regexp,$company,$companybin,$fullnamebin,$useridbin,$initials,$regkey
IF KeyExist($uofckey)
; Process Company Name
$x=1
$regexp=''
WHILE $x<(Len($company)+1)
$regexp=$regexp+DecToHex(Asc(SubStr($company,$x,1)))+'00'
$x=$x+1
LOOP
$regexp=$regexp+'0000'
$companybin=$regexp
; Process FullName
$x=1
$regexp=''
WHILE $x<(Len(@fullname)+1)
$regexp=$regexp+DecToHex(Asc(SubStr(@fullname,$x,1)))+'00'
$x=$x+1
LOOP
$regexp=$regexp+'0000'
$fullnamebin=$regexp
; Process UserID
$useridbin=SubStr(@wuserid,1,2)
$x=1
$regexp=''
WHILE $x<(Len($useridbin)+1)
$regexp=$regexp+DecToHex(Asc(SubStr($useridbin,$x,1)))+'00'
$x=$x+1
LOOP
$regexp=$regexp+'0000'
$initials=$regexp
IF 0=KeyExist($uofckey+$ver+'.0\Common\UserInfo')
$rc=AddKey($uofckey+$ver+'.0\Common\UserInfo')
ENDIF
$regkey=$uofckey+$ver+'.0\Common\UserInfo'
IF KeyExist($regkey)
$rc=WriteValue($regkey,'Company',$companybin,'REG_BINARY')
$rc=WriteValue($regkey,'UserName',$fullnamebin,'REG_BINARY')
$rc=WriteValue($regkey,'UserInitials',$initials,'REG_BINARY')
ENDIF
ENDIF
ENDFUNCTION
A little more info on the problem im having. In our company before I was brought on, they set up a ghost build of ms 2000 & xp, in the ghost build for who nows what reason the default user profile has a outlook profile already built. So what happens is when you log into the machine for the first time it takes the settings for outlook from the default user. Then for some reason when you run the outlook.kix script it won't delete that default outlook profile and build the new one for that specific user logging in.
Any thoughts or help would be great 
Thanks, Gummby
Edited by Gummby (2005-04-05 10:23 PM)
|
|
Top
|
|
|
|
#137186 - 2005-04-05 10:25 PM
Re: Need Help with Outlook configuration script
|
Gummby
Lurker
Registered: 2005-03-24
Posts: 3
|
Quote:
Please use code tags when posting code.
Sorry about that, i totally forgot the code tags, lol.... Fixed
Gummby
|
|
Top
|
|
|
|
#137187 - 2005-04-06 03:10 PM
Re: Need Help with Outlook configuration script
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
You need to look into/modify the following.. Code:
IF $profile_remove='YES' $index=0 $keyname=EnumKey($profilelocation,$index) WHILE @error=0 IF $keyname<>@userid $rc=DelTree($profilelocation+'\'+$keyname) ENDIF $index=$index+1 $keyname=EnumKey($profilelocation,$index) LOOP ENDIF
That is, you need to remove the offending profile and re-generate it, correct?
Also, I have some simplified code to do alot of this. I will try to remember to post it when I get into work. I have been pretty slammed lately with an imaging rollout project. 
Kent
|
|
Top
|
|
|
|
#137188 - 2005-04-06 04:58 PM
Re: Need Help with Outlook configuration script
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Ok.. Took a couple of moments and put together the "new" code.
Thanks to Rad for his insights on this..
Wrappped all of the functions into one, this should make more sense: Code:
CLS BREAK ON ??? OUTLOOK ; -- OUTLOOK - ALL >> MAIN CONFIGURATION FOR MICROSOFT OUTLOOK TO EXCHANGE SERVERS FUNCTION OUTLOOK() DIM $prfrem,$waste,$explorview,$editorpref,$prf,$company,$serverloc, $exchgsvr,$prfloc,$prffile,$ppru,$exe,$ver,$idx,$keyname,$rc, $outlook,$ns,$unread,$fldr,$x,$regexp,$companybin,$fullnamebin,$initials,$MSOdir
$prfrem='Yes' ; Remove All other Outlook profiles under current user $waste='TRUE'; 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 $company='Your_Company, Inc.' $serverloc=@LSERVER+'\Netlogon\Profgen' ; Outlook Executables files location $exchgsvr='YOUR_EXCHANGE_SERVER' ; 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 $ppru=$prfloc+'\'+@USERID
$exe=ReadValue('HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE','') $ver=SPLIT(GetFileVersion($exe),'.')[0]+'.0' $MSOdir=SUBSTR($exe,1,Len($exe)-11)
IF ReadValue($prfloc,'DefaultProfile')<>@USERID 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)
IF $prfrem='YES' $idx=0 $keyname=EnumKey($prfloc,$idx) WHILE @ERROR=0 IF $keyname<>@USERID $rc=DelTree($prfloc+'\'+$keyname) ENDIF $idx=$idx+1 $keyname=EnumKey($prfloc,$idx) LOOP ENDIF
SELECT CASE $ver='8.0' OR $ver='9.0' ;(e.g. 8.5.5104.0) IF @INWIN=1 ;SHELL 'CMD /C '+$serverloc+'\Profgen.exe '+$serverloc+'\Newprof.exe -p ' ;+$prffile+' -X -R -L -T %temp%> nul' SHELL 'CMD /C '+$serverloc+'\modprof.exe -P '+$prffile+' -x' ELSE SHELL '%COMSPEC% /C '+$serverloc+'\Newprof.exe -p '+$serverloc+' -X -R -L > nul' ENDIF $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') ;$rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Outlook\Options\Mail','EditorPreference','196610','REG_DWORD')
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 ; Process Company Name $x=1 $regexp='' WHILE $x<(Len($company)+1) $regexp=$regexp+DecToHex(Asc(SubStr($company,$x,1)))+'00' $x=$x+1 LOOP $regexp=$regexp+'0000' $companybin=$regexp $rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Common\UserInfo','Company',$companybin,'REG_BINARY') ; Process FullName $x=1 $regexp='' WHILE $x<(Len(@FULLNAME)+1) $regexp=$regexp+DecToHex(Asc(SubStr(@FULLNAME,$x,1)))+'00' $x=$x+1 LOOP $regexp=$regexp+'0000' $fullnamebin=$regexp $rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Common\UserInfo','UserName',$fullnamebin,'REG_BINARY') ; Process UserID $useridbin=SubStr(@WUSERID,1,2) $x=1 $regexp='' WHILE $x<(Len($useridbin)+1) $regexp=$regexp+DecToHex(Asc(SubStr($useridbin,$x,1)))+'00' $x=$x+1 LOOP $regexp=$regexp+'0000' $initials=$regexp $rc=WriteValue('HKCU\Software\Microsoft\Office\'+$ver+'\Common\UserInfo','UserInitials',$initials,'REG_BINARY') DEL $MSOdir+'welcome.msg' 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 ENDSELECT $outlook=CreateObject('Outlook.Application') $ns=$outlook.getnamespace('MAPI') $fldr=$ns.getdefaultfolder(6) $unread=$fldr.unreaditemcount $outlook=0 ENDIF ENDFUNCTION
Thanks,
Kent
|
|
Top
|
|
|
|
#137189 - 2006-03-30 07:40 PM
Re: Need Help with Outlook configuration script
|
Clayton
Fresh Scripter
Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
|
Call me stupid or best yet confused. I'm trying to use this script to roll out a new citrix server with Office 2003. I'm confused on the profgen, modprof and outlook.prf. Can someone slap and un confuse me?
Thanks
|
|
Top
|
|
|
|
#137190 - 2006-03-30 11:47 PM
Re: Need Help with Outlook configuration script
|
bcousins
Lurker
Registered: 2006-03-30
Posts: 1
|
Clayton: My experienece with this has been that MS changed the way this is done in Office 2003. You need the Resource Kit for Office 2003 Toolbox Found here: http://www.microsoft.com/office/orkarchive/2003ddl.htm which provides another method, using the Custom Maintenance Wizard (MaintWiz.exe), then you export a PRF file for your current Outlook properties, and then you use a pointer to the CMW file (Custom Maintenance wizard file) that is generated at the end. I found for 2003 that the profgen, modprof are not supported. But then again, I may need to be slapped as well. Just my thoughts, hope it helps.
Bob
|
|
Top
|
|
|
|
#137191 - 2006-03-31 05:49 PM
Re: Need Help with Outlook configuration script
|
Clayton
Fresh Scripter
Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
|
Okay I have my prf file and the script runs and creates the profile but it's not setting up the exchange account. Any ideas?
Edited by Clayton (2006-03-31 07:23 PM)
|
|
Top
|
|
|
|
#137192 - 2006-04-18 06:05 PM
Re: Need Help with Outlook configuration script
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Quote:
Okay I have my prf file and the script runs and creates the profile but it's not setting up the exchange account. Any ideas?
What? You want the Exchange Account and is not created? Try the above script and try to get in. It will however, require that the Account is created in Exchange first. It does not work in reverse - That is everyone that logs in on the domain cannot create mailboxes in Exchange.
Thanks,
Kent
|
|
Top
|
|
|
|
#172941 - 2007-01-18 01:02 PM
Re: Need Help with Outlook configuration script
[Re: Kdyer]
|
Dugster
Fresh Scripter
Registered: 2006-12-12
Posts: 11
|
Hi, I have a couple of questions regarding this script. I am running Outlook 2000 on w2k. If I run the script the profile gets created fine but the options aren't set. The only one that appears to be set is the "Empty deleted items" but others such as DoAutoArchive and CloseOriginalMessage don't seem to be affected by the prf setting. Any idea why?
Also I would like to run this script only if there isn't a profile already set on the pc. Any idea how I could ensure that if a profile exists already nothing happens?
Thanks in advance.
|
|
Top
|
|
|
|
#172983 - 2007-01-19 03:03 PM
Re: Need Help with Outlook configuration script
[Re: Mart]
|
Dugster
Fresh Scripter
Registered: 2006-12-12
Posts: 11
|
Thanks Mart. I'll set them with a reg push I think.
Any idea how to run this script only if no profile already exists?
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2924 anonymous users online.
|
|
|