Jump to content

Semiautomatic hot fix integration


Recommended Posts

Posted

These batch files are for anyone that integrates hot fixes manually.

I have used them the last couple of days and thought I would share for anyone that cares to use them.

This is my first submission like this so take it easy on me. But all good criticism and pointers welcome.

All instructions are in the rar file.

Hope they are helpful to somebody.

Merry Christmas

hf.zip


Posted (edited)

Nice idea. I think it's great that you want to give back to a community you feel has helped you out. :)

I do have a few suggestions:

1. Use SET's /p switch to assign values to the variables rather than setting them statically in the batch files.

set /p XPSOURCE=What is the path to your Windows XP source files? (e.g.: C:\XPCD)
set /p SP2I=Do you Have SP2 already integrated? (Yes/No)
set /p HFSOURCE=What is the path to your Hotfix executables? (e.g.: C:\Hotfixes)

2. You can use /i switch on IF statements to make them case insensitive

IF /i %SP2I%=="No" (
SET /p SP2P=What is the path to your SP2 source files? (e.g.: C:\SP2)
echo.
echo. Now installing Service Pack 2
echo.
%SP2p%\i386\update\UPDATE.exe /PASSIVE /S:%XPSOURCE%
echo. Service Pack 2 Installed.... OK
) Else IF NOT /i %SP2I%=="Yes" (
echo.
echo Invalid Service Pack Integration Choice
echo.
pause
exit
)

This code should also eliminate the need for your goto statements.

3. You say right upfront that these batch files are for integrating hotfixes and/or SP2 into your Windows XP CD. This makes both the OPTIONS and the SP2O variables unecessary. Both are static and called only once. Remove their set statements and insert them directly into your batches. (See modified SP2 ingration line above and HF integration below.)

%HFSOURCE%\%HOT%.EXE /PASSIVE /INTEGRATE:%XPSOURCE%

4. There should be a way of asking a user how many hotfixes are to be integrated, and then run a set/intagr8 loop that will execute as many times as needed. I'm not sure how to code this though, and don't have time to try at the moment. Sorry.

Hope you find this feedback helpful, and do feel free to disregard it. It is, after all, only in my opinion that these changes will make your scripts "better." Since they are your scripts, it's up to you to decide for sure. :D

The code provided here is largely untested. I make no guarantees that it will work as planned. Please use caution when implementing it.

Edit: Replaced "end" with "exit" in the second code block because, well, "end" isn't a real command. :D

Edited by Cartoonite
Posted

why not use for?

FOR /f %%f in ('dir/b/s %HFSOURCE%\*.exe') DO Start /wait "" "%%f" /PASSIVE /INTEGRATE:%XPSOURCE%

that will do every exe in the hotfix folder

Posted

Here you go, Brian. This script is close to how I think your final "should" look. :D

One thing I thought of adding was a line that would check to see if the source files are actually in the directories the user specifies. I left it out for now though, since I couldn't think of a way to do it that would apply to the hotfix folder as well. Check your PM for the password.

PM me back or post here if you have any questions about this script.

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