Jump to content

Pack Office 2003 Service Packs and Updates into one installer


JoeMSFN

Recommended Posts

I noticed most of the slipstreaming of Office updates requires and Admin install point. AFAIK that is totally useless if you don't have some kind of enterprise edition or corporate edition type disc (whatever the term is).

Well I have had to chain a lot of updates and got sick of it, so I used IExpress to make little installers. That got very tedious (especially before SP3 for Office 2003 :wacko: ).

I wish I would have done this before, but I was bored and determined and cranked out this little bit of .CMDery

Make a folder and call it what you wish. Something like "Office Update Maker" (hereafter called ROOT)

Within that, make two folders (inside ROOT, not within eachother)

@echo off
setlocal enableextensions enabledelayedexpansion
title "%~nx0"
REM set TOOLS=%~dp0
REM set path=!TOOLS!;%path%
REM set p
set /a debug=1
set SRC_SP=%~dp0O2k3-SP\
set SP_File=Office2003SP3-KB923618-FullFile-ENU.exe
set SRC_EXT=%~dp0EXTRACTED\
set SRC_OHOTFIX=%~dp0ohotfix\
set SRC_Updates=%~dp0O2k3-Updates\
set BUILD=%~dp0BUILD\
set FINAL=%~dp0FINAL\
set SED_File=OF2k3SP3.SED
set SRC_SED=%~dp0!SED_File!
set DST_SED=!BUILD!!SED_File!
REM the following gives exe
REM echo !SP_File:~-3!
REM the following gives Office2003SP3-KB923618-FullFile-ENU
REM echo !SP_File:~0,-4!
call :Prep
call :Extract_files
call :Copy_files
call :MakeSED "!DST_SED!"
call :MakeEXE
call :CleanUp
pause
endlocal&goto :eof

:Prep
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :Prep)
call :CleanUp
rd "!FINAL!" /s /q
echo making new directories
mkdir "!SRC_EXT!"
mkdir "!BUILD!"
mkdir "!FINAL!"
endlocal&goto :eof

:Extract_files
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :Extract_files)
echo extracting SP updates
for /R "%SRC_Updates%" %%i in ("*.exe") do (
REM echo "i="%%i
echo extracting "%%~nxi"
"%%i" /C /T:"!SRC_EXT!%%~ni" /Q
echo renaming SP .msp files for ohotfix install order
rename "!SRC_EXT!!SP_File:~0,-4!\*.msp" "2_*.msp"
)
endlocal&goto :eof

:Copy_files
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :Copy_files)
echo copying .msp files to BUILD area
for /R "%SRC_EXT%" %%k in ("*.msp") do (
if !debug! GEQ 1 (echo copying "%%~nxk")
REM copy "%%k" "!BUILD!"
if !debug! GEQ 2 (echo fsutil hardlink create "%%k" "!BUILD!%%~nxk")
fsutil hardlink create "!BUILD!%%~nxk" "%%k" > NUL
)
copy "!SRC_OHOTFIX!*" "!BUILD!">NUL
endlocal&goto :eof

:MakeSED
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :MakeSED)
if !debug! GEQ 2 (echo 1 "%~nx1")
if !debug! GEQ 2 (echo copy "!SRC_SED!" "!DST_SED!")
copy "!SRC_SED!" "!DST_SED!">NUL
echo TargetName="!FINAL!OF2k3SP3.exe">>"!DST_SED!"
set /a File_Num=-1
for %%i in ("!BUILD!*") do (
if not "%%~nxi"=="%~nx1" (
set /a File_Num+=1
echo FILE!File_Num!="%%~nxi">>"!DST_SED!"
)
)
echo [SourceFiles]>>"!DST_SED!"
echo SourceFiles0="!BUILD!">>"!DST_SED!"
echo [SourceFiles0]>>"!DST_SED!"
for /L %%i in (0,1,!File_Num!) do (
echo %%FILE%%i%%=>>"!DST_SED!"
)
endlocal&goto :eof


:MakeEXE
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :MakeEXE)
pushd !BUILD!
if !debug! GEQ 2 (echo iexpress /N !SED_File!)
iexpress /N !SED_File!
copy "!SED_File!" "!FINAL!"
popd
endlocal&goto :eof

:CleanUp
setlocal enableextensions enabledelayedexpansion
if !debug! GEQ 2 (echo :CleanUp)
Echo eraseing previous directories
rd "!SRC_EXT!" /s /q
rd "!BUILD!" /s /q
endlocal&goto :eof

Create another file called OF2k3SP3.SED in the ROOT and paste in the following

[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
KeepCabinet=1
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=1
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
VersionInfo=VersionSection
[VersionSection]
FileDescription="MS Office 2003 SP3 with Updates"
ProductName="OF2k3SP3"
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
FriendlyName=Office 2003 SP3 and Updates
AppLaunched=ohotfix.exe
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=

Of course change the FileDescription and FriendlyName above to suit yourself. These will be visible in the properties of the final .exe. So these are probably the most useful things to change (especially if SP4 springs forth from Redmond).

Next extract from either the service pack (or one of its updates) the following files

ohotfix.exe
ohotfixr.dll
ohotfix.ini

and place them in the ohotfix folder (created earlier).

Do NOT add, but change the following lines in ohotfix.ini as follows

MessageTitle=Office 2003 SP3 and Updates
ShowSuccessDialog=0
RunSetupWatson=0
OHotfixUILevel=q

Note: changing MessageTitle above isn't really necessary, I just like it for completeness.

Now in the O2k3-Updates folder (created near the beginning of the process) put all your updates including SP3. My .cmd file allows you to have several subfolders if you 're like me and like to have the update inside a folder with a very long descriptive name of what it does. Feel free to put your direct d/l links and other non-exe stuff in there too.

A special note about the .cmd file. Make sure to alter the

set SP_File=Office2003SP3-KB923618-FullFile-ENU.exe

line to whatever you called the SP3 download. What it does is extract and renames the .MSPs (from the service pack) with a 02 before it so they will get installed by Ohotfix first. It then goes on to merely extract the rest of the updates' MSP files. Why 02 you ask? Well I remember when I was doing this by hand I had a need/want to include an update to be installed before the service pack, and from my understanding ohotfix.exe goes in alphabetical order and (again from my understanding) numbers are sorted before letters.

Note: after extracting I do a fsutil hard link from the extracted folder structure to the temporary BUILD folder since I got sick of waiting for the COPY procedure (the CABing of IExpress takes long enough, and I'm sick of wasting GIGs of space with temporary junk. :} Also I'm trying to get in the habit of doing fancy stuff B) ). Feel free to change it to copy if fsutil doesn't work for you or if your not using NTFS or other situation where hard linking doesn't work. Also if you're curious about the temporary folders and extraction process, comment out

call :CleanUp

after the MakeEXE call.

If I have the need, feel like being way to fancy, or just feel like avoiding something else I really should be doing, I might change the .cmd to test if the SRC and BUILD folders are on the same volume and the volume is NTFS and not UNC etc and use copy or fsutil as appropriate.

Now run O2k3-SP3-MakePackage.cmd

Look inside the FINAL folder and you will find an IExpressed installer with SP3 and updates ready to put in your chained install (setup.ini) or just carry with you to update everyone who hasn't gotten SP3 yet. Also the .SED file finally used is in there as well. I keep that around so I know exactly what files wound up inside the .exe without having to re-extract them.

Please alter the SED file in ROOT with

KeepCabinet=0

if you don't like to see .CAB files. I'm in an exploring mood and was curious about the differences between the CABinet and the self extracting executable. I never got a round to comparing them. But I might.

The above stuff might not work with Office 2007 updates. I'm guessing since the 2007 compatibility pack uses a different extraction line.

"%%i" /extract:"!SRC_EXT!%%~ni" /quiet
where as the 2003 updates use (the VERY above)
"%%i" /C /T:"!SRC_EXT!%%~ni" /Q

By the way, I do have an extremely similar "script" for the 2007 compatibility pack, it's service pack and future updates that I can carry with me and install for people and also use in my setup.ini file for office. If there's interest I'll do a similar post for that too.

Edited by JoeMSFN
Link to comment
Share on other sites


I really believe that slipstream is much easier. You are making this too much complicated and on this way you need more space, where slipstream replace files and you don't loose any space.

Cheers ;)

Link to comment
Share on other sites

I know it's seems lenghty (although I am richer skillwise for the experience :wacko: )

But the 1st line says it all. Perhaps I'll try to clarify.

If there's some way of doing all this slipstreaming of office updates without using a "corporate" or "enterprise" edition of office, that would be fantastic. Unfortunately when I started doing this early on, every guide had the basic two steps.

  1. Create an administrative install point
  2. Slipstream updates

Step 1 would always be a show stopper as the versions of office I used wouldn't let me. If there's a way to do that with Office 2003 Pro, 2003 Student and Teacher and 2007 Home and 2007 Pro (both OEM and retail) versions, I would be happy to hear it.

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
By the way, I do have an extremely similar "script" for the 2007 compatibility pack, it's service pack and future updates that I can carry with me and install for people and also use in my setup.ini file for office. If there's interest I'll do a similar post for that too.

Can you publish this script as well? Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...