Page 1 of 1 1
Topic Options
#196522 - 2009-10-30 12:27 AM Browser Version
AshishS Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 20
All,
Is there a way to find out the browser version via login script? My goal is to install IE7 via login script on Windows XP PCs only and I have that part working good. I just don't want to run the IE7 install if it already exists. Below is what I have so far. If anyone can help, that would be greatly appreciated.

If @ProductType="Windows XP Professional"
run "\\camcfilesrv01\Microsoft\ieupgrade.bat"
EndIf

Top
#196523 - 2009-10-30 05:07 AM Re: Browser Version [Re: AshishS]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
This hasn't been updated in a while, but should give you some direction on how to figure it out.

GetIEVersion() - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=109275

Top
#196525 - 2009-10-30 09:28 AM Re: Browser Version [Re: Allen]
NaasMarais Offline
Fresh Scripter

Registered: 2009-08-06
Posts: 40
Loc: South Africa, JHB
Hi

You can try this

 Code:
If @ProductType="Windows XP Professional"
   $IEVersion = ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\","Version")
Endif

If $IEVersion = "7.0.5730.13"
 ? "$IEVersion"
Sleep 5
  Exit
 Else
  run "\\camcfilesrv01\Microsoft\ieupgrade.bat"
Endif


Cheers


Edited by NaasMarais (2009-10-30 09:29 AM)
_________________________
KIX Scripting is the Bomb!!

Top
#196536 - 2009-10-30 04:53 PM Re: Browser Version [Re: NaasMarais]
AshishS Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 20
Thanks Allen & NaasMarais for help. I really appreciate it.
Top
#196538 - 2009-10-30 07:31 PM Re: Browser Version [Re: AshishS]
AshishS Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 20
NaasMarais,
I copied your code and put it in my login script. Issue I'm having now is that it doesn't run properly. The message that I see is just bunch of numbers and it doesn't finish running the rest of the script. Any ideas?

Thanks for your help.

Top
#196539 - 2009-10-30 10:38 PM Re: Browser Version [Re: AshishS]
AshishS Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 20
OK...I was able to modify the script and use it for what I needed it to do. Thanks for everyone's help.

;IE 7 Upgrade
If @PRODUCTTYPE="Windows XP Professional"
$IEVersion=ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\","Version")
Endif

If $IEVersion <> "7.0.5730.13"
Run "\\camcfilesrv01\Microsoft\ieupgrade.bat"
Endif

Top
#196540 - 2009-10-30 11:32 PM Re: Browser Version [Re: AshishS]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
 Code:
If $IEVersion <> "7.0.5730.13"
Run "\\camcfilesrv01\Microsoft\ieupgrade.bat"
Endif 


A couple of problems here... what happens if the IE version is higher than 7? Say version 8 is installed. Are you going to try to reinstall 7 over top of it? Second, do you know for certain this is the only version number for IE7? If not, you will be installing over and over and... Also, you are comparing a string instead of a number, and you might get unexpected results. If you look at the link above you will see how they break out the major, minor, etc, but for simplicity you could do something like,

 Code:
$CurrentIEVersionAllowed=7
if val(left($IEVersion,1))<$CurrentIEVersionAllowed
  ;do stuff
endif  


(This is untested)

Top
#196542 - 2009-10-31 05:50 PM Re: Browser Version [Re: AshishS]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
You can use this Version Comparison UDF to accurately compare multi-component version strings (strings that look like "7.24.39.125.14"). It uses a weighting system so something like "2.0" is greater than "1.823.92.86".

I use it often to compare program versions to minimum-acceptable version numbers.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.045 seconds in which 0.017 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org