Thanks
> Is that posable? I want to script in the latest patch but I have computers
> with IE 5.5 and IE 6. and there are different patches for both.
Hi
Actually, you really don't need to detect the IE version for the IE patches.
They will not install on other than the correct version of the browser, so you
can really just run them all after each other. To supress the "error" message
for the ones that detects wrong version of IE, add the switch /Q:A (this will
supress any reboot prompts as well from the one that does install).
So, from a batch file or a script, you can do like this:
q321232_ie60.exe /q:a
q321232_ie55sp2.exe /q:a
q321232_ie55sp1.exe /q:a
If you want to find the IE version, from a Google newsgroup search at
http://groups.google.com/advanced_group_search :
From: Jason Chrispen (j...@outrage.com)
Subject: Detecting Service pack and IE versions from batch files
Newsgroups: microsoft.public.win2000.cmdprompt.admin
Date: 2002-05-08 06:08:10 PST
http://groups.google.com/groups?hl=en&lr=&th=6ee8f04de9dc42a4&rnum=1
From: federico (fca...@luxurylink.com)
Subject: batch file for appliying iexplorer updates.
Newsgroups: microsoft.public.win2000.cmdprompt.admin
Date: 2002-02-15 10:45:30 PST
http://groups.google.com/groups?hl=en&lr=&th=331bab39b12f6697&rnum=2
From: Larry (lgov...@hotmail.com)
Subject: Browser Version from CMD?
Newsgroups: microsoft.public.win2000.cmdprompt.admin
Date: 2002-04-24 15:01:40 PST
http://groups.google.com/groups?hl=en&lr=&th=b0c9a1132f68491a&rnum=2
From: AZ (alex...@invitrogen.com)
Subject: file version
Newsgroups: microsoft.public.win2000.cmdprompt.admin
Date: 2002-02-25 09:22:21 PST
http://groups.google.com/groups?hl=en&lr=&th=dc3ccd9a4d97a57&rnum=3
--
torgeir
See Q164539 to identify which version of IE is installed, then use something
like this to check for each version:
reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer" /v
Version | find /i "5.50.4807.2300" >null
if errorlevel 1 (goto :IE501SP2) else (goto :IE55SP2_INSTALLED)
:IE55SP2_INSTALLED
c:\security\IE55SP2\q319182.exe /q /r:n
goto :done
:IE501SP2
reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer" /v
Version | find /i "5.00.3315.1000" >null
if errorlevel 1 (goto :IE_UNKNOWN) else (goto :IE501SP2_INSTALLED)
:IE501SP2_INSTALLED
c:\security\IE501SP2\q319182.exe /q /r:n
goto :done
:IE_UNKNOWN
echo IE version NOT known.
:done
--
Crimson Star, MCSE
Technical Webmaster
Alberta Corporate Service Centre
Government of Alberta
"Jon Smith" <n...@na.com> wrote in message
news:egvNXCP$BHA.1356@tkmsftngp05...
Set WshShell = WScript.CreateObject("WScript.Shell")
IEVer = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Internet
Explorer\Version")
IEMVer = WshShell.RegRead
("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\MinorVersion")
WScript.Echo IEVer & vbTab & IEMVer
Regards
Manohar Mathan
>.
>
> Is that posable? I want to script in the latest patch but I have
> computers with IE 5.5 and IE 6. and there are different patches for both.
Several others have responded with good answers. I will add what I think is
another good answer. Get my utilities:
http://www.oregonclassifieds.net/utilities/files/admtool2.zip
Filever.exe (the one in my tool set, not the resource kit) can set
ERRORLEVEL based on a file's version. I'd check the file shdocvw.dll in the
system (9x/Me) or system32 (NT or later) directory.
Regards
Daryl
"Ned Flanders" <ned...@hotmail.com> wrote in message
news:e$J7XXQ$BHA.2044@tkmsftngp04...
> Here's what I used before I coded a VB util (not releasable due to
employer
> restrictions) to do this.
>
> Simple routine, sets IEVER variable to match the string shown in Q164539
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q164539&SD=MSKB&
>
> Based on the value of IEVER, branch off in your script to apply the
> appropriate patches.
>
>
>
> "Jon Smith" <n...@na.com> wrote in message
> news:egvNXCP$BHA.1356@tkmsftngp05...
> While a number of people have come up with inventive solutions, the real
> problem here is the stupidty of Microsoft releasing 6 different versions of
> some patches, depending on what combination of operating system and browser
> you have. It is apparent that none of the people that create such patches
> have ever been in charge of deployment at a large company. There is
> absolutely no reason why patches such as MS02-023 et al couldnt have come in
> one patch that covers all versions, and makes the decisions internally about
> what versions the client is running, and installs the appropriate files.
Hi
Well, I guess that one of the reasons for that they have not implementet it this
way, is that there are no guarantee that the fixes are released simultaneously
for the different versions. E.g. MS has pronounced that the cumulative patches
for IE 5.5SP1 can be released up to one month later than IE 5.5SP2 (because IE
5.5SP1 isn't a mainstream product anymore).
By having separate downloads, it is very clear for what version the patches are
ready for.
--
torgeir
I'd throttle this statement a bit to:
..."It is apparent that none of the people that create such patches
have ever been in charge of deployment at <changed> *any* company
with more than 1 PC </changed>"
Or could it be that the reason for such a mess stems from the fact that
whole Microsoft might in fact be running on 1 PC only!? (and to patch
that 1PC - WU is just the tool;)
Other thing that escapes reason is command line switches - MS02-023
is one of those (fine crafted works of art?) that use undocumented
switches - run q321232.exe /? to see them all and still - you will not
see the /R:N option that's necessary to avoid "reboot yes/no" question
at the end of install. You gotta luv'em...
Branimir
>Jon Smith wrote:
>
>> Is that posable? I want to script in the latest patch but I have computers
>> with IE 5.5 and IE 6. and there are different patches for both.
>
>Hi
>
>Actually, you really don't need to detect the IE version for the IE patches.
>They will not install on other than the correct version of the browser, so you
>can really just run them all after each other. To supress the "error" message
>for the ones that detects wrong version of IE, add the switch /Q:A (this will
>supress any reboot prompts as well from the one that does install).
>
>So, from a batch file or a script, you can do like this:
>
>q321232_ie60.exe /q:a
>q321232_ie55sp2.exe /q:a
>q321232_ie55sp1.exe /q:a
That's pretty dangerous in my opinion.
I found on one of the previous rollups (the one in Dec?) that the
machine would blue-screen if you attempted to apply the wrong version.
I don't know if that's still the case.
I use a Kixtart script to check both the major version number (to
determine which patch is applicable) and the minor version to see
which patches have already been applied.
So for example if I want to install the patch for IE 5.5 it's going to
return the same error code as 6 because all I can specify is that it's over
5.5 because of different roll up patches have incremented up the numbers so
there isn't one I can use, only that it's over 5.5
What would be nice if you could set a range like -v 5.5xxx-6.0xxxx and have
that return the error code. Just a thought unless I'm missing something.
"Bill Stewart" <bste...@iname.no_spam.com> wrote in message
news:OWv8P9P$BHA.1916@tkmsftngp04...
> On Thu, 16 May 2002 18:54:40 +0200, Torgeir Bakken
> <Torgeir.B...@hydro.com> wrote:
> >Actually, you really don't need to detect the IE version for the IE patches.
> >They will not install on other than the correct version of the browser, so you
> >can really just run them all after each other. To supress the "error" message
> >for the ones that detects wrong version of IE, add the switch /Q:A (this will
> >supress any reboot prompts as well from the one that does install).
> >
> >So, from a batch file or a script, you can do like this:
> >
> >q321232_ie60.exe /q:a
> >q321232_ie55sp2.exe /q:a
> >q321232_ie55sp1.exe /q:a
>
> That's pretty dangerous in my opinion.
That is why testing it properly is necessary
> I found on one of the previous rollups (the one in Dec?) that the
> machine would blue-screen if you attempted to apply the wrong version.
> I don't know if that's still the case.
The cumulative patch for April and May does not seem to have this problem.
> I use a Kixtart script to check both the major version number (to
> determine which patch is applicable) and the minor version to see
> which patches have already been applied.
I agree, the safest thing is to version handle things (we do ;-).
--
torgeir
> I used your tool (very nice by the way) before I posted this but ran into
> the problem that as far as I could tell it would only return an error
> code based off of a number greater then, something (ie 5.5) but less then
> something (ie 6)
The tool lets you ask if a file is at least some version. If it returns 0,
then you know the file is at least that version. Example:
filever -f %SystemRoot%\system32\shdocvw.dll -v 5
if %ERRORLEVEL% EQU 0 goto :IE5
filever -f %SystemRoot%\system32\shdocvw.dll -v 6
if %ERRORLEVEL% EQU 0 goto :IE6
filever -f %SystemRoot%\system32\shdocvw.dll -v 5.5
if %ERRORLEVEL% EQU 0 goto :IE5
it would reten a 0 even if it was 6.0 cuz it's over 5 and would then install
the 5.5 patch
"Bill Stewart" <bste...@iname.no_spam.com> wrote in message
news:OyzpZPd$BHA.2336@tkmsftngp05...
> yes but what about in the case where you need to patch a file that is 5.5
> so you use
>
> filever -f %SystemRoot%\system32\shdocvw.dll -v 5.5
> if %ERRORLEVEL% EQU 0 goto :IE5
>
> it would reten a 0 even if it was 6.0 cuz it's over 5 and would then
> install the 5.5 patch
A bit of creating thinking suggests that perhaps you need to do the tests
in descending order?
filever -f %SystemRoot%\system32\shdocvw.dll -v 6
if %ERRORLEVEL% EQU 0 goto :IE60
filever -f %SystemRoot%\system32\shdocvw.dll -v 5.5
if %ERRORLEVEL% EQU 0 goto :IE55
filever -f %SystemRoot%\system32\shdocvw.dll -v 5
if %ERRORLEVEL% EQU 0 goto :IE50
I suspect they don't combine them as most users only need to download
the proper version. Would be nice if they released an intelligent
combined version for corporate rollouts.
>Well, I guess that one of the reasons for that they have not implementet it this
>way, is that there are no guarantee that the fixes are released simultaneously
>for the different versions. E.g. MS has pronounced that the cumulative patches
>for IE 5.5SP1 can be released up to one month later than IE 5.5SP2 (because IE
>5.5SP1 isn't a mainstream product anymore).
>
>By having separate downloads, it is very clear for what version the patches are
>ready for.
But they give all the patches the same name! Once it's downloaded,
unless you changed the name, you can't easily tell them apart.
>Hi Jon,
>
>See Q164539 to identify which version of IE is installed, then use something
>like this to check for each version:
>
>reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer" /v
>Version | find /i "5.50.4807.2300" >null
>if errorlevel 1 (goto :IE501SP2) else (goto :IE55SP2_INSTALLED)
>
>:IE55SP2_INSTALLED
>c:\security\IE55SP2\q319182.exe /q /r:n
>goto :done
>
>:IE501SP2
>reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer" /v
>Version | find /i "5.00.3315.1000" >null
>if errorlevel 1 (goto :IE_UNKNOWN) else (goto :IE501SP2_INSTALLED)
>
>:IE501SP2_INSTALLED
>c:\security\IE501SP2\q319182.exe /q /r:n
>goto :done
>
>:IE_UNKNOWN
>echo IE version NOT known.
>
>:done
You'll miss quite a few using the above checks. Below is the latest
list of versions I have. Might be missing a few, though. You'll also
need to check for SP6 under NT as well, btw.
Don't rely on checking the version of shdoc, either as some of the
patches change the version. Best indicator is the major & minor
version registry keys.
I've got a Kix32 script that I use to do the version checking and
silently installing SP6, IE patches, or even IE6 if needed. It logs
the info and actions taken to a text file which I parse and display
summaries from using a Perl script. Gotta love the registry features
of Kixtart! It normally gets run via the login script, but I
occassionally use psexec to force it on the NT/W2K machines
### Version Number to Product Name Lookup Table
4.40.308= Internet Explorer 1.0 (Plus!)
4.40.520= Internet Explorer 2.0
4.70.1155= Internet Explorer 3.0
4.70.1158= Internet Explorer 3.0 (OSR2)
4.70.1215= Internet Explorer 3.01
4.70.1300= Internet Explorer 3.02 and 3.02a
4.71.544= Internet Explorer 4.0 Platform Preview 1.0
4.71.1008.3= Internet Explorer 4.0 Platform Preview 2.0
4.71.1712.5= Internet Explorer 4.0
4.71.1712.6= Internet Explorer 4.0
4.72.2106.7= Explorer 4.01
4.72.2106.8= Explorer 4.01
4.72.3110.0= Explorer 4.01
4.72.3110.3= Explorer 4.01 Service Pack 1 (SP1)
4.72.3110.8= Explorer 4.01 Service Pack 1 (SP1)
4.72.3612.1707 = Explorer 4.01 Service Pack 2 (SP2)
4.72.3612.1713 = Explorer 4.01 Service Pack 2 (SP2)
4.72.3711.2900 = Explorer 4.01
5.00.0518.5= Explorer 5 Developer Preview (Beta 1)
5.00.0518.10= Explorer 5 Developer Preview (Beta 1)
5.00.0910.1308 = Explorer 5 Beta (Beta 2)
5.00.0910.1309 = Explorer 5 Beta (Beta 2)
5.00.2014.0213 = Explorer 5
5.00.2014.0216 = Explorer 5
5.00.2314.1000 = Explorer 5 (Office 2000)
5.00.2314.1003 = Explorer 5 (Office 2000)
5.00.2516.1900 = Explorer 5.01 (Windows 2000 Beta 3)
5.00.2614.3500 = Explorer 5 (Windows 98 SE)
5.00.2717.2000 = Explorer 5
5.00.2721.1400 = Explorer 5
5.00.2723.2900 = Explorer 5
5.00.2919.800 = Explorer 5.01 (W2K RC1)
5.00.2919.3800 = Explorer 5.01 (W2K 2000 RC2)
5.00.2919.6307 = Explorer 5.01 (Also with Office 2000 SR-1)
5.00.2919.6400 = Explorer 5.01
5.00.2920.0000 = Explorer 5.01 (W2K, build 5.00.2195)
5.00.3103.1000 = Explorer 5.01 SP1 (W2K 2000)
5.00.3105.0106 = Explorer 5.01 SP1 (W95, W98, NT4)
5.00.3314.2100 = Explorer 5.01 SP2 (W95, W98, NT4)
5.00.3314.2101 = Explorer 5.01 SP2 (W95, W98, NT4)
5.00.3315.1000 = Explorer 5.01 SP2 (W2K)
5.00.3315.2879 = Explorer 5.01 SP2 (W2K)
5.50.3825.1300 = Explorer 5.5 Developer Preview (Beta)
5.50.4030.2400 = Explorer 5.5 & Internet Tools Beta
5.50.4134.0100 = Explorer 5.5 Windows Me (4.90.3000)
5.50.4134.0600 = Explorer 5.5
5.50.4308.2900 = Explorer 5.5 Advanced Security Privacy Beta
5.50.4522.1800 = Explorer 5.5 SP1
5.50.4611.1300 = Explorer 5.5 SP1
5.50.4807.2300 = Explorer 5.5 SP2
6.0.2462.0000 = Explorer 6 Public Preview (Beta)
6.0.2479.0006 = Explorer 6 Public Preview (Beta)
6.0.2600.0000 = Explorer 6
6.0.2600.0000 = Explorer 6
6.0.2600.0000 = Explorer 6
6.0.2713.1100 = Explorer 6
6.0.2713.1500 = Explorer 6