Get OS Information - Windows XP vs. Windows 7

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Get OS Information - Windows XP vs. Windows 7

Alex Greber
"System osSystem" answers 'WIN32_NT' on both OS Windows XP vs. Windows 7.
Any suggestions?
Regards .. Alex
 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/s46qf0F4AtMJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Get OS Information - Windows XP vs. Windows 7

John O'Keefe-3
Alex -
 
Did you mean System osType?  You can find the specific version of Windows using System osVersion (for example, this answers '5.1 build 2600 Service Pack 3' on WinXP).
 
John

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/lATS53bNG30J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Get OS Information - Windows XP vs. Windows 7

Narender Sharma
In Java
System.getProperty( "os.name") gives "Windows XP"
and System.getProperty( "os.version") gives "5.1"

I think we can achieve the same in smalltalk. One of the way could be to read from registry (but then registry can always be tweaked).

Thanks!


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/jzYfrL4_biQJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Thanks!

Narender
Reply | Threaded
Open this post in threaded view
|

Re: Get OS Information - Windows XP vs. Windows 7

Alex Greber
In reply to this post by Alex Greber
Hoi John.
 
Yes I meant "System osType"
 
So Looking at the first 3 characters of String "System osVersion" is the solution.
 
Operating system Version number
Windows 7 6.1
Windows Server 2008 R2 6.1
Windows Server 2008 6.0
Windows Vista 6.0
Windows Server 2003 R2 5.2
Windows Server 2003 5.2
Windows XP 64-Bit Edition 5.2
Windows XP 5.1
Windows 2000 5.0
 
 
Thanks! Alex
 
 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/LfWpb6n3xXkJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Get OS Information - Windows XP vs. Windows 7

Narender Sharma
This is valuable information. Thanks for sharing it.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/RnEVAvE4uQYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Thanks!

Narender
Reply | Threaded
Open this post in threaded view
|

Re: Get OS Information - Windows XP vs. Windows 7

Narender Sharma
In reply to this post by Alex Greber
One thing that is problematic with version numbers is that they are not unique for different OS...

Operating system

Version number
Windows 7 6.1
Windows Server 2008 R2 6.1
Windows Server 2008 6.0
Windows Vista 6.0
Windows Server 2003 R2 5.2
Windows Server 2003 5.2
Windows XP 64-Bit Edition 5.2

Thanks!

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/QNV-_28I3DIJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Thanks!

Narender