Thanks Mart for the reply let me give you both pieces, I am using Glenn's script but alsotrying to use yours that work just not both together so here goes....my login.ini which is used by Glenn's kixxtart file:

 Code:
[CreateOutlookProfile]
CLASS=COMMAND
PATH=\\dpcserver02\netlogon\outlook.kix
METHOD=call


Mart's code with embellishments ( I am still messing with and have alot commented out right now:

 Code:

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


;If  $olpath <> ""

         ;If NOT Exist (@LSERVER + "\" + "users\" + @USERID + "\outlook.prf")
                                          
           ; configure outlook profile

    ;Get outlook version
Select
	Case Left($olversion, 2) = "11"
		;Outlook 2003
            	;Copy @LDRIVE + "outlook2003.prf" @HOMESHR + "\" + @USERID + "\outlook.prf"
                 Copy @LDRIVE + "outlook2003.prf" + " " @LSERVER + "\" + "users\" + @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", @LSERVER + "\" + "users\" + @USERID + "\outlook.prf", "REG_SZ")
	Case Left($olversion, 2) = "12"
		;Outlook 2007
		;Copy @LDRIVE + "outlook2007.prf" @HOMESHR + "\" + @USERID + "\outlook.prf"
                Copy @LDRIVE + "outlook2007.prf" + " " @LSERVER + "\" + "users\" + @USERID + "\outlook.prf"
		$rc = DelValue("HKCU\Software\Microsoft\Office\12.0\Outlook\Setup", "First-Run")
		$rc = WriteValue("HKCU\Software\Microsoft\Office\12.0\Outlook\Setup", "ImportPRF", @LSERVER + "\" + "users\" + @USERID + "\outlook.prf", "REG_SZ")
EndSelect
          ;EndIf
;Else
	; do nothing.
;EndIf

It's the first 2 variables that it is having problems with, either one gives me:
 Code:
error undefined variable [olversion]!
or
error undefined variable [olpath]!


I'm not sure about the SETOPTION, i've been reading through Glenn's documentation buit nothing has jumped out at me. Thanks.


Edited by biscuit (2008-09-28 10:15 PM)