New topic: Get the OS name ?
<http://forums.realsoftware.com/viewtopic.php?t=44034> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message prakashp Post subject: Get the OS name ?Posted: Wed May 16, 2012 2:08 pm Joined: Tue Dec 27, 2011 8:54 am Posts: 89 Hi All, Quote:Is there any way in Real Basic to get the name of the Operating System with out using any 3rd party plug-in? Thanks, Prakash Top elChupete Post subject: Re: Get the OS name ?Posted: Wed May 16, 2012 2:50 pm Joined: Fri Jun 05, 2009 11:50 am Posts: 309 Location: Hamburg, Germany Have a look at my error dump code which you can find here It includes functions to get the os name _________________ Best regards Stefan Mac OSX 10.7.3 on a MacBook Pro 2.66 GHz Intel Core i7/ RB Professional 2011 Release 3 Top kbrunner Post subject: Re: Get the OS name ?Posted: Wed May 16, 2012 5:20 pm Joined: Tue Jan 15, 2008 1:21 am Posts: 33 This is what I use for PC and Mac: Dim myShell As New Shell #If TargetMacOS myShell.Execute("system_profiler SPSoftwareDataType | grep 'System Version:' | grep -o 'Mac[^0-9]*[0-9]*\.[0-9]*'") If myShell.ErrorCode = 0 Then Me.computerOS = Trim(myShell.result.DefineEncoding(Encodings.UTF8)) End If #ElseIf TargetWin32 myShell.Execute("ver") If myShell.ErrorCode = 0 Then Me.computerOS = Trim(myShell.Result) End If #EndIf myShell.Close Buy you may need to be more specific about what you want exactly to have included in the OS-Name. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
