Kixtart and Exchange - David you around?
#1
Scooby Regular
Thread Starter
Join Date: Oct 2001
Location: Lovely Lancing in West Sussex
Posts: 3,449
Likes: 0
Received 0 Likes
on
0 Posts
Kixtart and Exchange - David you around?
Does anyone have an experience of setting up Outlook 2003 to automatically point to an Exchange Server.
I've created the prf file (to create connection to Exchange Server) which works fine if launched manually. It does not however take the logon name. Which I understand.
What I have been trying to do is make the Kix script calling teh prf file ot insert and vairables. Here is the script so far
; Configuration to connect Outlook 2003 to Exchange 2003 in Brighton
DIM $profile_remove,$deleteitems,$explorview,$editorpr ef,$prf,$serverloc,$exchangeserver,$ushefolders,$u serwinkey,
$machinewinkey,$mofckey,$uofckey,$profilelocation, $scriptdir,$profiledir,$prffile,$ppru,$mses,$exe,$ ver,$verchk,$idx,$keyname
$profile_remove='Yes' ; Remove All other Outlook profiles under current user
$deleteitems='No'; Empty Outlooks Deleted Items Folder on Exit
$explorview='Yes' ; Outlook Explorer View 'Yes' or Standard View 'No'
$editorpref='30001' ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf=OutlookSetUpBrighton.prf' ; PRF file to configure Outlook 2003 to point at Brighton Exchange Server
;$serverloc=@lserver+'\Netlogon\Profgen\Outlook200 0' ; Outlook Executables files location
$exchangeserver=Serverxxx ; Hostname of Brighton Exchange Server
$ushefolders='HKCU\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders'
$userwinkey='HKCU\Software\Microsoft\Windows'
$machinewinkey='HKLM\Software\Microsoft\Windows'
$mofckey='HKLM\Software\Microsoft\Office\'
$uofckey='HKCU\Software\Microsoft\Office\'
IF @inwin=1 ;Windows NT/2k/XP/2003
$profilelocation=$userwinkey+' NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
ENDIF
Darren
I've created the prf file (to create connection to Exchange Server) which works fine if launched manually. It does not however take the logon name. Which I understand.
What I have been trying to do is make the Kix script calling teh prf file ot insert and vairables. Here is the script so far
; Configuration to connect Outlook 2003 to Exchange 2003 in Brighton
DIM $profile_remove,$deleteitems,$explorview,$editorpr ef,$prf,$serverloc,$exchangeserver,$ushefolders,$u serwinkey,
$machinewinkey,$mofckey,$uofckey,$profilelocation, $scriptdir,$profiledir,$prffile,$ppru,$mses,$exe,$ ver,$verchk,$idx,$keyname
$profile_remove='Yes' ; Remove All other Outlook profiles under current user
$deleteitems='No'; Empty Outlooks Deleted Items Folder on Exit
$explorview='Yes' ; Outlook Explorer View 'Yes' or Standard View 'No'
$editorpref='30001' ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf=OutlookSetUpBrighton.prf' ; PRF file to configure Outlook 2003 to point at Brighton Exchange Server
;$serverloc=@lserver+'\Netlogon\Profgen\Outlook200 0' ; Outlook Executables files location
$exchangeserver=Serverxxx ; Hostname of Brighton Exchange Server
$ushefolders='HKCU\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders'
$userwinkey='HKCU\Software\Microsoft\Windows'
$machinewinkey='HKLM\Software\Microsoft\Windows'
$mofckey='HKLM\Software\Microsoft\Office\'
$uofckey='HKCU\Software\Microsoft\Office\'
IF @inwin=1 ;Windows NT/2k/XP/2003
$profilelocation=$userwinkey+' NT\CurrentVersion\Windows Messaging Subsystem\Profiles'
ENDIF
Darren
Last edited by darlodge; 23 June 2005 at 12:45 PM.
#2
Scooby Regular
Thread Starter
Join Date: Oct 2001
Location: Lovely Lancing in West Sussex
Posts: 3,449
Likes: 0
Received 0 Likes
on
0 Posts
I think I might have cracked it. I'd put ' instead of ". Double Doh.
Darren
Darren
Last edited by darlodge; 23 June 2005 at 12:50 PM.
#3
Scooby Regular
Thread Starter
Join Date: Oct 2001
Location: Lovely Lancing in West Sussex
Posts: 3,449
Likes: 0
Received 0 Likes
on
0 Posts
Nope, still not working yet,
I've got the rest of the code sorted and ammended now but it still does not work.
This is the whole script. It does not error at all and running it in debug mode makes no difference.
;csmagroup domain Outlook settings Script on BHTDC01
; Configuration to connect Outlook 2003 to Exchange 2003 in Brighton
DIM $profile_remove,$deleteitems,$explorview,$editorpr ef,$prf,$serverloc,$exchangeserver,$ushefolders,$u serwinkey,$machinewinkey,$mofckey,$uofckey,$profil elocation,$scriptdir,$profiledir,$prffile,$ppru,$m ses,$exe,$ver,$verchk,$idx,$keyname
$profile_remove='Yes' ; Remove All other Outlook profiles under current user
$deleteitems='No'; Empty Outlooks Deleted Items Folder on Exit
$explorview='Yes' ; Outlook Explorer View 'Yes' or Standard View 'No'
$editorpref='30001' ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf=OutlookSetUpBrighton.prf' ;PRF file to configure Outlook 2003 to point at Brighton Exchange Server
$serverloc=lserver\Netlogon\
$exchangeserver=ServerXXX ;Hostname of Brighton Exchange Server
$ushefolders="HKCU\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders"
$userwinkey="HKCU\Software\Microsoft\Windows"
$machinewinkey="HKLM\Software\Microsoft\Windows"
$mofckey="HKLM\Software\Microsoft\Office\"
$uofckey="HKCU\Software\Microsoft\Office\"
IF @inwin=1 ;Windows NT/2k/XP/2003
$profilelocation=$userwinkey+" NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
ENDIF
$scriptdir=split("%WINDIR%",":")[0]+":\Scripts"
$prffile=$scriptdir+"\"+$prf
$ppru=$profilelocation+"\"+@userid
$mses=$profilelocation+"\MS Exchange Settings"
$exe=ReadValue($machinewinkey+"\CurrentVersion\App Paths\OUTLOOK.EXE",")
$ver=GetFileVersion($exe)
$verchk=SPLIT($ver,".")[0]
IF 0=Exist($scriptdir)
MD $scriptdir
ENDIF
IF KeyExist($ppru) OR KeyExist($mses)
RETURN
ELSE
COPY $serverloc+"\"+$prf $scriptdir
PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
IF $profile_remove="YES"
$idx=0
$keyname=EnumKey($profilelocation,$idx)
WHILE @error=0
IF $keyname<>@userid $rc=DelTree($profilelocation+"\"+$keyname)
ENDIF
$idx=$icx+1
$keyname=EnumKey($profilelocation,$idx)
LOOP
ENDIF
SELECT
CASE
$verchk=8 or $verchk=9 ;(e.g. 8.5.5104.0)
OUTLOOK8AND9($verchk+'.0',$scriptdir,$prffile,$mof ckey,$uofckey,$serverloc,$explorview,$profilelocat ion)
RETURN
CASE
$verchk=10 or $verchk=11 ;(e.g. 10.0.2627.1)
OUTLOOK10AND11($verchk+'.0',$uofckey,$prffile,$exp lorview)
RETURN
ENDSELECT
ENDIF
ENDFUNCTION
; -- OUTLOOK BRANCHOUT FOR OUTLOOK XP/2003 - ALL
FUNCTION OUTLOOK10AND11($vers,$uofckey,$prffile,$explorview )
DIM $rc,$expview
$rc=DelValue($uofckey+$vers+"\Outlook\Setup","Firs t-Run")
$rc=WriteValue($uofckey+$vers+"\Outlook\Setup","Im portPRF",$prffile,"REG_SZ")
SLEEP 1
;If '196610'<>ReadValue($uofckey+$vers+"\Outlook\Optio ns\Mail","EditorPreference")
; $rc=WriteValue($uofckey+$vers+"\Outlook\Options\Ma il","EditorPreference","196610","REG_DWORD")
;EndIf
;$pltextfont="3c0000000f0000e800000040c80000000600 000000000000002056657264616e6100020000000000000000 "
;$pltextfont=$pltextfont+"0000000000201a493a38e907 0001000000"
;$rc=WriteValue($uofckey+$vers+"\Outlook\Preferenc es","TextFontSimple",$pltextfont,"REG_BINARY")
IF $explorview="Yes"
$expview="010000002c0000000200000003000000ffffffff ffffffffffffffffffffffff2c0000002c00000084"
$expview=$expview+"020000dc01000001000000000000000 100000000000000c0000000640000001800000003000000"
$rc=WriteValue($uofckey+$vers+"\Outlook\Office Explorer","Frame",$expview,"REG_BINARY")
ENDIF
IF $vers="10.0"
$rc=WriteValue($uofckey+$vers+"\Outlook\IM","Enabl ed",0,"REG_DWORD")
ENDIF
ENDFUNCTION
; -- OUTLOOK PROFILE SETTINGS - ALL >> USED FOR OUTLOOK CONFIGURATION
FUNCTION PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
DIM $rc
; Custom Profile Settings
IF @userid<>ReadProfileString($prffile,"General","Pro fileName")
$rc=WriteProfileString($prffile,"General","Profile Name",@userid)
ENDIF
IF "Yes"<>ReadProfileString($prffile,"General","Defau ltProfile")
$rc=WriteProfileString($prffile,"General","Default Profile","Yes")
ENDIF
IF "Yes"<>ReadProfileString($prffile,"General","Overw riteProfile")
$rc=WriteProfileString($prffile,"General","Overwri teProfile","Yes")
ENDIF
IF $exchangeserver<>ReadProfileString($prffile,"Servi ce2","HomeServer")
$rc=WriteProfileString($prffile,"Service2","HomeSe rver",$exchangeserver)
ENDIF
IF @userid<>ReadProfileString($prffile,"Service2","Ma ilboxName")
$rc=WriteProfileString($prffile,"Service2","Mailbo xName",@userid)
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Aut oNameCheck")
$rc=WriteProfileString($prffile,"Service1","AutoNa meCheck","TRUE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Co nfirmOnDelete")
$rc=WriteProfileString($prffile,"Service1","Confir mOnDelete","FALSE")
ENDIF
IF $deleteitems="YES"
IF "TRUE"<>ReadProfileString($prffile,"Service1","Emp tyWastebasket")
$rc=WriteProfileString($prffile,"Service1","EmptyW astebasket","TRUE")
ENDIF
ELSE
IF "FALSE"<>ReadProfileString($prffile,"Service1","Em ptyWastebasket")
$rc=WriteProfileString($prffile,"Service1","EmptyW astebasket","FALSE")
ENDIF
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Re moveSchdPlus")
$rc=WriteProfileString($prffile,"Service1","Remove SchdPlus","FALSE")
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Sel ectEntireWord")
$rc=WriteProfileString($prffile,"Service1","Select EntireWord","TRUE")
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Clo seOriginalMessage")
$rc=WriteProfileString($prffile,"Service1","CloseO riginalMessage","TRUE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Ge nReadReceipt")
$rc=WriteProfileString($prffile,"Service1","GenRea dReceipt","FALSE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Ge nDeliveryReceipt")
$rc=WriteProfileString($prffile,"Service1","GenDel iveryReceipt","FALSE")
ENDIF
IF "True"<>ReadProfileString($prffile,"Service1","Sav eSentMail")
$rc=WriteProfileString($prffile,"Service1","SaveSe ntMail","True")
ENDIF
IF "No"<>ReadProfileString($prffile,"General","Backup Profile")
$rc=WriteProfileString($prffile,"General","BackupP rofile","No")
ENDIF
ENDFUNCTION
Darren
I've got the rest of the code sorted and ammended now but it still does not work.
This is the whole script. It does not error at all and running it in debug mode makes no difference.
;csmagroup domain Outlook settings Script on BHTDC01
; Configuration to connect Outlook 2003 to Exchange 2003 in Brighton
DIM $profile_remove,$deleteitems,$explorview,$editorpr ef,$prf,$serverloc,$exchangeserver,$ushefolders,$u serwinkey,$machinewinkey,$mofckey,$uofckey,$profil elocation,$scriptdir,$profiledir,$prffile,$ppru,$m ses,$exe,$ver,$verchk,$idx,$keyname
$profile_remove='Yes' ; Remove All other Outlook profiles under current user
$deleteitems='No'; Empty Outlooks Deleted Items Folder on Exit
$explorview='Yes' ; Outlook Explorer View 'Yes' or Standard View 'No'
$editorpref='30001' ; Editor Preference 10001=Plain Text, 20001=HTML, and 30001=Rich Text
$prf=OutlookSetUpBrighton.prf' ;PRF file to configure Outlook 2003 to point at Brighton Exchange Server
$serverloc=lserver\Netlogon\
$exchangeserver=ServerXXX ;Hostname of Brighton Exchange Server
$ushefolders="HKCU\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders"
$userwinkey="HKCU\Software\Microsoft\Windows"
$machinewinkey="HKLM\Software\Microsoft\Windows"
$mofckey="HKLM\Software\Microsoft\Office\"
$uofckey="HKCU\Software\Microsoft\Office\"
IF @inwin=1 ;Windows NT/2k/XP/2003
$profilelocation=$userwinkey+" NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
ENDIF
$scriptdir=split("%WINDIR%",":")[0]+":\Scripts"
$prffile=$scriptdir+"\"+$prf
$ppru=$profilelocation+"\"+@userid
$mses=$profilelocation+"\MS Exchange Settings"
$exe=ReadValue($machinewinkey+"\CurrentVersion\App Paths\OUTLOOK.EXE",")
$ver=GetFileVersion($exe)
$verchk=SPLIT($ver,".")[0]
IF 0=Exist($scriptdir)
MD $scriptdir
ENDIF
IF KeyExist($ppru) OR KeyExist($mses)
RETURN
ELSE
COPY $serverloc+"\"+$prf $scriptdir
PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
IF $profile_remove="YES"
$idx=0
$keyname=EnumKey($profilelocation,$idx)
WHILE @error=0
IF $keyname<>@userid $rc=DelTree($profilelocation+"\"+$keyname)
ENDIF
$idx=$icx+1
$keyname=EnumKey($profilelocation,$idx)
LOOP
ENDIF
SELECT
CASE
$verchk=8 or $verchk=9 ;(e.g. 8.5.5104.0)
OUTLOOK8AND9($verchk+'.0',$scriptdir,$prffile,$mof ckey,$uofckey,$serverloc,$explorview,$profilelocat ion)
RETURN
CASE
$verchk=10 or $verchk=11 ;(e.g. 10.0.2627.1)
OUTLOOK10AND11($verchk+'.0',$uofckey,$prffile,$exp lorview)
RETURN
ENDSELECT
ENDIF
ENDFUNCTION
; -- OUTLOOK BRANCHOUT FOR OUTLOOK XP/2003 - ALL
FUNCTION OUTLOOK10AND11($vers,$uofckey,$prffile,$explorview )
DIM $rc,$expview
$rc=DelValue($uofckey+$vers+"\Outlook\Setup","Firs t-Run")
$rc=WriteValue($uofckey+$vers+"\Outlook\Setup","Im portPRF",$prffile,"REG_SZ")
SLEEP 1
;If '196610'<>ReadValue($uofckey+$vers+"\Outlook\Optio ns\Mail","EditorPreference")
; $rc=WriteValue($uofckey+$vers+"\Outlook\Options\Ma il","EditorPreference","196610","REG_DWORD")
;EndIf
;$pltextfont="3c0000000f0000e800000040c80000000600 000000000000002056657264616e6100020000000000000000 "
;$pltextfont=$pltextfont+"0000000000201a493a38e907 0001000000"
;$rc=WriteValue($uofckey+$vers+"\Outlook\Preferenc es","TextFontSimple",$pltextfont,"REG_BINARY")
IF $explorview="Yes"
$expview="010000002c0000000200000003000000ffffffff ffffffffffffffffffffffff2c0000002c00000084"
$expview=$expview+"020000dc01000001000000000000000 100000000000000c0000000640000001800000003000000"
$rc=WriteValue($uofckey+$vers+"\Outlook\Office Explorer","Frame",$expview,"REG_BINARY")
ENDIF
IF $vers="10.0"
$rc=WriteValue($uofckey+$vers+"\Outlook\IM","Enabl ed",0,"REG_DWORD")
ENDIF
ENDFUNCTION
; -- OUTLOOK PROFILE SETTINGS - ALL >> USED FOR OUTLOOK CONFIGURATION
FUNCTION PRFSETTINGS($prffile,$exchangeserver,$deleteitems)
DIM $rc
; Custom Profile Settings
IF @userid<>ReadProfileString($prffile,"General","Pro fileName")
$rc=WriteProfileString($prffile,"General","Profile Name",@userid)
ENDIF
IF "Yes"<>ReadProfileString($prffile,"General","Defau ltProfile")
$rc=WriteProfileString($prffile,"General","Default Profile","Yes")
ENDIF
IF "Yes"<>ReadProfileString($prffile,"General","Overw riteProfile")
$rc=WriteProfileString($prffile,"General","Overwri teProfile","Yes")
ENDIF
IF $exchangeserver<>ReadProfileString($prffile,"Servi ce2","HomeServer")
$rc=WriteProfileString($prffile,"Service2","HomeSe rver",$exchangeserver)
ENDIF
IF @userid<>ReadProfileString($prffile,"Service2","Ma ilboxName")
$rc=WriteProfileString($prffile,"Service2","Mailbo xName",@userid)
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Aut oNameCheck")
$rc=WriteProfileString($prffile,"Service1","AutoNa meCheck","TRUE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Co nfirmOnDelete")
$rc=WriteProfileString($prffile,"Service1","Confir mOnDelete","FALSE")
ENDIF
IF $deleteitems="YES"
IF "TRUE"<>ReadProfileString($prffile,"Service1","Emp tyWastebasket")
$rc=WriteProfileString($prffile,"Service1","EmptyW astebasket","TRUE")
ENDIF
ELSE
IF "FALSE"<>ReadProfileString($prffile,"Service1","Em ptyWastebasket")
$rc=WriteProfileString($prffile,"Service1","EmptyW astebasket","FALSE")
ENDIF
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Re moveSchdPlus")
$rc=WriteProfileString($prffile,"Service1","Remove SchdPlus","FALSE")
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Sel ectEntireWord")
$rc=WriteProfileString($prffile,"Service1","Select EntireWord","TRUE")
ENDIF
IF "TRUE"<>ReadProfileString($prffile,"Service1","Clo seOriginalMessage")
$rc=WriteProfileString($prffile,"Service1","CloseO riginalMessage","TRUE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Ge nReadReceipt")
$rc=WriteProfileString($prffile,"Service1","GenRea dReceipt","FALSE")
ENDIF
IF "FALSE"<>ReadProfileString($prffile,"Service1","Ge nDeliveryReceipt")
$rc=WriteProfileString($prffile,"Service1","GenDel iveryReceipt","FALSE")
ENDIF
IF "True"<>ReadProfileString($prffile,"Service1","Sav eSentMail")
$rc=WriteProfileString($prffile,"Service1","SaveSe ntMail","True")
ENDIF
IF "No"<>ReadProfileString($prffile,"General","Backup Profile")
$rc=WriteProfileString($prffile,"General","BackupP rofile","No")
ENDIF
ENDFUNCTION
Darren
Last edited by darlodge; 23 June 2005 at 03:05 PM.
Thread
Thread Starter
Forum
Replies
Last Post
Danny0608
Subaru
6
27 September 2015 02:16 PM
alcazar
Non Scooby Related
5
18 September 2015 11:49 PM