Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any tools available to check if SP2 installed on XP machines? 1

Status
Not open for further replies.

JeffS11111

Technical User
Oct 31, 2004
9
US
Basically to give you the low down on this. I am a Geek Squad agent creating my own application to "automate" installing patches on new and old xp computers. I am looking for any tool(*.exe i dont want to install anything) or is there a certain file that checks to see if SERVICE PACK 2 is installed....if YES GOTO post sp2 patches else install SP2. Just wondering if anyone can lead me in the right direction or has a simple batch example that would help....kudos.
JeffS
 
I would use reg.exe from the resource kit to query the registry and see if the key exist. Something like.

reg query "HKLM\software\microsoft\windows\currentversion\uninstall\winndows xp service pack\displayname"

that should at least get you in the right direction. I would not know how to setup your program in a batch file. You may want to look into VBscript. Post around in that forum and tell them what you want to do and that the above registry value can help..I would think your program should do something like:

1) check to see if the sp2 registry key is present
2) if it is there then it must be installed so proceed to a subroutine to install other pathches. If not installed goto a subroutine to install it.


HTH - Stiddy
 
Stiddy thank you for your reply, you are correct i am not looking for a installation program like the MS baseline...im looking for a value! Your idea is something i have not considered, i wasnt sure if there is a file that is different in the windows directory, but the "registry" is the best way looking at it, now to figure out the reg value is my next line of code...............ugh. Trouble is I dont have a computer with SP1 and Sp2 to tell the difference?!?! Any ideas? Thanks!
JeffS
 
I am not sure what standards the "Geek Squad" uses for utilities.

But let me make some comments:

. Windows Update does all that you are asking; just go to Windows Update and it will identify Service Pack and Hotfix and Security patches you are missing.

. Start, Run, cmd
systeminfo

Look at the second line on the display.
The entire display list service pack levels, all installed Hotfixes, etc.

. Last comment: If I was paying for someone to come on site and test my system for missing service packs and Hotfixes, I would also want a printed copy of MSFT Baseline Security Analyzer, pre and post- your changes; including an HFNetchk summary.


 
sweet I think I found something,

the "value data" in my computer is "Windows XP Service Pack 2"

How do I use the reg query "HKLM\software\microsoft\windows\currentversion\uninstall\winndows xp service pack\displayname
to work in a script?

My results from MY REGISTRY is "value data" "Windows XP Service Pack 2"

So i am hoping just to use that in a script to make it ealier!
 
There is no errorcode passed.
If scripting you would have to test the returned string for a known value.

But why are you going this route? Please see my comments above.
 
bcastner - well its one of those things where I have to work in RETAIL! Clicking next next next install install and waiting for MS update to look at the system =not maximizing my time (or co-workers). The phone always rings, customers asking questions, internet is slow, checking out new computers ect. Best Buy thing

I have an excellent program already where I go
\\server\updater\netstart.bat -> loads an app.exe that I can do several things. (E.G) Norton antivirus 2004 prescan (I update the def files in the cd and click "prescan"-> awesome

Anyways I have my program used in 10 stores across Minnesota, and one of feedback I get is SEEING IF SERVICE PACK 2 is installed. Theres my bit of history!

Having a script that would automate this not only with windows xp2 + post patches helps me do a couple things at once! I think u get it!
 
Start, Run, cmd
systeminfo

Gives you the results in seconds, and can be executed remotely.

My concern is how good a job you are doing by attempting to write a batch job that cannot distinguish between a failed XP SP2 installation and a successful one.

Moreover, you are being paid to fix things. Not to indiscrimitantly use batch files to load a thousand patches that are inappropriate for each client installation.

. Find out what is there
. Identify what should be there
. And fix it

It is exactly this mass approach to workstations that gives retail repair such a bad name.

Please do not contribute to the notion that you repair people are in the main incompentent.


 
bcastner, another thing when I first started working for the Geek Squad at Best Buy when i started it was the most messed up, inconsistent, no common sense, no utlilties to work on consumer computers, AND NO SERVER. I am trying to make a difference. Having been laid off from a .com company in Colorado this is my first time dealing with consumer issues with computers which is very different but in theory similar. Update/configure the new computers and Diag the problems of troulbed ones.

Basically trying to get more work done and feel productive, then move on in the company or somewhere else!
 
Then do not approach the update and service pack issue as a batch file that needs to be written. There is a "Geek Squad" franchise in my local area (Washington, DC Metropolitan area) and they have a horrible reputation. I honestly feel badly how poorly trained and how inept they appear to be.

So, break the mold. Look for quick solutions that are also technicly competent and thorough.

See the earlier notes on the Baseline Security Analyzer.
See the use of these tools:
And learn the ins and outs of Windows Update. In the main my guess is that it would be the fastest to diagnose missing service packs and hotfixes. If you had them on cd it would take you a moment to do something like this for each customer:

Qfecheck verifies the existence of all Windows Hotfixes:

On the fly use your saved hotfixes and services packs, and write a .bat to do the following:

And carry with you a slipstream copy of all OS variations with all Service Pack variations.
 
Well i will not argue with you RETAIL REPAIR having a bad name in the industry, its 85% true. Most the kids I work with are new or just out of college/ tech schools?!?!? I feel like I am at LEAST trying to make an effert here to HELP and GET OUT! lol
=======================================================
"Moreover, you are being paid to fix things. Not to indiscrimitantly use batch files to load a thousand patches that are inappropriate for each client installation."

. Find out what is there
. Identify what should be there
. And fix it
=========================================================
hold on........no offense I check recheck and check again my program installs all POST sp2 files in quite mode (/q) and daily check the (26 post sp2 patches) get installed....there are not thousands........well not yet!

Currently since I have been there is check lists, servers, a network and dozens of other tools (LEGAL) that are helping getting computers back quickly and done RIGHT!
ok off subject...opps

 
You are fighting the good fight, and it is very good news to hear.

I hope some of the utilities discussed above prove of use.

Best wishes,
Bill Castner
 
currently I have all the files post sp2 downloaded (26) and certified before I release these to the technicians. The batch files loop through each computer checking if the post sp2 update is there with qcheck.exe. Problem that has some is some new computers (and computers with xp in for repair) DO NOT come with sp2 and the techs do not catch this problem...........trying to make this idiot proof I guess......I will look at your suggestions.........thank you!
 
You have the most useful posts looking through this forum!
THANK YOU
Jeff S
 
Jeff, sorry it took so long to get back on this one but I hope this helps you.

rem Help_jeff.bat
@echo off

reg query "HKLM\software\microsoft\windows\currentversion\uninstall\windows xp service pack" /v DisplayName >C:\temp\value.txt
@findstr "Error:" c:\temp\value.txt && echo %COMPUTERNAME% doesnt have it && GOTO INSTALLSP2
@findstr "Service Pack 2" c:\temp\value.txt && echo %COMPUTERNAME% looking good && GOTO INSTALLPATCHES

:INSTALLSP2
echo %COMPUTERNAME% needs XPSP2
GOTO END

:INSTALLPATCHES
echo %COMPUTERNAME% is here to install other hotfixes you may need to install
GOTO END

:END
echo Bye-bye JeffS11111
del c:\temp\value.txt
 
A quick visual check for SP2 is to watch the very first Windows boot screen with the moving bar graphic.

SP1 moving bars are green

SP2 moving bars are blue

Not very technical, but it is a very quick check.

Toolman59
 
Another thing to consider is an unattended or sysprep's install. This is a huge timesaver if you dont need to save data and its easy.

I install hotfixes via a script that allows me to just dump any new packs/patches into a certain folder and run the bat file. The bat files knows to loop thru the fixes and what switches to apply to each hotfix so it is silent.

-DJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top