[THIN] Re: MAPI profile generation

  • From: "Carl Stalhood" <cstalhood@xxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Tue, 15 Aug 2006 18:32:04 -0500

Here's a modified version of code I found on this list:

 

on error resume next

Set oShell = WScript.CreateObject("WScript.Shell")

 

' Don't run if profile has already been created

oShell.RegRead "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\DefaultProfile"

 

if err.number <> 0 then

  oShell.RegDelete
"HKCU\Software\Microsoft\Office\11.0\Outlook\setup\First-Run"

  oShell.RegWrite
"HKCU\Software\Microsoft\Office\11.0\Outlook\setup\importPRF","c:\windows\ou
tlook.prf", "REG_SZ"

  oShell.RegWrite
"HKCU\Software\Microsoft\Office\11.0\Outlook\UserData","1","REG_DWORD"

 

  set oOutlook=CreateObject("Outlook.Application")

  set oNS=oOutlook.GetNamespace("MAPI")

  set oFolder=oNS.GetDefaultFolder(olFolderInbox)

end if

 

  _____  

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf
Of BRUTON, Malcolm, GBM
Sent: Tuesday, August 15, 2006 2:47 AM
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] MAPI profile generation

 

Guys

 

Asked this  a few years back but hoping things have moved on a bit.

 

Anyone got and nice clean ways to generate MAPI profiles for users.

 

Wish to do this in a logon script.  We have a few apps which need to send
email but users may not have access to outlook.

 

We currently uses the importprf switch with outlook 2002 but of course this
means outlook is launched (well we hide it and kill it a bit later).

 

Looking for something like profgen or newprof but obviously to support the
modern office products. (XP and above)

 

Malcolm

 
****************************************************************************
*******
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorized and regulated by the Financial Services Authority 
 
This e-mail message is confidential and for use by the 
addressee only. If the message is received by anyone other 
than the addressee, please return the message to the sender 
by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The 
Royal Bank of Scotland plc does not accept responsibility for 
changes made to this message after it was sent. 
 
Whilst all reasonable care has been taken to avoid the 
transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this 
message and any attachments will not adversely affect its 
systems or data. No responsibility is accepted by The Royal 
Bank of Scotland plc in this regard and the recipient should carry 
out such virus and other checks as it considers appropriate. 
Visit our websites at: 
http://www.rbos.com
http://www.rbsmarkets.com 
****************************************************************************
*******

Other related posts: