Create fully automated Outlook profile at user first time logon to the windows

Hi experts, I do have one scenario and its quite urgent...

I have one email address, that to be act as a notification email from Outlook.

The thing is we need to have Outlook fully setup with profile and password when an user log in.

I have done the prf and plan to have it fired with VB script when user logon(using windows logon startup script function).

The prf can be successfully fired and its created profile in outlook, however the user credentials logon will be prompted everytime the user log on, and the user will not know the password, except us, email administrator.

This is carried out in

- Azure Windows server 2012

- Outlook 2013

- And the user will not access remotely to the server, they will only access to RDP, which we hosted our application.

(And the mentioned application will need to send some notification email to the users.

I hope i have not missed out anything. Anyone please shed some light for this.

Your help is appreciated !


  • Edited by Zyn Xeng Monday, April 13, 2015 4:16 PM
April 13th, 2015 4:15pm

Hi Melon,

Thanks for quick reply !

Yes. I have setup prf file and not able to store any password in it. Our user will have to type in the password in the prompted windows. The thing is we are not exposing the password to the user. In fact, they are not able to view the windows screen as they are only connect to RDP application.

Now we are using Exchange account and soon we will migrate our email server to Office 365.

VB Script as something below (which i downloaded from online resources) :

----------------------------------------------------------------------------------------------

'Name:  
'CreateOutlookProfile.vbs
'
'Author: 
'Jack (Aka "IT Guy")
'
'Purpose: 
'This script searches under HKCU in the registry for an Outlook profile 
'with the specified name. If the profile is present, the script terminates. 
'If a matching profile is not found, the script launches Outlook with the
'/importprf switch, and imports a custom .prf file from the path specified
'to create the profile.
'
'Prereqs: 
'You must first create a .prf file with the custom settings required for
'your environment using either the Custom Installation Wizard included 
'in the Office XP/2003 Resource Kit Tools, or the Office Customization
'Tool (OCT) included with volume-licensed editions of Office 2007/2010.
'In Many environments, Office 2003 is the lowest common denominator, so prf
'files created with the 2003 CIW should be used, to ensure compatibility
'with all Outlook clients. (XP/2003 prf files are compatible with 2007/2010)
'
'License:
'You are free to use this code for personal or commercial purposes. No 
'attribution is required, though it is always appreciated! The only thing
'I ask is that you do not re-post this on another website, but rather post
'a link to my blog (http://AdmiNuggets.blogspot.com) instead. Furthermore, 
'I offer no warranty or guarantee of functionality with this script, meaning 
'that you are responsible for any negative or unintended effects it may have 
'on the environment in which it is executed. DO NOT USE THIS SCRIPT if you do 
'not agree to realease me (the author) from all liability associated with its use. 
'Thanks!
'
'--------------------------------------------------------------------------------------
'*******SPECIFY THE PROFILE NAME TO BE USED, AND PATH TO YOUR CUSTOM PRF BELOW:********
'--------------------------------------------------------------------------------------
PRFLocation = "D:\NetLogon\Azure\AzureNotificationOutlook.prf"         
ProfileName = "AzureNotificationEmail"
'--------------------------------------------------------------------------------------

Set WshShell = CreateObject("WScript.Shell")
HKCUprofile = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\" & ProfileName & "\"

If Not ProfileIsPresent Then 
 ImportPRF
End if

Cleanup

Function ProfileIsPresent
 On Error Resume Next
 ProfileKey = WshShell.RegRead(HKCUprofile)
   If Err <> 0 Then
    ProfileIsPresent = False
    Err.Clear
   Else
     ProfileIsPresent = True
    End If
End Function

Sub ImportPRF
    WshShell.Run "outlook.exe /embedding /importprf " & PRFLocation, 1, False
End Sub


Call CloseOutlook()
Public Sub CloseOutlook()
 Dim objOutlook
 Set objOutlook = CreateObject("Outlook.Application")
 objOutlook.Quit
End Sub

Sub Cleanup
 Set WshShell = Nothing
End Sub

Best Regards,

Zyn Xeng


  • Edited by Zyn Xeng Wednesday, April 15, 2015 9:10 AM
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2015 9:10am

Maybe Autodiscover along with NTLM authentication can be helpful in your scenario.

-Jeff

April 20th, 2015 10:57pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics