Page 1 of 1 1
Topic Options
#43669 - 2003-08-03 09:36 PM Outlook 2000 Profile
Anonymous
Unregistered


I've been trying to the script that Kent Dyer posted to work for my school. The script appears to be working however it only creates the users profile, I have to go back and manually create the information service before the outlook client will connect to our exchange 5.5 server. I'm using the full version of the script. Does anyone have any suggestions as to how I can have the script go ahead and add the correct information service. Any suggestions will be greatly appreciated.

Thanks

[ 03. August 2003, 21:38: Message edited by: cholbrook ]

Top
#43670 - 2003-08-05 07:22 AM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Charles,

Please find Exchange Configuration - KiX 3.63+ required updated as well as the code-rewrite version (my bad). The code re-write version is to be more in-line with the current versions of KiXtart.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43671 - 2003-08-06 11:06 PM Re: Outlook 2000 Profile
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Cholbrook:

For testing I did this once or twice. should have the code somewhere. I'll get back to you tomorrow.

Today is a little bit past 11:00pm in my hometown and about 35 degrees [Razz] (don’t know the English word for it, it's not Fahrenheit but the other one) with broken air-conditioning. So I need to go home and get some sleep now, did enough work for today.

At the time I used progs like newprof and prfpatch. It worked for Outlook 97 and 2000. Currently we use XP. XP seriously dislikes newprof (Dr. Watson allover the place [Big Grin] ), you should use a registry setting telling outlook XP to import a .prf file from somewhere.

Will get back to you tomorrow.

[ 06. August 2003, 23:08: Message edited by: R2D2 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#43672 - 2003-08-07 01:41 AM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
R2D2,

I have been in e-mail contact with Mr. Holbrook and it was determined that he had a commented out line in his PRF file. Once the commented out line was remedied, the script worked fine.

Thanks.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43673 - 2003-08-07 10:05 AM Re: Outlook 2000 Profile
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Ok, thanx. No need to post any possible solution then.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#43674 - 2003-08-07 01:44 PM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Sure, go ahead and post it..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43675 - 2003-08-07 05:15 PM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
The following lines in the PRF file were commented out -

code:
[Microsoft Exchange Server]
ServiceName=MSEMS
MDBGUID=5494A1C0297F101BA58708002B2A2517

MailboxName=PT_STRING8,0x6607
; -- The name of the user's Exchange Server Mailbox

HomeServer=PT_STRING8,0x6608

Once he uncommented these, there were no further issues.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43676 - 2003-08-09 08:14 AM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
R2D2,

Do you have an alternative solution?

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43677 - 2003-08-09 03:03 PM Re: Outlook 2000 Profile
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
External requirements:

  • newprof.exe (creates the new profile)
  • prfpatch.exe (resolves the variables used in .prf file)
Should be available at MS if not just ask.
code:
;SetConsole ("HIDE")

? "** Starting Automatic MS Outlook Profile Creation..."
? "** Checking if Outlook is installed..."
$1 = Exist ("c:\program files\microsoft office\office\outlook.exe")
If ($i1 = 1) Goto Check_Profile
Else
? "** Outlook is NOT installed, skipping to end of script..."
Goto End
;
:Check_Profile
? "** Checking if userprofile exists..."
$2 = Exist ("%userprofile%\application data\microsoft\outlook\%username%.fav")
If ($2 = 0) Goto Copy_Profile
else
? "** Outlook profile found... skipping to end of script..."
Goto End

:Copy_Profile
? "** Copying Default Outlook Profile..."
Select
Case Ucase(@HOMESHR) = "\\nt1\users"
Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_rotterdam.prf " + "%windir%\outlook.prf > NUL"
Case Ucase(@HOMESHR) = "\\amssvr01\users"
Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_amsterdam.prf " + "%windir%\outlook.prf > NUL"
EndSelect
? "** Creating new Outlook profile based on current user..."
Shell "%COMSPEC% /E:1024 /C " + @LDRIVE + "prfpatch.exe"
Shell "%COMSPEC% /E:1024 /C " + @LDRIVE + "newprof.exe -p %windir%\outlook.prf"
:end

As you can see in the script I use two prf files. This is because of the locations we have and some deferent settings for them. The prf files are created with the custom installation wizard included in the office resource kit.
As I earlier said the nbewprof.exe can be used on outlook XP (2002). I checked with Microsoft and they confirmed it.

When using Outlook XP you should create or set the ImportPRF key in HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\setup to the path where the processed prf file is located.

[ 09. August 2003, 15:07: Message edited by: R2D2 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#43678 - 2003-08-10 01:41 AM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Some comments..

Your script checks to see if Oulook is installed.. It generates the profiles, etc. With the code and the code re-write of the one that I have in the FAQ, detects which version (maybe a moot point with only one version installed on the client systems) and then generates the profile. I have also tried to go away from the GOTO/GOSUB methods and use detection to go to the section needed. In fact, with the code re-write there is more use of Functions. However, in the original version, the use of a CASE Statement is used.. IIRC, I only use NEWPROF.EXE as we make a number of modifications to the PRF before the profile is generated. If Outlook XP/2003 is detected, NEWPROF.EXE is not used.

Back to the point about one version of Outlook.. If you have only one version, I could trim my version down quite a bit. Thanks also go out to Anthony Harper, who, has helped with the PRF settings needed rather than "reg hacks" as I was doing.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43679 - 2003-08-10 09:44 AM Re: Outlook 2000 Profile
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
We don't just use one version of outlook [Frown] . Currently we use 97, 2000 and xp.
The script that calls to outlook profile script checks to see if WinNT4 or Win2K is installed. Our WinNT4 systems all have outlook 97 or 2000 installed and the Win2K systems all have XP installed.
The script for 97 and 2000 are the same only for xp I made some modifications for not using newprof.

We are replacing the last old systems with new ones running Win2K and Office XP so the script for 97 and 2000 are almost end of life [Big Grin] .

[edit]
Added script for XP.
Just a little change to the 97/2000 script.
[/edit]

code:
;SetConsole ("HIDE")
;
? "** Starting Automatic MS Outlook Profile Generation..."
? "** Checking if Outlook is installed..."
$1 = Exist ("c:\program files\microsoft office\office10\outlook.exe")
If ($1 = 1) Goto Check_Profile
else
? "** Outlook is NOT installed, skipping to end of script..."
Goto End

:Check_Profile
? "** Checking if outlook userprofile exists..."
$2 = Exist ("%userprofile%\application data\microsoft\outlook\%username%.fav")
$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\setup", "ImportPRF", "%HOMESHARE%\outlook.prf", "REG_SZ")

If ($2 = 0) Goto Copy_Profile
else
? "** Outlook profile found... skipping to end of script..."
Goto End

:Copy_Profile
? "** Copying Default Outlook Profile..."
Select
Case Ucase(@HOMESHR) = "\\NT1\USERS"
Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_rot_xp.prf " + "%windir%\outlook.prf > NUL"
Case Ucase(@HOMESHR) = "\\AMSSVR01\USERS"
Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_ams_xp.prf " + "%windir%\outlook.prf > NUL"
EndSelect
? "** Creating new Outlook profile based on current user..."
Shell "%COMSPEC% /E:1024 /C " + @LDRIVE + "prfpatch.exe"

$source = %WINDIR%
$dest = @HOMESHR

Select
Case Ucase(@HOMESHR) = "\\NT1\USERS"
Shell "%COMSPEC% /E:1024 /C COPY " + $source + "\outlook.prf " + "\\NT1\users\"+ @USERID
Case Ucase(@HOMESHR) = "\\AMSSVR01\USERS"
Shell "%COMSPEC% /E:1024 /C COPY " + $source + "\outlook.prf " + "\\AMSSVR01\users\"+ @USERID
EndSelect

$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\setup", "ImportPRF", "%HOMESHARE%\outlook.prf", "REG_SZ")

:End



[ 10. August 2003, 09:56: Message edited by: R2D2 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#43680 - 2003-08-10 06:06 PM Re: Outlook 2000 Profile
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think we can clean up (simplify?) the script with the follwoing (no SHELL needed for COPY, and no GOTO/GOSUBS) -
code:
 ;SetConsole ('HIDE')
;
? '** Starting Automatic MS Outlook Profile Generation...'
? '** Checking if Outlook is installed...'
IF Exist ('c:\program files\microsoft office\office10\outlook.exe')
? '** Checking if outlook userprofile exists...'
IF 0=Exist('%userprofile%\application data\microsoft\outlook\'+@USERID+'.fav')
$rc = WriteValue('HKCU\Software\Microsoft\Office\10.0\Outlook\setup','ImportPRF',@HOMESHR+'\outlook.prf','REG_SZ')
? '** Copying Default Outlook Profile...'
SELECT
CASE
Ucase(@homeshr)='\\NT1\USERS'
COPY @ldrive+'olp_rot_xp.prf' '%windir%\outlook.prf'
CASE
Ucase(@homeshr)='\\AMSSVR01\USERS'
COPY @ldrive+'olp_ams_xp.prf' '%windir%\outlook.prf'
ENDSELECT
? '** Creating new Outlook profile based on current user...'
SHELL '%COMSPEC% /E:1024 /C ' + @ldrive + 'prfpatch.exe'

SELECT
CASE
Ucase(@homeshr)='\\NT1\USERS'
COPY $source+'\outlook.prf' '\\NT1\users\'+@userid
CASE
Ucase(@homeshr)='\\AMSSVR01\USERS'
COPY $source+'\outlook.prf' '\\AMSSVR01\users\'+@userid
ENDSELECT
$rc = WriteValue('HKCU\Software\Microsoft\Office\10.0\Outlook\setup','ImportPRF',@homeshr+'\outlook.prf','REG_SZ')
ELSE
? '** Outlook profile found... skipping to end of script...'
RETURN
ENDIF
ELSE
? '** Outlook is NOT installed,skipping to end of script...'
RETURN
ENDIF

I still think we can incorporate the changes that Anthony Harper was kind enough to provide will help too.. If you look at my code re-write, it does this "compartmentalized" or using functions to do this. Sure, it is more extensive or has more code, but covers the needs. [Smile]

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#43681 - 2003-08-10 10:43 PM Re: Outlook 2000 Profile
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
I agree.
Your rewrite of the script is a lot more readable and looks more efficient.

[saving my own ass mode [Smile] ]
Actually this script is written by an ex coworker (he was the sysadmin at the time). Don’t know why he didn’t use the kix copy. I altered the script later on for use with outlook xp and for a temporary extra office we had (removed in the posted script).
[/saving my own ass mode]

We started out with kix 3.49 (I think [Confused] ) some time ago. I actually never looked at the "old" scripts for changes using new kix functions. Maybe I should take a look at all the old scripts for a little rewrite. Currently testing a kixform for processing our logon script, maybe I’ll post it if testing is ok and done.

Thanks for the comments, I’ll test your rewrite on our test systems tomorrow.

[ 10. August 2003, 22:54: Message edited by: R2D2 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.063 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org