Page 1 of 1 1
Topic Options
#58285 - 2001-08-16 08:48 AM Outlook 2000 Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Don't know if this is original or not.

In Outlook 2000, if you login as a new user, there appears to be additional keys and values that need to be filled in before NEWPROF is run. Hopefully, this addresses this issue.

OLCFG.ZIP

It needs Fixprf.exe and Newprof.exe to complete.

Thanks!

- Kent

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

Top
#58286 - 2001-08-16 10:02 AM Re: Outlook 2000 Configuration
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well I've used newprof only solution and it works fine. it's not so fancy, but it does it's job fast.
problem that I've encountered thou, is when ppl do not have windows messaging installed on their system script crashes.
here is my so complex script, that does the job:
code:

$ = readvalue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles","DefaultProfile")
if @error
? ? " Ladataan sähköposti-asetukset palvelimelta..." sleep 2
$temp = readvalue("HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info","DefName")
$ = writevalue("HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info","DefName",@fullname,"reg_sz")
shell @ldrive+"Profiles\newprof.exe -P "+@ldrive+"Profiles\exchange.prf"
$ = writevalue("HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info","DefName",$temp,"reg_sz")
endif

pretty long, but is it enough if you check only for existenze on
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem
to know if the WMS is installed or not?

_________________________
!

download KiXnet

Top
#58287 - 2001-08-16 08:23 PM Re: Outlook 2000 Configuration
Kdyer Offline
KiX Supporter
*****

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

I have tried the Newprof and no dice.. It does seem to work well with OL97, and OL98.. OL2K is a pain in this regard.

Thanks,

- Kent

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

Top
#58288 - 2001-08-17 04:28 PM Re: Outlook 2000 Configuration
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Well, I hammered on the code and here it is!

Lonkero - What do you think?

code:

BREAK ON
CLS
; -- Outlook 2000 Configuration
; -- Kent Dyer
; -- 15 August 2001
; -- This completes the setup of Outlook
; -- Yes, you can use PROFGEN and FIXPRF, but these alone don't complete the setup
; -- They are, however necessary to complete this piece of the script
; -- Two options
; -- * Changes the view to get rid of the Outlook Bar and show the "Explorer View"
; -- * Checks the box to empty deleted items on leaving Outlook
; -- Company key needs to be changed to yours....
; -- Comments and feedback are welcome to - dyerkb@myrealbox.com

$hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE'
$hkcus = 'HKEY_CURRENT_USER\SOFTWARE'
$exserver = "EXCHANGESERVER"

$profilelocation = $hkcus+"\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
$personalprofilelocation = $profilelocation+"\"+@USERID

If 0 <> ExistKey($personalprofilelocation)

; -- Check for Outlook Version 9.x (Office 2000)
$exe=ReadValue($hklms+"\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE","")
$ver=GetFileVersion("$exe")

$verchk = SubStr ($ver, 1, 1)

If $verchk = "9" ; -- If it is Outlook 2000, configure the following keys and values

; -- CHECK FOR KEYS AND IF NEED BE, ADD THEM
If 0 <> ExistKey($hkcus+"\Software\Microsoft\Office\9.0")
$ = AddKey($hkcus+"\Software\Microsoft\Office\9.0")
EndIf

If 0 <> ExistKey($hkcus+"\Software\Microsoft\Office\9.0\Common")
$ = AddKey($hkcus+"\Software\Microsoft\Office\9.0\Common")
EndIf

If 0 <> ExistKey($hkcus+"\Software\Microsoft\Office\9.0\Common\UserInfo")
$ = AddKey($hkcus+"\Software\Microsoft\Office\9.0\Common\UserInfo")
EndIf

If 0 <> ExistKey($hkcus+"\Software\Microsoft\Office\9.0\Outlook")
$ = AddKey($hkcus+"\Software\Microsoft\Office\9.0\Outlook")
EndIf
If 0 <> ExistKey($hkcus+"\Software\Microsoft\Office\9.0\Outlook\Office Explorer")
$ = AddKey($hkcus+"\Software\Microsoft\Office\9.0\Outlook\Office Explorer")
EndIf

; -- NEW KEYS

; -- Company

$ = WriteValue($hkcus+"\Software\Microsoft\Office\9.0\Common\UserInfo","Company","0000000000000000000000000000000000000000000000000000000000000000000000000","REG_BINARY")

; -- Changes the view to get rid of the Outlook Bar and show the "Explorer View"
$ = WriteValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook\Office Explorer","Frame","010000002c0000000200000003000000ffffffffffffffffffffffffffffffff62000000270000003c030000ac02000001000000000000000100000000000000c00000006400000003000000","REG_BI NARY")

; -- Set the Machine Name
If @WKSTA <> ReadValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","Machine Name")
$ = WriteValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","Machine Name",@WKSTA,"REG_SZ")
EndIf

; -- Check Internet E-Mail Accounts
If 1 <> ReadValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","CheckInternetAccounts")
$ = WriteValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","CheckInternetAccounts","1","REG_DWORD")
EndIf

; -- Has Outlook been Setup?
If "False" <> ReadValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","FirstRunDialog")
$ = WriteValue($hkcus+"\Software\Microsoft\Office\9.0\Outlook","FirstRunDialog","False","REG_SZ")
EndIf
EndIf

; -- Now that we have created the appropriate Keys and Registry Values, Let's Generate the user's Profile
IF 1 <> EXIST("%windir%\PROFGEN.exe")
COPY @ldrive+"\Profgen\PROFGEN.EXE" "%windir%"
ENDIF
IF 1 <> EXIST("%windir%\ChkExchg.exe")
COPY @ldrive+"\Profgen\ChkExchg.exe" "%windir%"
ENDIF
IF 1 <> EXIST("%windir%\NEWPROF.EXE")
COPY @ldrive+"\Profgen\NT\NEWPROF.EXE" "%windir%"
ENDIF
IF 1 <> EXIST("%windir%\FixPrf.exe")
COPY @ldrive+"\Profgen\FixPrf.exe" "%windir%"
ENDIF
IF 1 <> EXIST(%userprofile%+"\WINNT.PRF")
COPY @ldrive+"\Profgen\NT\Winnt.prf" "%userprofile%"
ENDIF

; -- Set a Variable to be used for the PRF File
$winntfile = "%UserProfile%\Winnt.prf"

; -- If we open WINNT.PRF in a TEXT Editor,
; -- we notice that it structured the same as an INI file

$profilename = READPROFILESTRING($winntfile,"General","ProfileName")

IF $profilename <> "@userid" OR $profilename = "$USERNAME$"
$ = WRITEPROFILESTRING($winntfile,"General","ProfileName",Chr(37)+"username"+Chr(37))
ENDIF

IF $exserver <> READPROFILESTRING($winntfile,"Service2","HomeServer")
$ = WRITEPROFILESTRING($winntfile,"Service2","HomeServer",$exserver)
ENDIF

$mailboxname = READPROFILESTRING($winntfile,"Service2","MailboxName")

IF $mailboxname <> "@userid" OR $mailboxname = "$USERNAME$"
$ = WRITEPROFILESTRING($winntfile,"Service2","MailboxName",Chr(37)+"username"+Chr(37))
ENDIF

; -- If the userid exists, we don't want to mess with it
IF 0 = EXISTKEY( $personalprofilelocation )
RETURN
ENDIF

; -- If it does not exist, delete out any odd-ball Profiles
; -- Like OEM user, etc.
$index = 0
:loop3
$keyname = ENUMKEY($profilelocation, $index)
IF @error = 0
;? "Name found: $KeyName" ; -- Uncomment for debugging
; -- Going to check for @userid
IF $keyname <> @userid OR $keyname <> "Sales"
$rc = DELTREE($profilelocation+"\"+$keyname)
;$RC = DELKEY($ProfileLocation, $KeyName)
$index = $index + 1
GOTO Loop3
ENDIF
ENDIF

; -- Generate the Inbox
; -- Make sure you use PUTINENV.EXE and WINSET.EXE with 9x machines - We need to have the %USERNAME% available
; -- "Secondary Inbox" is an alternate to keep
$returncode= EXISTKEY($personalprofilelocation) OR EXISTKEY($profilelocation+"\Secondary Inbox")
;?$ReturnCode ; -- Uncomment for debugging
IF $returncode <> 0
;Edit the copied mail profile to make it the userid.
;run "%WINDIR%\fixpatch.exe @USERID"
;The quotes here are important with Windows 2000 Machines as the user profile is
;under \DOCUMENTS AND SETTTINGS\USERID and KIX appears to not like spaces in file/folder names
RUN '%WINDIR%\Fixprf.exe "%UserProfile%\Winnt.prf" @userid @userid $ExServer'
; -- Had to add a small pause
SLEEP 1
RUN '%WINDIR%\Newprof.exe -p "%UserProfile%\Winnt.prf" -x'
;If you want to use PROFGEN, uncomment the next line and comment the one for FIXPRF.EXE
;RUN '%WINDIR%\PROFGEN.EXE %WINDIR%\NEWPROF.EXE -P "%UserProfile%\WINNT.PRF" @userid -r -l'

;Write new default mail profile based on USERID
;Had to add a small pause for this next step
SLEEP 1
$ = writevalue($profilelocation, "DefaultProfile", @userid, "REG_SZ")

ENDIF

; -- Check for the Default profile, if it does not exist, create it
IF @userid <> READVALUE( $profilelocation, "DefaultProfile" )
$ = WRITEVALUE ($profilelocation, "DefaultProfile", @userid, "REG_SZ")
ENDIF

; -- Check the box to empty deleted items on leaving Outlook - Now the we have the Outlook Profile Generated
IF "0100" <> READVALUE($hkcus+"\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\@USERID\0a0d020000000000c000000000000046","000b0115")
$ = WRITEVALUE($hkcus+"\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\@USERID\0a0d020000000000c000000000000046","000b0115","0100","REG_BINARY")
ENDIF

RETURN
ELSE
RETURN
ENDIF


Cheers!

- Kent

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

Top
Page 1 of 1 1


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

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

Generated in 0.054 seconds in which 0.028 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