Yeah a mix of outlook XP (2002) or up and 2000 can be a pain the the …… well you know where right?

I fixed this with a simple piece of script doing one thing for 2K and an other thing for 2K3.

 Code:
$olpath = ReadValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE", "Path")
$olversion = GetFileVersion($olpath + "outlook.exe", "ProductVersion")

;Region Create Outlook profile
;Set profile to import
Select
	Case Left($olversion, 2) = "9."
		;Outlook 2000
		Shell @LDRIVE + "\newprof.exe -p " + @LDRIVE + "\Outlook2000.prf"
	Case Left($olversion, 2) = "11"
		;Outlook 2003
		Copy @LDRIVE + "\outlook2003.prf" @HOMESHR + "\" + @USERID + "\outlook.prf"
		$rc = DelValue("HKCU\Software\Microsoft\Office\11.0\Outlook\Setup", "First-Run")
		$rc = WriteValue("HKCU\Software\Microsoft\Office\11.0\Outlook\Setup", "ImportPRF", @HOMESHR + "\" + @USERID + "\outlook.prf", "REG_SZ")
	Case Left($olversion, 2) = "12"
		;Outlook 2007
		Copy @LDRIVE + "\outlook2007.prf"
		$rc = DelValue("HKCU\Software\Microsoft\Office\12.0\Outlook\Setup", "First-Run")
		$rc = WriteValue("HKCU\Software\Microsoft\Office\12.0\Outlook\Setup", "ImportPRF", @HOMESHR + "\" + @USERID, "REG_SZ")
EndSelect
;Endregion
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.