Page 1 of 1 1
Topic Options
#81910 - 2002-02-25 03:53 PM Outlook/Exchange Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
There have been many posts on how to configure Outlook/Exchange.

Outlook XP/2003/2007 Configuration
By: Kent Dyer (leptonator@hotmail.com)
Version 1.20: 11-March-2008

Note: Removed old versions of Outlook

Documentation/Research is in the next reply to this post.

(1) Outlook XP+, you only need:
OUTLOOK.PRF sample PRF file

(3) In the script below, change <YOUR EXCHANGE SERVER> to 'EXCHANGESERVER' or what it's name is.

(4) From the KIXTART.KIX or your login script, simply start this script by using:

outlook

Now, let's get into the main code.
 Code:
 ; --  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
 ;              mistajon (thanks for Outlook 2007 fix!)
 ;
 ; Action	Configure Outlook
 ;
 ; Syntax	OUTLOOK
 ;
 ; Version	1.20
 ;
 ; Date           1-April-2001
 ;
 ; Date Revised   11-March-2008
 ;
 ;
 ; Update Notes  11-March-2008 Remove Outlook 2000 and Window 9x
 ;                             Fixes $serverloc variable
 ;              18-Jan-2008 Added support for Outlook 2007 (version 12)
 ;
 ; Parameters 	none 
 ;
 ; Remarks	This function is used to configure Outlook with Exchange Server,
 ;              Change 'MAILSVR' to your server name
 ;
 ; Returns	Nothing
 ; 
 ; Dependencies 	Outlook.prf
 ; 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
 ;
 ; KiXtart Ver	4.02
 ; 
 ; Example(s)	OUTLOOK
 FUNCTION OUTLOOK()
     DIM $prfrem,$waste,$editorpref,$prf,$serverloc,
    $exchgsvr,$prfloc,$prffile,$ppru,$exe,$ver,$idx,$keyname,$rc,
    $outlook,$ns,$unread,$fldr,$x,$regexp,$MSOdir

    $waste='FALSE'    ; If set to TRUE, Empty Outlooks Deleted Items Folder on Exit
    $editorpref=30001 ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
    $prf='Outlook.prf'
    $prffile='%temp%\'+$prf
    $serverloc=@LSERVER+'\netlogon\Profgen' ; Outlook .PRF location
    $exchgsvr='MAILSVR'     ; Main Exchange Server Location
    $prfloc='HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
    ; -- 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'
    ; -- Determine location of Office
    $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
    ; -- This is an Optional section
    ;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 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)

       ;If Needed, you may want to uncomment the next line 
       ;$ver='10.0' OR $ver='11.0'  OR $ver='12.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
       DEL $MSOdir+'welcome.msg'
    ENDIF
 ENDFUNCTION


Edited by Kdyer (2008-07-14 08:03 PM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#81911 - 2002-07-04 10:05 AM Documentation: Outlook/Exchange Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Documentation for -

Outlook 98/2000/XP Configuration
By: Kent Dyer
Version - 1.16


Updated 10-June-2006
Tested with KiXtart - 4.02, 4.2x, 4.5x
Removed Support for 3.x
Test Environments - Win95, NT 4.0, W2k, WXP
Tested with - Outlook 98, 2000, XP (2002), 2003
Used some ideas from MCA's KIXnnnUPDATE.EXE script
Visit: http://home.wanadoo.nl/scripting/

Thanks also go to "Evilhearted" (Matt) - Problem with kdyers outlook script

Thanks Mart: Re: Outlook Profile Migration Question


This is a lot of information, just get me the files I need!! Code is below.
Customizing Profiles with an Outlook Profile File
http://www.microsoft.com/office/ork/2000/download/Outlook.prf - sample PRF file
ftp://ftp.microsoft.com/bussys/exchange/exchange-unsup-ed/profgen.zip - Contains PROFGEN.EXE
D:\PFILES\COMMON\SYSTEM\MAPI\1033\95\NEWPROF.EXE - Office 2000 CD
D:\PFILES\COMMON\SYSTEM\MAPI\1033\NT\NEWPROF.EXE - Office 2000 CD

How do I write HTML, Plain Text, Rich Text?

Ref - outlook key for "plain text"
Quote:

If you go to (for Office XP = 10.0, Office 2000 = 9.00 i think)




HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Options\Mail

the key "EditorPreference" I believe is for each editor. As far as I know the values are as follows (in Hex).

10001 = Plain Text
30001 = Rich Text
20001 = HTML

Therefore just change this key from any 20001's to 10001. This won't require local admin rights.
How do I use Word, or Outlook's Editor?
Make the following change in the Registry..
Quote:


; -- Set the default mail preference as Rich Text format 196609 is Word, 196610 Rich Text Format
IF "196610" <> READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","EditorPreference")
$rc = WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","EditorPreference","196610","REG_DWORD")
ENDIF
Originally created 15-August-2001
http://kixtart.org/board/ultimatebb.php?ubb=get_topic;f=10;t=000019
This completes the setup of Outlook
Yes, you can use PROFGEN and FIXPRF, but these alone don't complete the setup
They are, however necessary to complete this piece of the script
{Edit - Removed the need for FIXPRF.EXE}

Simplified vs. Full Version
The simplified version just "gets the job done."
The Full verson does some common configuration settings like an: "Explorer-type view", Editor, Font, etc.
Primary focus of the "Full version" was Outlook 2000.

Key points:
  • Changes the view to get rid of the Outlook Bar and show the "Explorer View" Now selectable.
  • Checks the box to empty deleted items on leaving Outlook. Now selectable.
  • Deletes bogus profiles like OEM User, etc. Now selectable.
  • Sets the default font to "Verdana 10 pt" and editor to be Rich Text. Now selectable - part of Explorer View.

Changes Necessary:Make the following changes as needed:
  • Company key needs to be changed to yours ($CompanyStr) - It can be removed from the script....
  • $profile_remove = 'Yes'
  • $deleteitems = 'No'
  • $explorview = 'Yes'
  • $serverloc = @lserver+'\Netlogon\Profgen\Outlook2000'
  • $exchangeserver = 'EXCHANGESERVER'
  • $prf = 'Outlook.prf'

Comments/feedback are also welcome to - leptonator@hotmail.com
Change Log - Older scripts
  • 10-June-2006 - 1.18 - Updated for support of Outlook 2007 - Currently in Beta 2 (version 12)
  • 11-April-2005 - 1.17 - Code updates
  • 03-March-2005 - 1.16 - Updated Documentation and code updates
  • 04-August-2003 - 1.15 - Update "Full" and "Simple" Versions to fit the research put into the re-write.
  • 20-July-2003 - 1.14 - Code re-write, broke out in to separate scripts
  • 10-July-2003 - 1.13 - Variable fix for version 10 (Outlook XP). Added Outlook 2003 (version 11)
  • 03-April-2003 - No Code change, just added information}
  • 28-February-2003 - 1.12 - Cleaned up/simplified code - Thanks Lonkero!
  • 26-February-2003 - 1.11 - Removed the Need for FIXPRF
  • 2-January-2003 - 1.10 - Corrected information about types of editors to be used in Outlook.
  • - 1.10 - FIXPRF.EXE also is needed for generating the profile for Outlook XP as well
  • - 1.10 - Quieted Profgen with a re-direct to nul - "> nul"
  • - 1.10 - Additional Testing with Outlook XP - completed
  • - 1.10 - Additional Testing with Windows 9x - completed
  • - 1.10 - Use of more variables - Should only need to make "one-stop" changes
  • - 1.10 - Changed @ldrive to @lserver for working with Win9x
  • - 1.10 - Removed the Need for Winset, Putinenv for Windows 9x
  • - 1.10 - Removed Profgen being used for Windows 9x
  • - 1.10 - Added version numbering to this script
  • 31-December-2002 - 1.9 - Added in information about Editor and Fonts.
  • 15-October-2002 - 1.8 - Re-Implemented FIXPRF.EXE for PROFILE Generation corrections
  • 15-October-2002 - 1.8 - FIXPRF.EXE also is needed for generating the profile for Outlook XP as well
  • 15-October-2002 - 1.8 - Quieted Profgen with a re-direct to nul - '> nul'
  • 15-October-2002 - 1.8 - Completed Testing with Windows 9x
  • 15-October-2002 - 1.8 - Use of more variables, changed @ldrive to @lserver for Win9x
  • 15-October-2002 - 1.8 - Removed the Need for Winset, Putinenv for Windows 9x
  • 03-October-2002 - 1.7 - Added in key to look for "MS Exchange Settings" as well as @userid
  • 19-August-2002 - 1.6 - Increased testing with EXISTKEY and related changes
  • 15-August-2002 - 1.5 - Fixed detection problem, 0 = EXISTKEY with an OR Statment bombs on 3.63
  • 18-July-2002 - 1.4 - Added in the ability to configure Outlook XP, updated Micrsoft Links
  • 12-March-2002 - 1.3 - Added Ability to turn on/off empty deleted items on exit and removal of bogus profiles
  • 17-February-2002 - 1.2 - Added in compatibility for Windows 9x
  • 27-August-2001 - 1.1 - Fixed Registry Key problem, CHKEXCHG.EXE - Not required

**** The following Resources were used in this script/composition ****

**** Outlook XP ****You can use GPO Editor for deployment of Outlook XP
You should be able to issue the following command line: outlook.exe /importprf \\server1\share\outlook.prf
Ref. Deploying OutlookLook under: "Customizing an Outlook Installation"
Outlook 2002 (Outlook XP) - http://www.slipstick.com/outlook/ol2002.htmWinset/Putinenv/FixPrf no longer needed.Outlook 2002 (Outlook XP) Information
PRF Tips for Outlook 2002
Outlook 2003 Command-line switches

Quote:

I too ran into this problem today and was unable to find a solution
documented anywhere. As I guess, I added the line "BackupProfile=No"
in the Section 1, [General] section and it works! Give it a try. It
sure would be nice if there was documentation for the new .prf file
format in Outlook 2002!



Customizing Profiles with an Outlook 2002 Profile File
Importing the PRF file -
outlook.exe /importprf \\server1\share\outlook.prf

Outlook Deployment

Microsoft Outlook 2002 Problems for Developers

HOW TO: Create a PRF File for Configuring MAPI Profiles During a Customized Outlook 2002 Installation (Q308300)

HOW TO: Add and Customize Outlook 2002 User Profile Account Information in the Custom Installation Wizard (Q307755)


Edited by kdyer (2006-06-14 02:31 AM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#81912 - 2003-07-21 07:59 AM SMTP/POP3: Outlook Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Code is from -
read/write smtp & pop config for outlook
Code:

$regKey='HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager'
$Entry = ReadValue($regKey,'Default Mail Account')

$rc=WriteValue($regKey+'\Accounts\'+$ENTRY,'SMTP Server','xxx.xxx.xxx.xxx','REG_SZ')
$rc=WriteValue($regKey+'Accounts\'+$ENTRY,'POP3 Server','xxx.xxx.xxx.xxx','REG_SZ')
$rc=WriteValue($regKey+'\Accounts\'+$ENTRY,'Leave Mail On Server',1,'REG_DWORD')
$rc=WriteValue($regKey+'\Accounts\'+$ENTRY,'Remove When Deleted',1,'REG_DWORD')


_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#81913 - 2006-06-11 07:38 AM Re: Outlook / Exchange Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Update to include support for Outlook 2007 (version 12), currently in BETA 2.

Edited by kdyer (2006-06-11 06:40 PM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#182924 - 2007-11-23 10:12 PM Re: Outlook / Exchange Configuration [Re: Kdyer]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Simplified Outlook 12 (2007) detection wit the following code:
 Code:
$ver>='10.0';(e.g. 10.0.2627.1) < Note: added for OL2007
;If Needed, you may want to uncomment the next line 
;$ver='10.0' OR $ver='11.0'  OR $ver='12.0';(e.g. 10.0.2627.1)


YMMV,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188761 - 2008-07-15 05:17 PM Re: Outlook / Exchange Configuration [Re: Kdyer]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
New Postprepped code..




; -- 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
; mistajon (thanks for Outlook 2007 fix!)
;
; Action Configure Outlook
;
; Syntax OUTLOOK
;
; Version 1.21
;
; Date 1-April-2001
;
; Date Revised 11-March-2008
;
; Update Notes 15-July-2008 Remove Customer Experience from launching when you startup Outlook
; 11-March-2008 Remove Outlook 2000 and Window 9x
; Fixes $serverloc variable
; 18-Jan-2008 Added support for Outlook 2007 (version 12)
;
; Parameters none
;
; Remarks This function is used to configure Outlook with Exchange Server,
; Change 'MAILSVR' to your server name
;
; Returns Nothing
;
; Dependencies Outlook.prf
; 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
;
; KiXtart Ver 4.02
;
; Example(s) OUTLOOK
FUNCTION OUTLOOK()
DIM $prfrem,$waste,$editorpref,$prf,$serverloc,
$exchgsvr,$prfloc,$prffile,$ppru,$exe,$ver,$idx,$keyname,$rc,
$outlook,$ns,$unread,$fldr,$x,$regexp,$MSOdir

$waste='FALSE' ; If set to TRUE, Empty Outlooks Deleted Items Folder on Exit
$editorpref=30001 ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf='Outlook.prf'
$prffile='%temp%\'+$prf
$serverloc=@LSERVER+'\Profgen' ; Outlook .PRF location
$exchgsvr='MAILSVR' ; Main Exchange Server Location
$prfloc='HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
; -- 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'
; -- Determine location of Office
$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
; -- This is an Optional section
;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 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)

;If Needed, you may want to uncomment the next line
;$ver='10.0' OR $ver='11.0' OR $ver='12.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
$rc=WriteValue('HKCU\Software\Microsoft\Office\Common','QMEnable',0,'REG_DWORD') ; -- Turn off User Feedback
; -- 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
DEL $MSOdir+'welcome.msg' ; -- Delete welcome message
ENDIF
ENDFUNCTION





Edited by Kdyer (2008-07-15 09:24 PM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Jochen, Radimus, Glenn Barnas, Allen, Arend_, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 148 anonymous users online.
Newest Members
KatieQuinn, Brennnnn, MKubicsek, xguixa, mdress
17681 Registered Users

Generated in 0.033 seconds in which 0.012 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org