Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 Scripting
 Slipstream Bat File
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RTHJr
Here To Stay

USA
170 Posts
Status: offline

Posted - 08/13/2008 :  4:29:36 PM  Show Profile  Send RTHJr a Yahoo! Message  Reply with Quote
In the spirit of Mark's recent Newsletter #72,
"Making Pkgmgr Work in Vista and Server 2008 to Apply Patches Offline"

I took a crack at slipstreaming as I needed to do so with XP yesterday. Next, I'm taking a crack at doing the offline patching trick to integrate Vista SP1 on Vista RTM just for proof of concept to me. Yeah, I know that may have been done already; but I want to stretch my legs scripting so here goes the slipstream bat file text:

----------------------------------

cls
@echo off
set updatedir=C:\update
set flatdir=C:\flats
set top=REM
if "%1%"=="" set top=echo

REM Credits and instructions
REM ------------------------
REM ------------------------

echo --------------------------------------------------------------------
echo --------------------------------------------------------------------
echo Slipstream.bat for Windows 2003 R2 and Below
echo Written by: Mark Minasi and Ralph T. Howarth, Jr.
echo Written August 12, 2008
echo www.minasi.com
echo help@minasi.com
echo --------------------------------------------------------------------
echo --------------------------------------------------------------------
%top%.
%top% This utility integrates a service pack to a Windows 5.x CD flat.
%top%.
%top% OUTPUTS:
%top% Integrated CD flat to a target OS flat named by the user.
%top%.
%top% REQUIRES:
%top% Before running this, a service pack must be dropped in a folder named
%top% %updatedir% (unless you put them somewhere else and change the value
%top% of the line "set updatedir=" at the top of the batch file).
%top%.
%top% NOTE:
%top% If the %updatedir% has other subfolders for supporting other scripts
%top% used for patching, this program will run OK as long as the exe in the
%top% root of the %updatedir% is a service pack.%top%
%top%.
%top% Also, the installation CD must be copied in entirety to the %flatdir%
%top% in the intended OS target folder. Note the i386 folder is critical
%top% in the flat but the service pack may populate some utility folders.
%top% (Again, if you change the value of the "set flatdir=" line; do that.)
%top%.

REM ERROR CHECKING
REM --------------
REM --------------

if "%1"=="" (
echo ERROR:
echo A named target OS folder is required. Please name the update flat
echo like...
echo slipstream XPSP3
goto badend
)

if not exist %flatdir%\%1 md %flatdir%\%1

REM (
REM echo ERROR:
REM echo Could not find the target OS folder "%1" in %flatdir%REM echo.
REM goto badend
REM )

REM Check that there is a [supposed] service pack

if not exist %updatedir%\*.exe (
echo ERROR:
echo This needs at least one service pack file with an "exe" extension
echo in a folder named %updatedir%. Please add at least one update to the
echo %updatedir% folder.
echo.
goto badend
)

REM Check if an i386 has been copied to the OS flat folder

if not exist %flatdir%\%1\i386 (
echo ERROR:
echo The OS flat folder "%1" needs to have the installation CD files
echo in the folder named "%flatdir%". Please copy at least the i386 folder
echo in to the %1 folder.
echo.
goto badend
)

REM ------------------
REM ------------------
REM END ERROR CHECKING


REM integrate service pack(s) from %updatedir% to the %1 OS flat folder.

REM Service Pack Loop
REM --------------------------
REM --------------------------

for %%f in (%updatedir%\*.exe) do (
echo applying service pack %%f...
echo.
start /w %%f /integrate:%flatdir%\%1
)

echo Slipstream operations on %1 apparently complete.

goto realend
:badend
echo Service Pack not applied.
:realend

@echo on

Ralph T. Howarth, Jr.
www.cfcmi.org
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2009 Mark Minasi Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000