Jump to content

new hotfixes.cmd


Recommended Posts

I noticed that hotfixes for applications that can be added/removed from control panel will revert back to Windows XP SP1 version if you install/uninstall the appropriate application. An example is Q322011 which is update for Fax Console and also Q811114 which is update for IIS. At the time of installing these hotfixes Fax Console and IIS has not been installed yet. Now if you go to Add/Remove programs and install Fax Console and IIS you will notice that the file versions are versions from XP SP1 cd and not versions from hotfixes. The only solution I have found for this issue is to integrate these kind of hotfixes in Windows XP SP1 cd using SVCPACK directory in I386 folder and adding svcpack.inf in I386 directory.

Link to comment
Share on other sites


not a problem or a bother to me

But the idea of the forum as I understood from aaron was to refine and discuss/share alternates and ideas for the methods laid out already in the guide. And that is why the opk hotfix instructions are posted and explained

the batch method itself has a good foundation and solid methodology

but two things to bear in mind

when the batch calls out, it switches context from win32 to win16 api's

so there is always a stability risk

second the native api method goes much more quickly in the time wait factor for it all to seed in

not that the batch idea is all that bad of a thing

and it does afford some flex in that you get to watch the readout as each hotfix is applied, which is educational at least. Or at least looks cool if your kids are watching while you test it out.

but if a better method exists, usually its better to go with

Link to comment
Share on other sites

Re the svcpack method. Two things.

First, as I understand it you can't use this with the hotfixes that have the 'setup' icon with the picture on it. IE, OE and java updates etc. But it works well for the other type with the plain icon.

Second, I spent some time making a batch script to automate the whole process. You start of with a hotfix in one folder, hit execute.cmd and you end up with the hotfixed files in another folder, compressed, with an svcpack folder containing the hotfix and cat file, and an updated svcpack.inf file all ready to just copy over the top of your xp instalation files.

Some points.

Newer files don't get updated with older ones so it doesn't matter what order you do the hotfixes in.

You have to do one hotfix at a time (or newer files might get overwriten).

You have to keep the final folder with all the hotfixed files and add to it, not start from scratch with each hotfix.

When you get a new hotfix you just put it in folder '1', execute, and copy the whole of the output folder to the xp installation folder overwriting all files.

I got the info from various places and worked some out myself. The script could probably be improved and cleaned up by those who know better. I posted the whole thing on another forum and was totally ignored. But it works file for me, in conjuction with the method on the unattended site. Which, by the way, is the only site where all details are clearly given and make sence and which works in my opinion.

Link to comment
Share on other sites

i could make a bootable xp-cd work with that svcpack-method!

it's really pretty cool and much faster than adding the "Q"-files by a batch script.

the only thing that didn't work was adding any KB-files to that whole svcpack installation method. since microsoft only mentions "Q" files in that manual (see link above), it's seems not to be intended to work with KB-files...

Link to comment
Share on other sites

Re the svcpack method. Two things.

First, as I understand it you can't use this with the hotfixes that have the 'setup' icon with the picture on it. IE, OE and java updates etc. But it works well for the other type with the plain icon.

Second, I spent some time making a batch script to automate the whole process. You start of with a hotfix in one folder, hit execute.cmd and you end up with the hotfixed files in another folder, compressed, with an svcpack folder containing the hotfix and cat file, and an updated svcpack.inf file all ready to just copy over the top of your xp instalation files.

Some points.

Newer files don't get updated with older ones so it doesn't matter what order you do the hotfixes in.

You have to do one hotfix at a time (or newer files might get overwriten).

You have to keep the final folder with all the hotfixed files and add to it, not start from scratch with each hotfix.

When you get a new hotfix you just put it in folder '1', execute, and copy the whole of the output folder to the xp installation folder overwriting all files.

I got the info from various places and worked some out myself. The script could probably be improved and cleaned up by those who know better. I posted the whole thing on another forum and was totally ignored. But it works file for me, in conjuction with the method on the unattended site. Which, by the way, is the only site where all details are clearly given and make sence and which works in my opinion.

yes I promise not t oignore you please post your cmd file with instructions. Thanks.

By the way thsi is about the last thing I was wanting to do wiht my installer cd. The rest is working quite well now.

Link to comment
Share on other sites

If I tell it exactly as it's laid out on my machine then you can adapt folder names etc. afterwards. I really do hope you can improve this or tell me if there are any problems or better ways to do it though.

I have a folder called xpcd. In that I have folders called 1, 2, 3, bin and files.

Contents of bin

compress.exe which I think came with cabarc that I downloaded from microsoft. I don't have the link but I'm sure google will help.

Contents of files

dosnet.inf from the xp installation files which has the following added to it:

[OptionalSrcDirs]

svcpack

hotkill.ini which you make yourself and put the following in it:

*.pdb

spmsg.*

hotfix.*

spuninst.*

empty.*

eula.*

update.*

spcustom.*

xpsp*.exe

sp1

symbols

winnt.sif which has my serial number and other custom settings.

At the root of the xpcd folder I have execute.cmd which does the work. It contains the following which I have commented so you know what's happening.

@echo off
setlocal enableextensions

rem check if hotfix file exists
if not exist 1\*.exe goto _end

rem delete any files in extract folder
if exist 2\* del /s /q 2\*

rem extract hotfix to extract folder
for /f "usebackq delims==" %%i in (`dir /b 1\*.exe`) do echo 1\%%~ni.exe /q /x:2 >>$x$.cmd
call $x$.cmd
del $x$.cmd

rem check extraction took place
if not exist 2\* goto _end

rem create svcpack folder in output folder
if not exist 3\svcpack md 3\SVCPACK

rem move hotfix to svcpack folder
move /y 1\*.exe 3\svcpack

rem delete unwanted files from extract folder
for /f %%i in (files\hotkill.ini) do del /f /q /s 2\%%i
for /f %%i in (files\hotkill.ini) do del /f /q /s 2\sp2\%%i

rem move cat files to svcpack folder
for %%i in (2\update\*.cat 2\sp2\update\*.cat) do move /y %%i 3\svcpack

rem compress files and copy to output folder
bin\compress.exe -d -r -zx21 2\* 3
bin\compress.exe -d -r -zx21 2\sp2\* 3

rem create svcpack.inf file
echo [Version] >3\svcpack.inf
echo Signature="$Windows NT$" >>3\svcpack.inf
echo MajorVersion=5 >>3\svcpack.inf
echo MinorVersion=1 >>3\svcpack.inf
echo BuildNumber=2600 >>3\svcpack.inf
echo. >>3\svcpack.inf
echo [SetupData] >>3\svcpack.inf
echo CatalogSubDir="\i386\svcpack" >>3\svcpack.inf
echo. >>3\svcpack.inf
echo [SetupHotfixesToRun] >>3\svcpack.inf

for /f "usebackq delims==" %%i in (`dir /b 3\svcpack\*.exe`) do echo %%~ni.exe /n /q /u /z >>3\svcpack.inf
echo. >>3\svcpack.inf
echo [ProductCatalogsToInstall] >>3\svcpack.inf
for /f "usebackq delims==" %%i in (`dir /b 3\svcpack\*.cat`) do echo %%~ni.cat >>3\svcpack.inf

rem compress svcpack.inf
bin\compress.exe -d -r -zx21 3\svcpack.inf
rem comment out the next line if you want to examing svcpack.inf afterwards.
del /q 3\svcpack.inf

rem copy winnt.sif to output folder
if exist files\winnt.sif xcopy /y files\winnt.sif 3

rem copy dosnet.inf to output folder
if exist files\dosnet.inf xcopy /y files\dosnet.inf 3

goto _end

:_end

That's it. You put your hotfix in 1 execute the batch file and the files are extracted and compressed into 3. You then copy all of folder 3 to your xp installation i386 folder. You have to let folder 3 'build-up' and not delete it after copying your files over or the next time you add a hotfix, svcpack.inf will only reference that one.

I'm sure there are gaping holes, problems, unnecessary code, not enough code... but I'm no expert. That's why I really hope that people will post back any improvements.

I should also say that this is for xp home with sp1 already slipstreamed that's why I'm only using the files from sp2 in the extracted files and not sp1.

You don't have to compress the files if you don't want to but it would be tedious to go through the xp installation folder and delete all the files that would be replaced as they would be used in preference to the new ones. What I'm trying to say is for every new file like shell32.exe you would have to delete the compressed shell32.ex_ from the install folder. Too much hard work.

The reason I bothered to compress svcpack.inf is that I spent hours one day trying to figure out why my newly installed windows would get to the boot screen then shut down. I forgot to delete svcpack.in_ from the xp installation files and it was using this in preference to my svcpack.inf file and so there was no reference to the updated cat files.

Anyway I hope someone finds it useful.

Link to comment
Share on other sites

How do you use svcpack method to update files which are inside sp1.cab? I, myself extract sp1.cab to a temporary directory, overwrite newer versions of files in this temporary directory and then repack it using cabarc -r -p N C:\SP1.CAB *.* and then put the resulting sp1.cab into i386 folder. Is there any better solution?

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