Initialize Outlook 2007 unattended

Status
Not open for further replies.
J

JRV529088

We have a WS2008 R2 RDS session host farm we use to host RemoteApps; primarily, a CRM application that uses MAPI to send e-mails. Outlook 2007 is installed on the RDSH's, but most will never use Outlook itself from the RDSH except via the MAPI interface from the CRM app--and we'd prefer to keep it that way.

When a user first logs on, Outlook's first run has not occurred. And until the first OL run, the CRM app times out trying to send e-mail.

What I'd LIKE to do (via Group Policy logon script) is check for the first-run reg value during logon, and if it's not cleared, launch the 1st run wizard, let OL auto-config with the Exchange server, and then exit without ever actually launching Outlook.

Ideally, I'd like the user to be totally unaware of any of this. Failing that, as few dialogs and user interaction as possible. But definitely without launching Outlook.

Possible?
 
J

Jahawk

Hi!

Why not push Outlook profiles via PRF file, so that an Outlook profile could be laid down on the machine already configured with the user's Exchange account configured?

In a scenario where a PRF is being deployed, you actually have to remove the first-run\first run keys in order to deploy successfully.

You could use the OCT (Office Customization Tool) to create an Outlook 2007 PRF file that would have the user"s name and Exchange Server configured? Then all you would need to is deploy the PRF to the workstations. I would think a login script would be the best way to deploy the PRF to the machine. Once the profile has been imported onto the machine, you wouldn"t need to run the PRF again.

http://technet.microsoft.com/en-us/library/cc179062.aspx --Gives a good explanation on how to import the PRF after it"s created.

http://office.microsoft.com/en-us/ork2003/HA011403051033.aspx --Link to the actual whitepaper on PRF customization and deployment

Hope that helps!

Jahawk MSFT
 
J

JRV529088

Thanks...PRF files are not needed; we're using Autodiscover. We used PRF files with OL2003 and prior; I know all about those, too. But either way, until Outlook has been run the first time, whether PRF or Autodiscover, this program can't use MAPI to send messages...period.

So as per original post, I need a way to launch OL automatically at the 1st logon, and as unattended as possible...I can't seem to get rid of the RSS prompt even with the Group Policy setting that disables it, and to my knowledge, there's no way to pre-fill the user's full name and initials.

An editorial, not that it matters: Office should query the full name from AD and calculate the initials by default, and provide a group policy that bypasses the dialog box. I've never understood why it uses the username. And I've almost never seen a user that actually types their full name; they leave the username, type their initials and click OK!
 
J

Jahawk

Yep, PRF won't work in your case. You'd have to do something like push the PRF to the machine (deleting first-run\firstrun keys first), then launch Outlook and let it complete loading, then kill the process. -->Could you script something like that? Probably. Push the PRF via windows logon script. Push an exe or macro or script to the workstation that would launch Outlook --have a timer wait sufficiently long enough for Outlook to complete loading, then kill the Outlook.exe process. That would probably be no problem to do, but you'd necessarily want to have Online mode profiles. --So you wouldn't have to wait out the full-sync to the OST file.

Anyways, maybe you can use a different track and programmatically create the profile? Or use something like profman or newprof? Take a look at this article and see if it will do what you need to accomplish.

http://support.microsoft.com/kb/306962

As for the RSS prompt you're seeing even with the GPO to turn off RSS: What's the prompt you are seeing?

You may need to disable " Synchronize Outlook RSS Feeds with Common Feed List" --SyncToSysCFL DWORD " 0" in addition to " Turn off RSS feature" - Disable DWORD " 1" .

Hope that helps!

Jahawk MSFT
 
J

JRV529088

The " Synchonize Outlook RSS Feeds with Common Feed List" policy was the one I missed. Thanks!

Here's the VB Script I ended up with which inits MAPI before the user tries to send e-mail from the CRM application. Adapted from scripts I found elsewhere, combined, and sorta cleaned up. When it's run as a Group Policy Logon Script, it's invisible. Only thing it doesn't do is enter the MS Office full name & initials. IIRC from my VBA days, that's possible to do, but it's not needed for the CRM software to send e-mail. User gets prompted for that 1st time they run any Office app. I might add that refinement to version 2.0.

This is a WS2008 R2 RDS server, so Outlook works online by default. I've not tried it with Cached Mode, but it should still work; OL doesn't need to d/l the whole mailbox to be able to send a message by MAPI.

Hope this helps a lurker.

'Begin InitMapiProfile.vbs-------------
Const LOCAL_APPLICATION_DATA = &H1c&
strComputer = " ."

WScript.Echo " InitMAPIProfile script launched."

' Create objects
set objShell = CreateObject(" WScript.Shell" )
Set objShellApp = CreateObject(" Shell.Application" )
Set objFSO = CreateObject(" Scripting.FileSystemObject" )

strPRF = <INSERT FULL PATH TO PRF FILE HERE>
'Outlook already configured?
Set objFolder = objShellApp.Namespace(LOCAL_APPLICATION_DATA)
Set objFolderItem = objFolder.Self
strLocalAppDataPath = objFolderItem.Path
strDirectory = strLocalAppDataPath & " \Microsoft\Outlook"

If Not objFSO.FolderExists(strDirectory) Then 'not configured
WScript.Echo strDirectory & " doesn't exist. Initializing MAPI using" & strPRF
objShell.Run Chr(34) & " Outlook.exe" & _
Chr(34) & " /importprf " & strPRF,0,False
Else
WScript.Echo strDirectory & " exists; skipping MAPI init."
End If

'wait while Outlook inits
While Not objFSO.FolderExists(strDirectory)
WScript.Sleep 500
Wend
WScript.Sleep 5000

'now close it
Set objWMIService = GetObject(" winmgmts:" _
& " {impersonationLevel=impersonate}!\\" _
& strComputer & " \root\cimv2" )

Set colProcess = objWMIService.ExecQuery _
(" Select * from Win32_Process Where Name Like 'Outlook.exe'" )
WScript.Echo " Closing OUtlook."
For Each objProcess in colProcess
objProcess.Terminate()
Next

'End InitMapiProfile.vbs---------------
 
Status
Not open for further replies.
Top