@echo off

cls

 

 

REM ***************************************************

REM REQUIRED COMPONENTS

REM ***************************************************

REM

REM

REM      guiecho.exe

REM      IFMEMBER.EXE

REM      Office2000_Install.bat

REM      REG.EXE

REM      setregit.bat

REM      spacecheck.exe

REM      yes.txt

REM      yesnobox.exe

REM

REM

 

 

 

 

REM ***************************************************

REM CONFIG SECTION

REM ***************************************************

 

set o2k_TRANSFORM=\\yourserver\pcapps\office2k\CDA_Rollout.MST

set o2k_INST_LOG=\\yourserver\maintlog$\office.2k\%COMPUTERNAME%.txt

 

set o2k_BATPATH=\\yourserver\pcapps\bat\o2k

set o2k_KIT_DIR=\\yourserver\pcapps\office2k

set o2k_SPACE_NEEDED=400

 

REM ***************************************************

REM MAIN BODY

REM ***************************************************

 

set o2k_BAILED_OUT=YES

set o2k_SPACE_ERR_FLAG=NO

set o2k_ADMIN_ERR_FLAG=NO

set o2k_SCRIPT_OK=YES

 

%o2k_BATPATH%\yesnobox "To continue you must close all applications (ESPECIALLY ANTI-VIRUS SOFTWARE)....... CONTINUE ??" "Office 2000 Setup"

if errorlevel 1 goto o2k_theend

set o2k_BAILED_OUT=NO

 

 

%o2k_BATPATH%\spacecheck %SystemDrive%\ %o2k_SPACE_NEEDED%

if errorlevel 1 set o2k_SPACE_ERR_FLAG=YES

if %o2k_SPACE_ERR_FLAG%==YES set o2k_SCRIPT_OK=NO

 

%o2k_BATPATH%\ifmember Administrators

if not errorlevel 1 set o2k_ADMIN_ERR_FLAG=YES

if %o2k_ADMIN_ERR_FLAG%==YES set o2k_SCRIPT_OK=NO

 

 

if %o2k_SCRIPT_OK%==NO goto o2k_ERROR1

 

 

 

REM Registry Tweeks - Must be an admin to edit some of these entries

call %o2k_BATPATH%\setregit hklm\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Hidden 1 reg_dword

call %o2k_BATPATH%\setregit hkcu\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\LinkResolveIgnoreLinkInfo 1 reg_dword

call %o2k_BATPATH%\setregit "hkcu\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\RunLogonScriptSync" 1 reg_dword

 

 

REM Removing Office 97 Shortcuts

if exist "%SystemRoot%\Profiles\All Users\Start Menu\Programs\Office97" rd "%SystemRoot%\Profiles\All Users\Start Menu\Programs\Office97" /s <%o2k_BATPATH%\yes.txt >nul

 

 

 

REM Running TreeCleaner on U:\PCAPPS\OFFICE97 dir

REM Running TreeCleaner on U:\PCAPPS\OFFICE95 dir

 

 

cls

@echo.

@echo Office Setup has started.....This will take 10-30min.....Please Wait

@echo.

 

start /d%o2k_KIT_DIR% /wait %o2k_KIT_DIR%\SETUP.EXE TRANSFORMS=%o2k_TRANSFORM% /wait /qb+

 

start /wait "%SystemDrive%\Program Files\Outlook Express\msimn.exe" /reg

 

 

 

goto o2k_theend

 

 

 

 

:o2k_ERROR1

cls

@echo.

if %o2k_SPACE_ERR_FLAG%==YES %o2k_BATPATH%\guiecho "Setup Failed: Insufficient Disk Space" "Office 2000 Setup"

if %o2k_ADMIN_ERR_FLAG%==YES %o2k_BATPATH%\guiecho "Setup Failed: You must be a Workstation Administrator" "Office 2000 Setup"

goto o2k_theend

 

 

:o2k_theend

@echo %USERNAME%        %COMPUTERNAME%         %o2k_BAILED_OUT%          %o2k_SPACE_ERR_FLAG%            %o2k_ADMIN_ERR_FLAG%           %o2k_SCRIPT_OK%>%o2k_INST_LOG%