Ok even after ken's misguided poking (funny stuff really). i coded up my own OS function based off an older PHP one i used to use.
I can only test it on Win XP, Win 2k, Win 2k3 and an ancient Mac. If you can test on other OS's I'd really appreciate it. just email me here or off list and I'll send you RAR or Zip of the code. Once it's been tested I'll drop it onto CFlib for inclusion. Execution is simple <cfoutout>#osDetect()#</cfoutput> This will return a string with the name and possible version of the OS. (which is what i wanted versus the CGI.HTTP_USER_AGENT ugliness). TIA for the testing, and Friday diversion :) Oh yea ken just to show you there is no heart feelings here's some code you can use to show the server version you CF application is running on (this only took me 9 minutes to write): <cfif cgi.server_software neq ""> <cfset myServer= cgi.server_software> <cfelse> <cfset myServer= "unknown"> </cfif> jonese On 3/10/06, Mingo Hagen <[EMAIL PROTECTED]> wrote: > Okay, > > I personally usualy use some combinations of cgi.user_agent, which do > count on the cgi.user_agent string being correct, and not faked, like u > can do in most browsers either through a plugin or nativly. So for > instanct <cfif cgi.user_agent contains 'mac' and not cgi.user_agent > contains 'win'> means your probably on a mac, etc. > > It would be cool if there is some kind of api to contact a user_agent > database (I believe there are several online, and free) which then > return more usable variables, like IsMac or IsIE. > > Regards, > Mingo. > > > > > > > Munson, Jacob wrote: > > >><cfif cgi.http_user_agent neq ""> > >> > >><cfset usersOS = CGI.HTTP_USER_AGENT> > >> > >><cfelse> > >> > >><cfset usersOS = "unknown"> > >> > >></cfif> > >> > >>Now, if you're not sufficiently advanced in CF development, > >>I'd suggest > >>asking for help with this one! Seriously Jonese, I'm sorry to > >>be having > >>fun with this at your expense, but you spent way more time > >>looking for a > >>function to do this than it would have taken for you to write > >>a couple > >>of lines of code and that's even if you only spent 10 minutes looking! > >> > >> > > > >I think you are kind of joking, and I do agree that the answer could > >have been found if the poster poked about a bit, but I have to say that > >your code will not return the operating system. It will return a bunch > >of data that may or may not include the operating system. That is why > >the original poster was hoping someone would give him some direction on > >a function that will extract the OS from the metadata that all of the > >various systems out there can return. Also, problems like these are why > >a company like BrowserHawk is in business. It's not an easy question to > >answer. > > > > > >------------- > > > >This transmission may contain information that is privileged, confidential > >and/or exempt from disclosure under applicable law. If you are not the > >intended recipient, you are hereby notified that any disclosure, copying, > >distribution, or use of the information contained herein (including any > >reliance thereon) is STRICTLY PROHIBITED. If you received this transmission > >in error, please immediately contact the sender and destroy the material in > >its entirety, whether in electronic or hard copy format. Thank you. A1. > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235054 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

