![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #11 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version Bob Barrows wrote: Quote: > jharp80 wrote: Quote: > > On Jun 15, 7:09 am, "Bob Barrows" <reb01...@xxxxxx> wrote: Quote: > >> jharp80 wrote: > >>> Hi I would like to detect broswer type and version (Example FF2, > >>> FF3, IE, so on) on the client side using VBScript. > > > > >> You will not be able to use vbscript with Firefox - it is not > >> supported. You > >> will need to use javascript instead. > > > > >>> I appreciate any script > >>> on this I can do; and if not available some general guidelines > i need >>> to query. or is it possible to do this through reading > registry >>> keys. Quote: Quote: > > > > >> No registry keys are needed. DHTM should suffice. > >> See:http://www.dynamicdrive.com/dynamici...sersniffer.htm > > > > > Thanks for your reply. I am interested in detecting only Firefox and > > IE versions installed. > Installed? That's a different question. That answer would require a > search of the registry. > Quote: > > And I like to do so without the browesers > > actually launched. > > > > I have an hta script; so the code that I am looking for to do the > > detection will be included in that hta script written in VBScript. > An HTA page runs in a browser doesn't it? It just uses a different > library to process the html. > Quote: > > There must be a way to detect firefox as well, the script you > > mentioned seems to support detection of several broswers but Firefox > I found that page via a google search that had many more hits, many of > which will contain the details for firefox: > http://lmgtfy.com/?q=javascript+browser+detection MSHTA.EXE. It is independent of IE or FireFox. Regards, Mark D. MacLachlan -- |
My System Specs![]() |
| | #12 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version Mark D. MacLachlan wrote: Quote: > Bob Barrows wrote: Quote: >> An HTA page runs in a browser doesn't it? It just uses a different >> library to process the html. >> > MSHTA.EXE. It is independent of IE or FireFox. > -- Bob Barrows |
My System Specs![]() |
| | #13 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version Quote: > Actually an HTA does not run in a browser, it runs in the process > MSHTA.EXE. It is independent of IE or FireFox. > minor differences connected with MSHTA.exe, and an extra <HTA tag that mshta processes. If you look at the window hierarchy you'll see that under the mshta window is a window of class Internet Explorer_Server. That's an IE browser window. It's the window class that an IE webpage runs in, whether it's IE, a WebBrowser control, an HTA, or even a pre-XP Active Desktop folder window. They're all basically IE. The difference is only in the "chrome" or parent window frame. |
My System Specs![]() |
| | #14 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version That method seems a bit iffy. You're assuming that FF is in Program Files and that the folder is the default. I happen to use simply "Firefox" as the parent folder, which is an easy choice to make during install. Likewise, someone might easily not install to P.F. In fact, avoiding the PF folder has been a favorite trick of people struggling with UAC under Vista. Quote: > Dim objFSO > strComputer = "." > > Set objFSO = CreateObject("Scripting.FileSystemObject") > > If objFSO.FileExists("C:\Program Files (x86)\Mozilla > Firefox\FireFox.exe") Then > FF = "C:\\Program Files (x86)\\Mozilla Firefox\\FireFox.exe" > ElseIf objFSO.FileExists("C:\Program Files\Mozilla > Firefox\FireFox.exe") Then > FF = "C:\\Program Files\\Mozilla Firefox\\FireFox.exe" > Else > FF = "NotFound" 'FireFox not found > End If > > If FF <> "NotFound" Then > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & > "\root\cimv2") > Set colFiles = objWMIService.ExecQuery _ > ("Select * from CIM_Datafile Where name = '" & FF &"'") > For Each objFile in colFiles > Wscript.Echo "FireFox Version: " & objFile.Version > Next > End If > [/code] > > -- > |
My System Specs![]() |
| | #15 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version >>' NAME: GetFireFoxVersion.vbs Quote: Quote: >>' >>' AUTHOR: Mark D. MacLachlan , The Spider's Parlor >>' URL: http://www.thespidersparlor.com >>' DATE : 1/27/2009 >>' COPYRIGHT © 2009, All Rights Reserved >>' Quote: Quote: > > If FF <> "NotFound" Then > > Set objWMIService = GetObject("winmgmts:" _ > > & "{impersonationLevel=impersonate}!\\" & strComputer & > > "\root\cimv2") > > Set colFiles = objWMIService.ExecQuery _ > > ("Select * from CIM_Datafile Where name = '" & FF &"'") > > For Each objFile in colFiles > > Wscript.Echo "FireFox Version: " & objFile.Version > > Next thread you'd know that there's another glitch with this method. Using a simplified version of your script: Set objFile = GetObject("winmgmts:CIM_Datafile.Name='C:\program files\firefox\firefox.exe'") MsgBox objFile.Version I have FF 1.5 installed. It returns v. 1.8. That's because the FF file version is actually the gecko version. The real file version is the product version. There's a cross-reference chart here: http://en.wikipedia.org/wiki/Gecko_(layout_engine) One has to wonder why you took the trouble to post such an off-the-cuff response to a thread that's been closed for two weeks, and without even reading the oher posts, unless it's just to spam the group with your ad for a $150 package of scripts. Incidentally, I'm not claiming any copyright on my two lines of script posted above. You can have them both for a one-time-only-special-price of *free*. ![]() |
My System Specs![]() |
| | #16 (permalink) |
| | Re: newbie Help: HOW to use VBSCript on clientside to detect browser type and version Mayayana, I didn't realize it was considered bad form to try to provide additional methods to a problem. I've just started using these forums at the recommendation of a coworker. I've provided free technical support on the Tek-Tips web site for years, having posted over 10K replies and been an MVP on that site for many years. I guess the biggest difference between the sites is that Tek-Tips management has a no flame policy. Your post is an unprovoked personal attack. Why you should care that I add copyright and disclaimer information to a script I have given for free is beyond my comprehension. I believe credit should be given where due as evidenced in my login script FAQ http://www.tek-tips.com/faqs.cfm?fid=5798 where I site others who contributed some functions. For the record I did read the entire threads and believed that information provided for IE was sufficient but I felt I could contribute to the discussion on FireFox. Good day to you. Mark |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Is Vbscript can support with many browser...? | VB Script | |||
| Detect which version of Visual Studio compiled a program | .NET General | |||
| browser version | Browsers & Mail | |||
| How to detect .NET Framework version of an Assembly | .NET General | |||
| Newbie Vista Version Question | Vista General | |||