?
Solved

Add multiple PSTs using Profgen.exe and NewProf.exe

Posted on 2005-02-23
3
Medium Priority
?
1,432 Views
Last Modified: 2008-01-09
Hi,

We have recently ditched roaming profiles for our users as they cause more problems than they solve.  Consequently, if anyone does move desk, we have to recreate their mail profile (among other things).

I'm writing a vbscript based solution that will create the mail profile for each user as they log in.  Creating a brand new default profile is simple using Profgen and Newprof.  However, most of our users have more than one personal folder.  Therefore, what I would like to do is enumerate all PSTs in their home folder, and then create the mail profile adding in all the PSTs.

Does anyone know if this is possible with Profgen and Newprof?   I realise that I will probably need to dynamically modify the Outlook.prf file, and i'm completely Ok with that, unfortunately, I don't know if it's possible to create profiles with multiple PSTs, and if it is, I don't know what the syntax should be.

If I can crack this, I will post the finished scripts here for other peoples benefit.

Cheers

Mick
0
Comment
Question by:lambch0p
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:lambch0p
ID: 13403964
Here's the code i've got so far.  It works perfectly on my XP machine with Outlook 2003 but seems to be failing on every other machine.  If anyone can figure out why it doesn't work on Outlook 2k machines, they can have the points.  There's no comments in it, as it's still in a very rough phase, but it checks a given folder (in this case h:\exchange) enumerates the PSTs and PABS that reside there, then dynamically modifies the Outlook.Prf file with the correct information.  It simply does a RegExp replace by looking for two placeholders in the Outlook.prf file (which is a copy of a template PRF file) and replacing them with the correct list of services, and then the correct settings for the service.

It uses ProfGen.exe, NewProf.exe and a file called Dummy.PRF (which is a template Outlook.prf).  The contents of Dummy.prf are given after the code.

*****THE CODE *****
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Const ReadOnly = 1

Dim refWMIService
Dim strDirName
Dim refDirectory
Dim refFileItem

strDirName = "h:\exchange"

Set refWMIService = GetObject("winMgmts:")
Set refDirectory = GetObject("winMgmts:Win32_Directory='" & strDirName & "'")
Set objNet = CreateObject("WScript.NetWork")
strUName = objNet.UserName

EnumerateFiles(refDirectory)

set refDirectory = Nothing
set refWMIService = Nothing

Function EnumerateFiles(pCurrentDir)
      
      Dim strQuery
      Dim refItem
      Dim colFiles
      Dim colSubDirs
      ReDim arrPST(-1)
      ReDim arrPAB(-1)

      'now get a reference to all the subdirectories
      strQuery = "ASSOCIATORS OF {Win32_Directory='" & pCurrentDir.Name & "'} WHERE AssocClass=CIM_DirectoryContainsFile " & "Role=GroupComponent ResultRole=PartComponent"
      set colFiles = refWMIService.ExecQuery(strQuery)
      
      For Each refFileItem in colFiles
            If UCASE(Right(refFileItem.Name,3)) = "PST" Then
                  If UBound(arrPST) = -1  Then
                        ReDim arrPST(0)
                        arrPST(0) = refFileItem.Name
                  Else
                        ReDim Preserve arrPST(UBound(arrPST) + 1)
                        arrPST(Ubound(arrPST)) = refFileItem.Name
                  End If
            End if
      Next
      
      For Each refFileItem in colFiles
            If UCASE(Right(refFileItem.Name,3)) = "PAB" Then
                  If UBound(arrPAB) = -1  Then
                        ReDim arrPAB(0)
                        arrPAB(0) = refFileItem.Name
                  Else
                        ReDim Preserve arrPAB(UBound(arrPAB) + 1)
                        arrPAB(Ubound(arrPAB)) = refFileItem.Name
                  End If
            End if
      Next
      
      prfRet = ModifyPRF (arrPST,arrPAB)
      
      set colFiles = Nothing

End Function

Function ModifyPRF(PSTs,PABs)
      
      Dim wsh
      Set fso = CreateObject("Scripting.FileSystemObject")
      copyRet = fso.CopyFile ("dummy.prf","Outlook.prf")

      ServiceData = ""
       PSTNum = 3
       If Not UBound(PSTs) = -1 Then
             For Each PSTItem in PSTs
                   ServiceData = ServiceData & "Service" & PSTNum & "=Personal Folders" & vbCrLf
                   If PSTNum = 3 Then
                         PSTNum = PSTNum + 2
                   Else
                         PSTNum = PSTNum + 1
                   End If
              Next
        Else
              ServiceData = ServiceData & "Service" & PSTNum & "=Personal Folders" & vbCrLf
              If PSTNum = 3 Then
                         PSTNum = PSTNum + 2
                   Else
                         PSTNum = PSTNum + 1
             End If
        End If
        
        PABNum = PSTNum
        If Not UBound(PABs) = -1 Then
             For Each PABItem in PABs
                   ServiceData = ServiceData & "Service" & PABNum & "=Personal Address Book" & vbCrLf
                   PABNum = PABNum + 1
             Next
        Else
               ServiceData = ServiceData & "Service" & PABNum & "=Personal Address Book" & vbCrLf
            PABNum = PABNum + 1
       End If
             
      ServiceDetails = ""
        PSTNum = 3
        PSTIndex = 0
        If Not UBound(PSTs) = -1 Then
             For Each PSTItem in PSTs
                   ServiceDetails = ServiceDetails & "[Service" & PSTNum & "]" & vbCrLf
                   ServiceDetails = ServiceDetails & "EncryptionType=0x80000000" & vbCrLF
                   ServiceDetails = ServiceDetails & "PathToPersonalFolders=" & PSTs(PSTIndex) & vbCrLf
                   ServiceDetails = ServiceDetails & vbCrLf
                   If PSTNum = 3 Then
                         PSTNum = PSTNum + 2
                   Else
                         PSTNum = PSTNum + 1
                   End If
                   PSTIndex = PSTIndex +1
              Next
        Else
              ServiceDetails = ServiceDetails & "[Service" & PSTNum & "]" & vbCrLf
             ServiceDetails = ServiceDetails & "EncryptionType=0x80000000" & vbCrLf
             ServiceDetails = ServiceDetails & "PathToPersonalFolders=" & "H:\Exchange\" & strUName & ".PST" & vbCrLf
             ServiceDetails = ServiceDetails & vbCrLf
             If PSTNum = 3 Then
                         PSTNum = PSTNum + 2
                   Else
                         PSTNum = PSTNum + 1
             End If
       End If
        
        PABNum = PSTNum
        PABIndex = 0
        If Not Ubound(PABs) Then
              For Each PABItem in PABs
                   ServiceDetails = ServiceDetails & "[Service" & PABNum & "]" & vbCrLf
                   ServiceDetails = ServiceDetails & "PathToPersonalAddressBook=" & PABs(PABIndex) & vbCrLf
                   ServiceDetails = ServiceDetails & "ViewOrder=0" & vbCrLf
                   PABNum = PABNum +1
                   PABIndex = PABIndex +1
              Next
        Else
              ServiceDetails = ServiceDetails & "[Service" & PABNum & "]" & vbCrLf
             ServiceDetails = ServiceDetails & "PathToPersonalAddressBook=" & "H:\Exchange\" & strUName & ".PAB" & vbCrLf
             ServiceDetails = ServiceDetails & "ViewOrder=0" & vbCrLf
       End If       
      
       Set fso = Nothing
       
      Set fso = CreateObject("Scripting.FileSystemObject")
      Set fsoFile = fso.GetFile("Outlook.Prf")

      Set fsoTextStream = fso.OpenTextFile("Outlook.prf", ForReading)
      strOldPrf = fsoTextStream.ReadAll
      fsoTextStream.Close

      Set vbsRegExp = New RegExp
      vbsRegExp.Pattern = "LoggedInUserName"
      vbsRegExp.Global = True
      vbsRegExp.IgnoreCase = True
      strNewPrf1 = vbsRegExp.Replace(strOldPrf,strUName)
      Set vbsRegExp = Nothing

      Set vbsRegExp = New RegExp
      vbsRegExp.Pattern = "ServiceData"
      vbsRegExp.Global = True
      vbsRegExp.IgnoreCase = True
      strNewPrf2 = vbsRegExp.Replace(strNewPrf1,ServiceData)
      Set vbsRegExp = Nothing
      
      Set vbsRegExp = New RegExp
      vbsRegExp.Pattern = "ServiceDetails"
      vbsRegExp.Global = True
      vbsRegExp.IgnoreCase = True
      strNewPrf3 = vbsRegExp.Replace(strNewPrf2,ServiceDetails)
      Set vbsRegExp = Nothing
      
      Set fsoTextStream = fso.OpenTextFile("Outlook.prf", ForWriting)
      fsoTextStream.Write strNewPrf3
      fsoTextStream.Close
      
      Set fso = Nothing
      
      Set wsh = WScript.CreateObject("WScript.Shell")
      
      strCommand = "profgen.exe NewProf.exe -p Outlook.prf -R -N -T c:\oPrf"
            
      retVal = wsh.Run (strCommand,7,1)

      Set wsh = Nothing
      
End Function

Wscript.Echo "Processing completed for " & strUName

*****DUMMY.PRF Contents*****
; Outlook PRF file for Exchange Server users
; -------------------------------------------
; Copyright (C), Microsoft Corporation, 1996.
;
; The following PRF file is included as an example of how to create a PRF file that will
; configure Outlook users with Exchange Server.  Section 1, 2, and 3 may be modified.  
; DO NOT MODIFY SECTION 4.  It will most likely cause exchange services to crash.  
; Be very careful when editing to ensure property values match their property types.
;
; For information about how to disable AutoProfile and launch users directly
; into the Inbox Setup Wizard, see NONE.PRF in the Office Resource Kit.

; ************************************************************************
; Section 1 - Profile defaults.

[General]
Custom=1
ProfileName=LoggedInUserName
DefaultProfile=Yes
OverwriteProfile=Yes
DefaultStore=Service2

; ************************************************************************
; Section 2 - Services in profile.

[Service List]
Service1=Microsoft Outlook Client
Service2=Microsoft Exchange Server
Service4=Outlook Address Book
;Placeholder variable for dynamic service list;
;Service3 will be used, then it will go straight to service5
ServiceData


; ************************************************************************
; Section 3 - Default values for each service.

;Settings for the Outlook Client
[Service1]
;---General Settings in Client----
AfterMoveMessage=0
AutoNameCheck=FALSE
ConfirmOnDelete=FALSE
EmptyWastebasket=TRUE
RemoveSchdPlus=FALSE
SelectEntireWord=FALSE
UseSchdPlus=FALSE

;------WebForms-------
ComposeWithWebServices=False
FormDirectoryPage=<PLACE URL HERE>
OpenWithWebServices=True
PromptWhenUsingWebServices=False
WebServicesLocation=<PLACE URL HERE>

;----Outlook AutoArchive------
AutoArchiveFile=archive.pst
DeleteExpiredMessages=TRUE
DoAutoArchive=TRUE
NumberOfDaysforAutoArchive=14
PromptforAutoArchive=TRUE

;------Sending Mail------------
AddSigToNewMessage=FALSE
AddSigToReplyMessage=FALSE
CloseOriginalMessage=FALSE
CommaAddressSeparator=TRUE
DefaultPriority=1
DefaultSensitivity=0
GenDeliveryReceipt=FALSE
GenReadReceipt=FALSE
ReplyToMessage=3
ForwardMessage=3
MarkMyCommentsWith=False
SaveForwards=True
SaveRepliesWithOriginal=TRUE
SaveSentMail=TRUE

;------When Mail Arrives-------
ChangePointerOnNewMail=FALSE
NotifyWithDialogOnNewMail=FALSE
PlaySoundWhenNewMail=FALSE

[Service2]
ConversionProhibited=TRUE
HomeServer=LONEXCHMB01
MailboxName=LoggedInUserName
OfflineFolderPath=outlook.ost
OSTEncryptionType=0x80000000
; By default, OAB files are placed in the Windows
; directory, so we shouldn't need the following line.
;
; OfflineAddressBookPath=


[Service4]
Ben=TRUE
;      --  Dummy property.  Do not delete or modify.

;Placeholder for service details
ServiceDetails




; ************************************************************************
; Section 4 - Mapping for profile properties.  DO NOT MODIFY.

; ************************************************************************
; Microsoft Outlook Client definitions

[Microsoft Outlook Client]
SectionGUID=0a0d020000000000c000000000000046

;********************  Tools|Options|General Settings
ConfirmOnDelete=PT_BOOLEAN,0x0111
;      -- A boolean value indicating whether or not to prompt before
;      deleting items

EmptyWastebasket=PT_BOOLEAN,0x0115
;      -- A boolean value indicating whether or not to empty the
;      wastebasket on exit.

FormDirectoryPage=PT_STRING8,0x0270
;
;

SelectEntireWord=PT_BOOLEAN,0x0118
;      -- A boolean value indicating whether or not to select entire
;      words when selecting.

;********************  Tools|Options|E-mail Settings
PlaySoundWhenNewMail=PT_BOOLEAN,0x023E
;      -- A boolean value indicating whether or not to play a sound when new mail arrives

ChangePointerOnNewMail=PT_BOOLEAN,0x023F
;      -- A boolean value indicating whether or not to change the mouse cursor on new mail

NotifyWithDialogOnNewMail=PT_BOOLEAN,0x0240
;      -- A boolean value indicating whether or not to show a dialog when new mail arrives.

;********************  Tools|Options|Sending Settings
DefaultPriority=PT_LONG,0x0140
;      -- The default priority to send mail with.
;      Possible values are shown below:
;      0 - Low
;      1 - Normal
;       2 - High

DefaultSensitivity=PT_LONG,0x014F
;      -- The default sensitivity to send mail with.
;      Possible values are shown below:
;      0 - Normal
;      1 - Personal
;      2 - Private
;      3 - Confidential

CommaAddressSeparator=PT_BOOLEAN,0x0350
;      -- A value indicating whether or not to include the comma as
;      an e-mail address separator

ComposeWithWebServices=PT_BOOLEAN,0x0272
;
;

AutoNameCheck=PT_BOOLEAN,0x0332
;      -- A value indicating whether or not to using AutoName Checking
;      when sending mail

GenDeliveryReceipt=PT_BOOLEAN,0x014C
;      -- A boolean value indicating whether or not to generate
;      a delivery receipt on sent mail.

GenReadReceipt=PT_BOOLEAN,0x0141
;      -- A boolean value indicating whether or not to generate
;      a read receipt on sent mail.

SaveSentMail=PT_BOOLEAN,0x0142
;      -- A boolean value indicating whether to save a copy of
;      sent messages in the sent items folder.

SaveRepliesWithOriginal=PT_BOOLEAN,0x0208
;      -- A boolean value indicating whether or not to save replies when sent

SaveForwards=PT_BOOLEAN,0x0205
;      -- A boolean value indicating whether or not to save forwards when sent

;********************  Tools|Options|Reading Settings

ReplyToMessage=PT_LONG,0x020E
-- Value indicating what should be done when replying to a message
Possible values are:
0 - Do not include original message
1 - Attach original message
2 - Include original message text
3 - Include and Indent original message text

ForwardMessage=PT_LONG,0x020D
-- Value indicating what should be done when forwarding a message
Possible values are:
1 - Attach original message
2 - Include original message text
3 - Include and Indent original message text

AddSigToNewMessage=PT_BOOLEAN,0x338
;      -- A boolean value indicating whether or not to include an auto sig. in a new message

AddSigToReplyMessage=PT_BOOLEAN,0x0339
;      -- A boolean value indicating whether or not to include an auto sig. in reply messages

AfterMoveMessage=PT_LONG,0x013B
;      -- Indicates what to do after moving or deleting a message.
;      Possible values are shown below:
;      0 - Open Next Message
;       1 - Return to Viewer
;       2 - Open Previous Message

MarkMyCommentsWith=PT_BOOLEAN,0x0319
;      -- A Boolean value indicating whether or not to use the mark comments with option

CloseOriginalMessage=PT_BOOLEAN,0x0132
;      -- A boolean value indicating whether or not to close the
;      original message after replying.

;********************  Tools|Options|AutoArchive Settings
DoAutoArchive=PT_BOOLEAN,0x0320
;      -- A value indicating whether or not to use the Outlook AutoArchive feature

PromptForAutoArchive=PT_BOOLEAN,0x0321
;      -- A value indicating whether or not to prompt when time for AutoArchive

PromptWhenUsingWebServices=PT_BOOLEAN,0x0273
;
DeleteExpiredMessages=PT_BOOLEAN,0x0322
;      -- A value indicating whether or not to delete expired messages in the folder

NumberOfDaysForAutoArchive=PT_LONG,0x0323
;      -- Indicates the number of days between AutoArchiving.

OpenWithWebServices=PT_BOOLEAN,0x0274
;

AutoArchiveFile=PT_STRING8,0x0324
;      -- A string representing the path to the autoArchive file.

;********************  Tools|Options|Calendar Settings
UseSchdPlus=PT_BINARY,0x032b
;      -- A Value indicating whether to use Schd+ as your primary e-mail calendar

WebServicesLocation=PT_STRING8,0x0271
;

RemoveSchdPlus=PT_BOOLEAN,0x344
;      -- A Value indicating whether to remove the Schd+ file.

NumberOfMonthsFB=PT_LONG,0x0330
; -- Number of months of Calendar data to publish to the server

FrequencyToPublishFB=PT_LONG,0x0331
; -- Frequency in seconds to publish Calendar data to server


; ************************************************************************
; Microsoft Exchange Server service definitions.

[Microsoft Exchange Server]
ServiceName=MSEMS
MDBGUID=5494A1C0297F101BA58708002B2A2517

MailboxName=PT_STRING8,0x6607
;      -- The name of the user's Exchange Server Mailbox

HomeServer=PT_STRING8,0x6608
;      -- The name of the Microsoft Exchange Server the user should
;      connect to.  You can specify any Microsoft Exchange Server
;      in your site, and the correct Home Server will be assigned
;      when the user first logs on.

OfflineFolderPath=PT_STRING8,0x6610
;       -- The path to the Offline Store File that contains
;       local replicas of the user's Mailbox and Favorites.
;       If you do not specify a value, no Offline Store will
;       be created.  If you specify a path, an Offline Store
;       will be created and the Inbox, Outbox, Deleted Items,
;       and Sent Items folders will be replicated to it.

OfflineAddressBookPath=PT_STRING8,0x660E
;      -- The path to the directory to store offline address
;      book files in.

ExchangeConfigFlags=PT_LONG,0x6601
;       -- Flags that control behavior when connecting to the Exchange
;       Server.
;       The following values are possible:
;       VALUE           RESULT
;       4               Normal
;       6               Ask whether to connect or work offline at startup.
;       12              Allow clients to be authenticated via the Internet
;       14              Combination of 6 and 12.

ConversionProhibited=PT_BOOLEAN,0x3A03
;       -- A boolean value indicating whether NEWPROF should
;       attempt to resolve the Exchange mailbox name at run time.
;       If set to TRUE, NEWPROF will copy the name to the profile
;       without resolving it.
;       If FALSE, the name will be resolved. Invalid server or
;       mailbox name will not be copied to the profile.

OSTEncryptionType=PT_LONG,0x6702
;      --  A value that designates the type of encryption that is used to
;          compress the data in the PST:
;
;          No Encryption              0x80000000
;          Compressable Encryption    0x40000000
;          Best Encryption            0x20000000

; ************************************************************************
; Microsoft Mail service definitions.

[Microsoft Mail]
ServiceName=MSFS

ServerPath=PT_STRING8,0x6600
;      --  The path to the users post office.  Mapped network drives, UNC and NETWARE paths
;          are acceptable.  NETWARE paths of the type NWServer/share:dir\dir1 are converted to
;          UNC paths of the type \\NWServer\share\dir\dir1.


Mailbox=PT_STRING8,0x6601
;      --  The users mailbox name.  eg. in a NET/PO/USER address,
;          this is USER.  The maximum mailbox name is 10 characters.

Password=PT_STRING8,0x67f0
;      --  The users mailbox password.  The maximum password is 8 characters.

RememberPassword=PT_BOOLEAN,0x6606
;      --  A boolean value indicating whether the users password is
;          to be remembered in the profile or not.  This is useful because
;          if the password is remembered the user can bypass the logon prompt
;          if his server path, mailbox name and password are all supplied.

ConnectionType=PT_LONG,0x6603
;      --  The connection type.  This may be one of CFG_CONN_AUTO, CFG_CONN_LAN,
;          CFG_CONN_REMOTE, CFG_CONN_OFFLINE as defined below.
;
;          0x0         --  LAN type connection.  Used to connect to the post office using a
;                          UNC path or pre-existing mapped drive.
;          0x1         --  Dial up connection using Dial-up Networking.
;          0x2         --  Not connected.
;          0x3         --  Automatically detect whether the connection type is LAN or REMOTE.
;                          This connection type is only available on Win95.

UseSessionLog=PT_BOOLEAN,0x6604
;      --  A boolean value indicating whether session logging
;          is on or off.

SessionLogPath=PT_STRING8,0x6605
;      --  The path to the session log file.

EnableUpload=PT_BOOLEAN,0x6620
;      --  A boolean value which indicates whether mail in the outbox
;          is sent.

EnableDownload=PT_BOOLEAN,0x6621
;      --  A boolean value which indicates whether mail in the server
;          mailbag is downloaded.

UploadMask=PT_LONG,0x6622
;      --  A bit array which allows the user to indicate which addresses
;          for which the transport is to attempt delivery.  This is useful
;          in order to allow a user to specify that a transport only handle
;          delivery for a subset of the addresses it can really process.
;          When multiple transports are installed and the user wants a
;          different transport to handle some specific address types they
;          can use this bit array to specify that the MSMAIL transport
;          only handle a specific set of addresses.
;
;          Possible values as defined below include:
;
;          0x00000001      --  Local Post Office and External Post Office address types
;          0x00000002      --  PROFS address types
;          0x00000004      --  SNADS address types
;          0x00000008      --  MCI address types
;          0x00000010      --  X.400 address types
;          0x00000040      --  FAX address types
;          0x00000080      --  MHS address types
;          0x00000100      --  SMTP address types
;          0x00000800      --  OfficeVision address types
;          0x00001000      --  MacMail address types
;          0x000019df      --  All of the above address types

NetBiosNotification=PT_BOOLEAN,0x6623

;      --  The polling interval in minutes when the transport
;          checks for new mail.  1 <=polling interval <= 9999

NewMailPollInterval=PT_STRING8,0x6624
;      --  A boolean value which indicates whether a netbios notification
;          is sent to a recipients transport when mail is delivered to
;          their server inbox.

DisplayGalOnly=PT_BOOLEAN,0x6625
;      --  A boolean value which, if TRUE, only displays the Microsoft Mail Global Address
;          list for name selection.  The Postoffice list, external post office lists, and gateway
;          address lists are not shown.

UseHeadersOnLAN=PT_BOOLEAN,0x6630
;      --  A boolean value which indicates whether the user wants to enable
;          headers while working on the LAN.  Headers mode allows the user
;          to download message headers and selectively choose which mail
;          to download.

UseLocalAdressBookOnLAN=PT_BOOLEAN,0x6631
;      --  A boolean value which indicates whether the user wants to use
;          name resolution based on a local copy of the server address book
;          rather than the server address book itself.

UseExternalToHelpDeliverOnLAN=PT_BOOLEAN,0x6632
;      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
;          to deliver submitted mail messages.  This is sometimes useful when mail is running
;          on a slow LAN connection.

UseHeadersOnRAS=PT_BOOLEAN,0x6640
;      --  A boolean value which indicates whether the user wants to enable
;          headers while working over a slow speed link.  Headers mode
;          allows the user to download message headers and selectively
;          choose which mail to download.

UseLocalAdressBookOnRAS=PT_BOOLEAN,0x6641
;      --  A boolean value which indicates whether the user wants to use
;          name resolution based on a local copy of the server address book
;          rather than the server address book itself.

UseExternalToHelpDeliverOnRAS=PT_BOOLEAN,0x6639
;      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
;          to deliver submitted mail messages.  This speeds up message delivery when mail is
;          running on a Dial-up network connection.

ConnectOnStartup=PT_BOOLEAN,0x6642
;      --  A boolean value which indicates that a Dial-up Network connection should
;          be established when the transport provider starts up.

DisconnectAfterRetrieveHeaders=PT_BOOLEAN,0x6643
;      --  A boolean value which indicates that a Dial-up Network connection should
;          be automatically terminated when headers are finished downloading.

DisconnectAfterRetrieveMail=PT_BOOLEAN,0x6644
;      --  A boolean value which indicates that a Dial-up Network connection should
;          be automatically terminated after mail has finished being sent
;          received.

DisconnectOnExit=PT_BOOLEAN,0x6645
;      --  A boolean value which indicates that a Dial-up Network connection should
;          be automatically terminated when the provider is exited.

DefaultDialupConnectionName=PT_STRING8,0x6646
;      --  The name of the Dial-up Network profile that the transport will use by
;          default to attempt the connection.

DialupRetryCount=PT_STRING8,0x6648
;      --  Number of times to attempt dial for connection.
;          1 <=retry attempts <= 9999

DialupRetryDelay=PT_STRING8,0x6649
;      --  Delay between retry attempts in seconds.
;          30 <=retry delay <= 9999


; ************************************************************************
; Personal Folders service definitions.

[Personal Folders]
ServiceName=MSPST MS

AliasServiceName=PT_STRING8,0x3001
;      -- Name which will appear in the profile service list and in the
;         Folder View.

Comments=PT_STRING8,0x3004
;      -- Text which will appear in the comments area of the service properties.

PathToPersonalFolders=PT_STRING8,0x6700
;      --  Path to personal folders.

RememberPassword=PT_BOOLEAN,0x6701
;      --  A boolean value that determines if the personal folders password
;          should be cached.

EncryptionType=PT_LONG,0x6702
;      --  A value that designates the type of encryption that is used to
;          compress the data in the PST:
;
;          No Encryption              0x80000000
;          Compressable Encryption    0x40000000
;          Best Encryption            0x20000000

Password=PT_STRING8,0x6703
;      --  PST password.


; ************************************************************************
; Personal Address Book service definitions.

[Personal Address Book]
ServiceName=MSPST AB

ABServiceName=PT_STRING8,0x3001

PathToPersonalAddressBook=PT_STRING8,0x6600
;      --  Path to personal address book.

ViewOrder=PT_LONG,0x6601
;      --  Determines if PAB entries are first, last, or last, first.
;      
;          first last                0
;          last, first               1


; ************************************************************************
; Outlook Address Book service definitions.

[Outlook Address Book]
ServiceName=CONTAB
Ben=PT_STRING8,0x6700
;      --  Dummy property.  Do not modify.

OABViewOrder=PT_BOOLEAN,0x6602
;      -- TRUE=Last, First
;         FALSE=First Last

; ************************************************************************
; Section 7 - Mapping for internet account properties.  DO NOT MODIFY.
; ************************************************************************

; Internet E-Mail service Settings/Definitions
; In a Corporate or Workgroup configuration, the only type of account that
; can be created is an I_MAIL (POP3) account. You can use settings from
; both the [Internet E-mail] and [I_Mail] sections below.
;

[Internet E-Mail]
ServiceName=IMAIL
; When creating an Internet E-Mail service, both AccountName and
; LongAccountName MUST BE specified!

AccountName=PT_STRING8,0x661f
; This should be exactly the same as the I_Mail AccountName
; property.

LongAccountName=PT_STRING8,0x3001
; This should be the " Internet E-mail - " + the AccountName
; property. For example, if AccountName="foo" this
; should be "Internet E-mail - foo"

[I_Mail]
; *****************************
; *** Mail Account Settings ***
; *****************************
; Configurable settings for POP3 (Corporate and Intenet Only configs)
; and IMAP (Internet Only config only) mail accounts

AccountName=PT_STRING8,0x1235
; The name of the account that appears in the Account List.

ConnectionType=PT_LONG,0x1239
; Values:
; 0 = Connect using local area network (LAN).
; 1 = Connect using Internet Explorer's or a 3rd party dialer.
; 2 = Connect using modem and the Dial-up Networking connection
;       specified in the Connectoid property.

Connectoid=PT_STRING8,0x123A
; Specify the existing Dial-up Networking connection to use.

; -----------------------------
; --- POP3 Account Settings ---
; -----------------------------

POP3Server=PT_STRING8,0x13C4
; Specifies the name of the POP3 server used for incoming messages.

POP3UseSicily=PT_BOOLEAN,0x13C8
; Set to 1 if you want to use Secure Password Authentication to logon
; to the POP3 server.

POP3LogonName=PT_STRING8,0x13C5
; If POP3UseSicily is turned on, this sets the name used to logon
; to the POP3 server.

POP3Port=PT_LONG,0x13C9
; Specfies the port number used to connect to the POP3 server.

POP3SSL=PT_BOOLEAN,0x13CA
; Set to 1 to use the SSL (Secure Sockets Layer) security protocal to
; connect to the POP3 server.

POP3TimeOut=PT_LONG,0x13CB
; Specifies how long to wait for a response for the server before
; stopping to attempt to send or receive messages. Possible values:
; 30 = 30 seconds
; 60 = 1 minute
; 90 = 1 minute 30 seconds
; 120 = 2 minutes
; 150 = 2 minutes 30 seconds
; 180 = 3 minutes
; 210 = 3 minutes 30 seconds
; 240 = 4 minutes
; 270 = 4 minutes 30 seconds
; 300 = 5 minutes

POP3LeaveOnServer=PT_BOOLEAN,0x13CC
; Set to 1 to store a copy of all sent and received messages on the
; POP3 server.

POP3RemoveExpired=PT_BOOLEAN,0x13CE
; If POP3LeaveOnServer is turned on, set to 1 to delete messages on
; the server after a specific number of days (see also
; POP3ExpireDays).

POP3ExpireDays=PT_LONG,0x13CF
; If POP3LeaveOnServer and POP3RemoveExpired are turned on, sets
; the number of days after which messages left on the server will
; be deleted.

POP3RemoveDeleted=PT_BOOLEAN,0x13CD
; This property is only supported on Outlook 98 (8.5)or higher! If
; you try to use it on Outlook 97 (8.0x) the account will not be
; created.
; If POP3LeaveOnServer is turned on, set to 1 to delete a message
; from the server when the message is deleted from the Deleted
; Items folder on the local machine.

; -----------------------------
; --- SMTP Account Settings ---
; -----------------------------

SMTPServer=PT_STRING8,0x1428
; Specifies the name of the SMTP server used for outcoming messages.

SMTPUseSicily=PT_LONG,0x142C
; Values:
; 0 = No server authentication required.
; 1 = Use Secure Password Authentication, or set SMTP server logon
;       name using SMTPLogonName.

SMTPLogonName=PT_STRING8,0x1429
; If SMTPUseSicily is set to 1, this sets the name used to logon to
; the SMTP server.

SMTPPort=PT_LONG,0x142D
; Specfies the port number used to connect to the SMTP server.

SMTPSSL=PT_BOOLEAN,0x142E
; Set to 1 to use the SSL (Secure Sockets Layer) security protocal to
; connect to the SMTP server.

SMTPTimeOut=PT_LONG,0x142F
; Specifies how long to wait for a response for the server before
; stopping to attempt to send or receive mail messages. Values are
;  the same as POP3TimeOut.

SMTPDisplayName=PT_STRING8,0x1430
; Specifies the  name associated with the email address.

SMTPOrgName=PT_STRING8,0x1431
; Specifies the group or organization.

SMTPEmailAddress=PT_STRING8,0x1432
; Specifies the email address. Must be in the format name@company

SMTPReplyAddress=PT_STRING8,0x1433
; Specifies that replies to outgoing email should be sent to this
; email address.

SMTPSplitMessages=PT_BOOLEAN,0x1434
; This property is only supported on Outlook 98 (8.5) or higher! If
; you try to use it on Outlook 97 (8.0x) the account will not be
; created.
; Set to 1 to break up outgoing messages, so that each message is
; smaller than the file size indicated by SMTPSplitSize.

SMTPSplitSize=PT_LONG,0x1435
; The maximum size, in KB, of a piece of a split message.
      
0
 

Author Comment

by:lambch0p
ID: 13420530
OK.

I've sorted this now.  I have a script that will look in a users home drive, find all the PSTs and the most recent PAB, then create an Outlook.PRF file with the correct details, then either call Modprof.exe (for Outlook 2000) or simply execute the PRF file (Outlook XP and 2003).  At the moment, when executing the PRF for XP and 2003, it is necessary to click 'Yes' to confirm the import of the PRF.  I will be attempting to find a way to do this silently.

If anyone wants a copy of the script, email me at ee<no_spam_here>@freakyfing.net, remove the <no_spam_here> bit.

M
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13428082
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Mailbox Overload?
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question