Link to home
Start Free TrialLog in
Avatar of spacelabsit
spacelabsit

asked on

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
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

>  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""")
Avatar of spacelabsit
spacelabsit

ASKER

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.
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
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
> 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
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

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
ASKER CERTIFIED SOLUTION
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nice work this works just fine.  Thanks for pointing me in the right direction.
|