How can I get Outlook 2003 profiles onto computer without outlook starting, ready for a migration?

My company is migrating its mail system from Domino / Lotus Notes 6.5.5 to Exchange / Outlook 2003.  I am tasked with the client part of this migration, so far i have done the following.  I created an Office 2003 admin install point on my network and also an individual Outlook 2003 admin install point (so I can send to remotes on CD once working).  I have applied SP3 to both install points without issue.  I then wanted to customise my install to certain components so usinf Office 2003 Resource kit I used Cutom Installation Wizard.  I then created a MST file and can now successfully install a custom version of both Office and Outlook with SP3 which is great so far.  I have also created a software package to be installed by computer GPO and all works fine.

My problem is that within the MST file I have asked it to create a new profile for Outlook but this does not happen. So as an alternative I have a PRF file that I can double click on, however Microsoft say you can run an outlook.exe /importprf \\path of file.prf but this open Outlook and is not ideal.  I have worked out how to use a reg file to delete FirstRun and First-Run in the registry then input the import prf command if double clicked.  Basically I need to be able to get this reg file run on computers so that when I run outlook for the first time on a computer i get my profile.  It needs to be invisible but be dormant on a machine until i do the migration at some point soon.  Does anyone know of a way to either run a vbs script or something that will get this reg file in place?  Or how i can get the PRF imported silently without any using interaction? I have put my reg file contacts below and run manually then do the job but i don't want the user to click ok to merge and then click Ok when successful.  So i understand regedit /s path of reg file works but how can i automate this maybe? Also attached a simple attempt at my vbs and that does nothing.
Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup]
"ImportPRF"="\\\\servername\\ENGOffice2003Pro\\AdminInstallPoint\\Outlook.prf"
 
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup]
"FirstRun"=-
"First-Run"=-

Open in new window

ScreenHunter-03-Nov.-13-11.07.jpg
spacelabsitAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vadim RappCommented:
>  Does anyone know of a way to either run a vbs script or something that will get this reg file in place?

if you are going to eventually deploy the installation by group policy, then specify this script as logon script of this policy.

Though, I'd think that even if the script runs prematurely, before Outlook is deployed, it wouldn't harm anything. If you want, you can put in the script a condition - run regedit only when ImportPRF value does not exist yet.

>  Also attached a simple attempt at my vbs and that does nothing.
make sure there's space after /s ; also if the real path has spaces, it has to be in double double quotes:

wshshell.run("regedit.exe /s ""my long path\aaa.reg""")
spacelabsitAuthor Commented:
I have already installed outlook manually to about 80% of users in Europe within my company, we did this manually so install no problem.   We need to just work on something to get the reg file to be imported quietly so there is a profile in all the installed outlooks ready for when we do the migration and double click to open outlook for the first time. Needs to be a seperate step.
spacelabsitAuthor Commented:
Also if this vbs works i can just add to a user section of the Gpo i assume?  I can try this now and let you know
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

spacelabsitAuthor Commented:
Ok I added the vbscript just supplied (shown below provided by vadimrapp1) to the user logon script in the user section of a GPO.  I applied this GPO and checked and still outlook did not work.  I checked and the user (Mickey Mouse)got the script.  I also double clicked the reg file from the location specified and the user has rights and it did what it was meant to.  So appears the GPO worked, reg file works but the vbs script did not run.  I will add a number of screen shots to show my findings.
Are the user keys possible to change from within a user GPO, hellp!
This is driving me mad now. :-)
Set wshShell = WScript.CreateObject("WScript.Shell")
wshshell.run("regedit.exe /s ""\servername\Outlook2003\AdminInstallPoint\DeleteRunFirstandImportPRF.reg""")

Open in new window

Outlook-registry-entries-default.jpg
Outlook-registry-entries-after-I.jpg
Rsop-showing-script-being-picked.jpg
Vadim RappCommented:
> This is driving me mad now. :-)

understood. Add 2nd backslash before servername in the command.

By the way, it's even easier than regedit /s to

wshshell.regwrite {key1},{value1}
wshshell.regwrite {key2},{value2}

right in the script. See http://msdn.microsoft.com/en-us/library/yfdfhz1b(VS.85).aspx
spacelabsitAuthor Commented:
Hi, thanks so far for all your help very much appreciated.  I am pretty new to vbs and wondered if you would please write a vbs with all the correct command needed for me to run.

I have attached my reg file that works, it adds an entry to current user then deletes 2 from current user .
Thanks so much so far


Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup]
"ImportPRF"="\\\\uk-hrt-dc-01\\ENGOffice2003Pro\\AdminInstallPoint\\Outlook.prf"
 
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup]
"FirstRun"=-
"First-Run"=-

Open in new window

spacelabsitAuthor Commented:
Ok I had a go and tried the snippet of code attached, (first attempt at regdelete and write.  

Seems to get my import key in which is great but got an error which i have put in as a file attachment.  It wont delete First-run is now by problem.  Do i need something to say if this does not exist close?  


Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")
 
WshShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPRF", "\\uk-hrt-dc-01\ENGOffice2003Pro\AdminInstallPoint\Outlook.prf", "REG_SZ"
WshShell.RegDelete "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\FirstRun"
WshShell.RegDelete "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run"

Open in new window

Script-error.jpg
Reg-after-running-new-script.jpg
Vadim RappCommented:
put on error resume next in the beginning

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
spacelabsitAuthor Commented:
Nice work this works just fine.  Thanks for pointing me in the right direction.
spacelabsitAuthor Commented:
|
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.