We don't just use one version of outlook
. 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
.
[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.