Blyenth Posted September 27, 2004 Share Posted September 27, 2004 I am trying to write a batch file that will call up "hklm\software\microsoft\windows nt\currentversion\csdversion" and determine if Service Pack 2 is installed. If SP2 isn't installed, have it install it for me. Any help would be awesome thank you.Blyenth Link to comment Share on other sites More sharing options...
gpctexas Posted September 27, 2004 Share Posted September 27, 2004 @ECHO OFFFOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\software\Microsoft\windows nt\currentversion" /v csdversion') DO SET spver=%%BECHO Service Pack Version = %spver%if not "%spver%" == "Service Pack 2" ( echo install service pack 2 rem **insert path and sp2 location here**)if "%spver%" == "Service Pack 2" ( echo Service Pack 2 is installed)pause Link to comment Share on other sites More sharing options...
MCT Posted September 27, 2004 Share Posted September 27, 2004 also.. why not slipstream it into your cd? waste of space 2 do it the other way Link to comment Share on other sites More sharing options...
Blyenth Posted September 27, 2004 Author Share Posted September 27, 2004 Thanks for the insanely quick response. Also, I don't slipstream because I'm not reinstalling windows on every new computer that I work on, just updating. Thank you.Blyenth Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now