Jump to content

hotfix slipstream script v2


Recommended Posts


Ok i tried it again.

It works whenever u put it in a dirpath that doesn't contain spaces i.e C:\royalfix but if its in C:\documents and settings\ ... etc then it won't work.

Another question: the file svcpack.inf that is created in the end, its not supposed to be copied somewhere in the i386 dir? it is being created then deleted without doing anything? :)

Link to comment
Share on other sites

@mrchisholm

I did have the full path added to all folders and quoted "" but took that out as I thought it wasn't necessary. I'll make a version with the full path added to all folders (as it used to be) and see if it works with spaces in the path. I'll let you know.

The scvpack.inf should be compressed along with all the other files and places in i386. Look for svcpack.in_. If it's not there (!) please can you let me know? Thanks.

Link to comment
Share on other sites

@RoyalBox: I have not taken the RHSM much further lately, 'cept a couple of points. I think I will give up on the Type II hotfixes, too. I only do 4, so it is not too big of a deal. I included it in an all in one script, being the lazy sort, and giving me a chance to try CDIMAGE.EXE and CDRECORD.EXE. I implemented a renaming system as well. It works like this:

Loop through executables in the HFIXES directory.

Extract each one.

Get the relevent .cat file.

Rename the .exe based on the .cat file name.

Move them to the SVCPACK directory.

The two obvious flaws: No .cat file, or more than 1 .cat file. I have not seen any type 1 without a .cat file, and just one with 2 .cat files. If there are two, I use the first that I find for the name, and copy them all. What I do like is that it renames the files on criteria other than the original name.

I have not built a system lately, but I am still tempted to try to add another command to the svcpack.inf file, and see what happens. Part of it looks like this:

[SetupData] 
CatalogSubDir="\i386\svcpack"

[SetupHotfixesToRun]
Q815021.exe /n /q /u /z
qchain.exe

Of course the hotfix has to be there, and it has it's corresponding .cat file, but QCHAIN has no "required presence", nor .cat file. (I know it SHOULD be there.) Why can't we add something like dxsetup.exe </silent of course>? We would include the files in CatalogSubDir (="\i386\svcpack"). It should behave at least similar to other .inf files Any thoughts?

My rename code:

@echo off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF EXIST SVCPACK\*.* RMDIR SVCPACK /S /Q
MKDIR SVCPACK

FOR /f "usebackq delims==" %%i IN (`dir /b HFIXES\*.exe`) DO (
IF EXIST CATEXT\*.* RMDIR CATEXT /S /Q
IF EXIST CATDIR\*.* RMDIR CATDIR /S /Q
START "HotFix" /wait "HFIXES\%%~ni.exe" /q /x:CATEXT
IF EXIST CATEXT\UPDATE\*.cat xcopy /d /h /y /s CATEXT\UPDATE\*.cat CATDIR\
IF EXIST CATEXT\SP2\UPDATE\*.cat xcopy /d /h /y /s CATEXT\SP2\UPDATE\*.cat CATDIR\
IF EXIST CATDIR\*_me.cat del CATDIR\*_me.cat /q
IF EXIST CATDIR\dummy.cat del CATDIR\dummy.cat
IF EXIST CATDIR\empty.cat del CATDIR\empty.cat
FOR /f "usebackq delims==" %%j IN (`dir /b CATDIR\*.cat`) DO (
 IF NOT EXIST CATDIR\*.cat GOTO END
 COPY HFIXES\%%~ni.exe SVCPACK\%%~nj.exe
 COPY CATDIR\*.cat SVCPACK\*.cat
 DEL CATDIR\*.cat /Q
)
)

:END

Link to comment
Share on other sites

@greenmachine

Rename the .exe based on the .cat file name.
That's interesting, I'd never have thought of renaming the hotfixes that way. I suppose it doesn't really matter what the hotfix is called so using either of the cat files in a hotfix that has 2 would work. Nice idea.
Why can't we add something like dxsetup.exe </silent of course>? We would include the files in CatalogSubDir (="\i386\svcpack"). It should behave at least similar to other .inf files Any thoughts?

I don't know, but I suppose you could run any silently installed app from svcpack. Do you mean have a folder you put these files in and the script will copy them to svcpack and add them to the [setupHotfixesToRun] section and add any necessary switches? I expect you'd have to have different switches for different apps though. I've been using the $oem$ method of installing directx and other apps as per aaronxp's guide. Personally I just use the script for files that I want intergrated into the 'cd' as it were. I'll have to look into it.

Link to comment
Share on other sites

Hi again, i put the generated files in i368 folder to my distributionpoint, but when installation of windows is done it has only installed:

KB824105

KB824146

Q329441

my svcpack.inf looks like this:

[Version] 
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=1
BuildNumber=2600

[SetupData]
CatalogSubDir="\i386\svcpack"

[SetupHotfixesToRun]
KB329441.exe /n /q /u /z
KB821557.exe /n /q /u /z
KB823559.exe /n /q /u /z
KB824105.exe /n /q /u /z
KB824146.exe /n /q /u /z
Q323255.exe /n /q /u /z
Q328310.exe /n /q /u /z
Q329048.exe /n /q /u /z
Q329115.exe /n /q /u /z
Q329170.exe /n /q /u /z
Q329390.exe /n /q /u /z
Q329834.exe /n /q /u /z
Q810565.exe /n /q /u /z
Q810577.exe /n /q /u /z
Q810833.exe /n /q /u /z
Q811493.exe /n /q /u /z
Q811630.exe /n /q /u /z
Q814033.exe /n /q /u /z
Q815021.exe /n /q /u /z
Q817606.exe /n /q /u /z
qchain.exe

[ProductCatalogsToInstall]
kb815021.cat
kb821557.cat
kb823559.cat
kb824105.cat
KB824146.cat
q323255.cat
q328310.cat
q329048.cat
q329115.cat
q329170.cat
q329390.cat
q329441.cat
q329834.cat
q810565.cat
q810577.cat
q810833.cat
q811493.cat
q811630.cat
q814033.cat
q815021.cat
q817606.cat

Link to comment
Share on other sites

@mrchisholm

I can't understand it. Did you add...

[OptionalSrcDirs]

svcpack

... to your dosnet.inf?

Is your distributionpoint xp with service pack 1?

Erm, anyone else have any ideas?

yes it is added to dosnet.inf

and yes it is XP SP1 (swedish - not that it shud matter ...) :)

Link to comment
Share on other sites

Does anone have any idea why this doesn't work for mrchisholm?

mrchisholm, I've uploaded an update that you could try. It now no longer needs to make a $tmp$.cmd. Try it and see if it helps. Remember there should be no spaces in the path so c:\file with spaces\xpcd\ doesn't work. I cannot get compress.exe to work like this even when "quoted". There are a lot of error messages like 'file not found...' at the start when it renames the hotfixes. I haven't found a way round this yet with the rename method I'm using. It doesn't matter though, the files will be renamed.

@greenmachine

I really like your idea of renaming hotfixes with the cat file. I tried your idea in a modified version of my script and it seemed to work well for hotfixes type 1. Then I found that hotfix Q815021 has 2 cat files kb815021.cat and q815021.cat. What it seems to do is add the hotfix twice with both names. I tried it with type 2 hotfixes including MPSetupXP.exe (I'm not sure if this one is a good candidate for slipstreaming though I expect not!) and it has several cat files and the hotfix was named to all of them. I must admit I didn't try it with your whole script just the rename bit. I'm sure there's a way to get it to use just one file if more are found, I'l have a look at your script to see if I've missed something.

Talking of hotfixes, KB329441.exe's cat file is named q329441.cat in case anyone's troubleshooting. I thought I had a missing cat file for a while.

[superhumaN][dhc]

Can you tell me a bit more about the errors you're getting and when. Does any of it work up to a point? Does it create the folders and extract the hotfixes? I'll try and work out what's wrong if I can.

I'm sorry if this doesn't work for anyone, I don't know about os's or systems other than my own. All I know is that It works everytime here using an English XP SP1 setup. I'l try and help but bare what I just said it mind.

Link to comment
Share on other sites

@RoyalBox: The code as I posted seemed to crap out after the first 2 cat hotfix. This works:

FOR /f "usebackq delims==" %%i IN (`dir /b HFTYPE1\*.exe`) DO (
IF EXIST CATEXT\*.* RMDIR CATEXT /S /Q
IF EXIST CATDIR\*.* RMDIR CATDIR /S /Q
START "HotFix" /wait "HFTYPE1\%%~ni.exe" /q /x:CATEXT
IF EXIST CATEXT\UPDATE\*.cat xcopy /d /h /y /s CATEXT\UPDATE\*.cat CATDIR\
IF EXIST CATEXT\SP2\UPDATE\*.cat xcopy /d /h /y /s CATEXT\SP2\UPDATE\*.cat CATDIR\
IF EXIST CATDIR\*_me.cat del CATDIR\*_me.cat /q
IF EXIST CATDIR\dummy.cat del CATDIR\dummy.cat
IF EXIST CATDIR\empty.cat del CATDIR\empty.cat
FOR /f "usebackq delims==" %%j IN (`dir /b CATDIR\*.cat`) DO (
 IF EXIST CATDIR\*.cat COPY HFTYPE1\%%~ni.exe SVCPACK\%%~nj.exe
 IF EXIST CATDIR\*.cat COPY HFTYPE1\%%~ni.exe HFDUMMY\%%~nj.exe
 DEL CATDIR\*.cat /Q
)
)

You may need to make a SVCPACK directory first. There should be a way to have a for loop that only loops once, but I got lazy. Also, I saw a few Type II fixes that had NO cat file, part of my reason for abandoning them (though I left the code in).

Don't know why it is not working for you two others. Are you sure the hotfixes are the correct versions? You say that only a few installed: how do you determine this? SSVCPACK.INF looks OK ...

Link to comment
Share on other sites

@greenmachine

I still have the same problem which is a shame because this is such a good idea. The problem is with one hotfix (there's always one isn't there?) which is called Q815021_WXP_SP2_x86_ENU.exe and is the one with ntdll.dll in. Yes that's right, the little so and so that I had to add an extra section of code for so it would copy it uncompressed to i386 AND system32 -- pointed out by spheris.

It has 2 cat files and when you run your script you end up with 2 exe files named after each cat file. kb815021.exe and q815021.exe. Now it probably doesn't matter as it would just try and install it twice, but maybe there would be a problem I don't know. It's just annoying. The trouble is my brains fried as I've been working on moving a website for someone as well which needs links changed etc. So I think I'll give it a break for a couple of days. I wish I was better at this code stuff then I could sort it out!

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...