AshishS
(Fresh Scripter)
2009-10-30 12:27 AM
Browser Version

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


AllenAdministrator
(KiX Supporter)
2009-10-30 05:07 AM
Re: Browser Version

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


NaasMarais
(Fresh Scripter)
2009-10-30 09:28 AM
Re: Browser Version

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


AshishS
(Fresh Scripter)
2009-10-30 04:53 PM
Re: Browser Version

Thanks Allen & NaasMarais for help. I really appreciate it.

AshishS
(Fresh Scripter)
2009-10-30 07:31 PM
Re: Browser Version

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.


AshishS
(Fresh Scripter)
2009-10-30 10:38 PM
Re: Browser Version

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


AllenAdministrator
(KiX Supporter)
2009-10-30 11:32 PM
Re: Browser Version

 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)


Glenn BarnasAdministrator
(KiX Supporter)
2009-10-31 05:50 PM
Re: Browser Version

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