Jump to content

hotfix slipstream script v2


Recommended Posts

@specialk

Thanks for pointing that out, I've worked around it and updated the download (1st post) though I don't understand why it's doing it. both...

if not exist etc\sp1\* goto _svcinf

if not exist etc\sp1\*.* goto _svcinf

...are ignored despite no files being there. Strange. Anyway I worked around it by adding a file extention...

if not exist etc\sp1\*.sys goto _svcinf

...which works here.

Anyone using an older version without sp1.cab files present should use this version instead!

Thanks again specialk.

Link to comment
Share on other sites


I just reread my last post and realized that it sounded awefully abrupt. I apologize if it came across that way. My brain is so fried from coding Java for the past 12 hours. Anywho, I tried this as well

if not exist etc\sp1\*.* goto _svcinf

and it was ignored as you said. I appreciate you taking time to come up with a solution. Your script has definately made slipstreaming approachable for us n00bs (like myself)

Link to comment
Share on other sites

@Sunil

That's nice to hear, thanks.

@specialk

I just reread my last post and realized that it sounded awefully abrupt. I apologize if it came across that way. My brain is so fried from coding Java for the past 12 hours.

Not at all, I'm glad you pointed it out. Others might just not bother saying anything and people that use it would have a duff sp1.cab. I still cannot understand why it ignores that 'if not exist etc\sp1\*.* though. I'm baffled by that.

Link to comment
Share on other sites

I was sure I posted this, but I must have forgot to hit the OK button ...

@RoyalBox: I think the problem may be in the environment(SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION).

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

if exist HFDUMMY RMDIR "HFDUMMY" /S /Q > NUL
MKDIR HFDUMMY

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 HFDUMMY\%%~nj.exe
  DEL CATDIR\*.cat /Q
 )
)

That works for me, even after naming the hotfix as you had in your post. Try and tell.

Link to comment
Share on other sites

@GreenMachine

ENABLEDELAYEDEXPANSION didn't make it work. I don't understand it fully but apparantly:

Delayed environment variable expansion allows you to use a different

character (the exclamation mark) to expand environment variables at

execution time.

I haven't looked into it that much though. Thanks for the suggestion though.

Link to comment
Share on other sites

I'm not that fluent in the batch stuff either. It was the other one I thought more interesting, the "ENABLEEXTENSIONS". Still, there is no reason it should work for me and not you. I am running on win 2003 server, but I would hope that is not the problem ... It just is not logical. I loop through the directory listing, if there are any .cat files, I copy to the exe and delete the .cat files. The second time around (if there are 2 .cat files), there should not be any .cat files left, as I deleted them the first time 'round. How do you get there 2 times? Doesn't this sound suspiciously similar to the problem listed above, where you had to change *.* to *.sys? "IF EXIST CATDIR\*.cat" is returning true, when it is false. It works for me AND the logic is sound. Strange indeed ... unless it is an undocumented feature of the UK version over the US version. Try it with just the one troublesome file, and put a pause in the loop, so you can examine whether the *.cat is really true.

Link to comment
Share on other sites

@greenmachine

Sorry, I was getting mixed up between the problem with the sp1.cab and the renaming thing. I've just tried your script again and it does indeed work. It does seem the best renaming idea for type 1 hotfixes, though I'd have to change my script about a bit. I keep changing it anyway! I have a version that works on each cab at a time deleting files and folders copying cat and hotfixes, compressing etc and then moving on to the next one. I'd have to change the way things are added to svcpack.inf though and haven't had time to do it. I'll get round to it. The thing is I want to cut out as many unnecessary file copying and other steps as possible.

Anyway, your renaming does work now, I don't know what was happening before.

Thanks again.

Link to comment
Share on other sites

Thank you for pinning down the sp1.cab problem. I solved a lot of my errors. I'm now only suffering from a switch prompt where a message box appears telling me the proper switches for something.

Here is my svcpack.

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

[SetupData]
CatalogSubDir="\i386\svcpack"

[SetupHotfixesToRun]
Q282010.exe /n /q /u /z
Q322011.exe /n /q /u /z
Q323255.exe /n /q /u /z
Q327979.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
Q329441.exe /n /q /u /z
Q329834.exe /n /q /u /z
Q331953.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
Q814995.exe /n /q /u /z
Q815021.exe /n /q /u /z
Q817606.exe /n /q /u /z
Q817778.exe /n /q /u /z
Q819696.exe /n /q /u /z
Q820291.exe /n /q /u /z
Q821253.exe /n /q /u /z
Q821557.exe /n /q /u /z
Q823559.exe /n /q /u /z
Q823980.exe /n /q /u /z
Q824105.exe /n /q /u /z
Q824146.exe /n /q /u /z
qchain.exe

[ProductCatalogsToInstall]
kb282010.cat
kb815021.cat
kb817778.cat
kb819696.cat
kb820291.cat
kb821253.cat
kb821557.cat
kb823559.cat
kb823980.cat
kb824105.cat
KB824146.cat
q322011.cat
q323255.cat
q327979.cat
q328310.cat
q329048.cat
q329115.cat
q329170.cat
q329390.cat
q329441.cat
q329834.cat
q331953.cat
q810565.cat
q810577.cat
q810833.cat
q811493.cat
q811630.cat
q814033.cat
q814995.cat
q815021.cat
q817606.cat
q819696.cat

Link to comment
Share on other sites

@[superhumaN][dhc]

I've spent some time doing a couple of clean installs today to check.

I got the message as well but it didn't say which hotfix it was. Thanks for sorting out which hotfix caused the problem (and greenmachine). did you mean KB817778.exe? What did you change the switches to?

As far as only some hotfixes showing in add/remove, well I'm not sure why any should show up as they're all instaled with the /n switch which should stop them being backed-up. 3 showed up for me as well. If you use qfecheck.exe (download from microsoft -- and slipstream it!) it shows all hotfixes are installed, it did for me anyway. A visit to windows update should show that as well.

Perhaps someone (greenmachine?) could shed some light on the Q817778 / KB817778.exe problem.

Thanks for tracking it down..

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