We help IT Professionals succeed at work.

Any script that can configure the Outlook with the logged in name

190 Views
Last Modified: 2010-04-16
Hi,

Any script that can configure the Outlook with the logged in name.And at the end prompt for a pst location.

Any this can be done with a script.
Office 2003
Win Xp
Win 2003

Regards
Sharath

Comment
Watch Question

Hi Sharath,

Use this link to create the outlook profile

http://www.outlook-tips.net/howto/prf.htm

Script below can be use to create the profile only once
'Scripts starts here
Option Explicit
On Error Resume Next


' Dim Our Variables
Dim objShell, objOutlook
Dim sFRKey, sFRSearch, sOutlookVersion

' Create Outlook object and Shell object

set objOutlook = CreateObject("Outlook.Application")
set objShell = CreateObject("WScript.Shell")

' Determine Which version client is using before moving on

if objOutlook.Version >= "11.0" And objOutlook.version <= "11.1" Then
sOutlookVersion = "11.0"
End If

if objOutlook.Version >= "10.0" And objOutlook.version <= "10.1" Then
sOutlookVersion = "10.0"
End If

if objOutlook.Version >= "9.0" And objOutlook.version <= "9.1" Then
sOutlookVersion = "9.0"
End If

if objOutlook.Version >= "8.0" And objOutlook.version <= "8.1" Then
sOutlookVersion = "8.0"
End If

'Strings
sFRKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\"
sOutlookVersion & "\Outlook\Setup\First-Run"
'Search for it
sFRSearch = objShell.RegRead(sFRKey)


' Does key exist?
If err <> 0 Then
'Wscript.Echo "PRF is being Imported"
objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\"
sOutlookVersion & "\Outlook\Setup\ImportPRF", "\\DCserver1\NETLOGON
\Outlook\Outlook.prf", "REG_SZ"
objShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\"
sOutlookVersion & "\Outlook\Setup\First-Run"
objShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\"
sOutlookVersion & "\Outlook\Setup\FirstRun"
Else
'Wscript.Echo "PRF exists"
End if


' Clean up
set objShell = Nothing
set objOutlook = Nothing

Hope this helps.......

Author

Commented:
Chandru is this a Vbs file and should i change anything  in the script..
You need to have a prf file in the shared location and then save the code as a vbs script

Author

Commented:
Chandru i just went through the microsoft site regarding Prf. Can you help creating one and do you have any already made...
I think there is an example one which you can download and modify. Let me have a look and see what are the parameters required.

Author

Commented:
Ok Chandru
Did you try this?

Author

Commented:
I checked but no improvement.Can you help...
Can you let me know what you tried?

Author

Commented:
Chandru i followed this page.

http://www.outlook-tips.net/howto/prf.htm

What i dont understand is
What can this help...
Create a file then?
All my settings will be stored how can i user this to setup a different profile.

Author

Commented:
Chandru i used this
Custom Installation Wizard
And created the Mst file now how do i run it...
New Custom Setup File.MST

Author

Commented:
Hi Got it.

I created a Mst file and when i use this

\\machinename\foldername\setup.exe TRANSFORMS="\\indiasophos\c$\New Custom Setup File.MST" /qb-

I am able to get the profile autoconfigured.
When i login to the machine i get outlook configured but how do i run just the mst file as Office is already installed in these machines and i just need to configure them.
What does the ablove script do?

Author

Commented:
How can i use a UNC path

\\Machinename\foldename\setup.exe TRANSFORMS="Machinename\foldenam"\New Custom Setup File.MST" /qb-


I get an error.Cannot find the path.

Can we use a UNC path to fetch the MST file
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
I would prefer the above method as we do in our office, if not please try the link below

http://www.windowsitpro.com/Articles/ArticleID/93351/93351.html?Ad=1

Author

Commented:
Chandru thanks i shall look into this any update on the excel user creation
Still didn't start working on that. Hopefully tonight i will work on this as i have to setup exchange to test this

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.