windowsversion

Identify Windows Editions

冷暖自知 提交于 2020-01-05 01:53:15
问题 I am writing a function which prints out detailed Windows Version informations, the output may be a tuple like this: ('32bit', 'XP', 'Professional', 'SP3', 'English') It will be supporting Windows XP and above. And I'm stuck with getting the Windows edition, e.g., "Professional", "Home Basic", etc. platform.win32_ver() or sys.getwindowsversion() doesn't do it for me. win32api.GetVersionEx(1) almost hits, but looks like it doesn't tell me enough information. Then I saw GetProductInfo(), but

Identify Windows Editions

北城余情 提交于 2020-01-05 01:53:12
问题 I am writing a function which prints out detailed Windows Version informations, the output may be a tuple like this: ('32bit', 'XP', 'Professional', 'SP3', 'English') It will be supporting Windows XP and above. And I'm stuck with getting the Windows edition, e.g., "Professional", "Home Basic", etc. platform.win32_ver() or sys.getwindowsversion() doesn't do it for me. win32api.GetVersionEx(1) almost hits, but looks like it doesn't tell me enough information. Then I saw GetProductInfo(), but

Windows version in c# [duplicate]

浪子不回头ぞ 提交于 2019-12-19 15:06:25
问题 This question already has answers here : Detect Windows version in .net (14 answers) Closed 3 years ago . I want to know which Windows version the PC has.. in C# Framework 3.5 I have tried using OperatingSystem os = Environment.OSVersion; Version ver = os.Version; But the result is Plataform: WIN32NT version 6.2.9200 Version minor: 2 Version Major: 6 The problem is that I have "Windows 8 Pro"... How can I detect it? Thanks 回答1: You will have to match version numbers with the appropriate

How to check Windows edition in Java?

人盡茶涼 提交于 2019-12-18 03:33:08
问题 I want to check Windows edition (Basic or Home or Professional or Business or other) in Java. How do I do this? 回答1: You can always use Java to call the Windows command 'systeminfo' then parse out the result, I can't seem to find a way to do this natively in Java. import java.io.*; public class GetWindowsEditionTest { public static void main(String[] args) { Runtime rt; Process pr; BufferedReader in; String line = ""; String sysInfo = ""; String edition = ""; String fullOSName = ""; final

How can I determine the Windows version from a VB 6 app?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 18:37:44
问题 I want to detect any Windows versions from 95 to Win 7. I also would like to display if the OS is 32-bit or 64-bit. That's it; it's that simple. :) What code could I use to do this from within a VB 6 application? 回答1: Update: For code that correctly detects Windows 8.1 and Windows 10, see this answer. The code below still works fine for older versions of Windows, but it will report anything newer than Windows 8 as being Windows 8. The "bitness" testing code shown at the bottom (to see if the

Windows version in c# [duplicate]

邮差的信 提交于 2019-12-01 15:52:03
This question already has an answer here: Detect Windows version in .net 13 answers I want to know which Windows version the PC has.. in C# Framework 3.5 I have tried using OperatingSystem os = Environment.OSVersion; Version ver = os.Version; But the result is Plataform: WIN32NT version 6.2.9200 Version minor: 2 Version Major: 6 The problem is that I have "Windows 8 Pro"... How can I detect it? Thanks You will have to match version numbers with the appropriate string value yourself. Here is a list of the most recent Windows OS and their corresponding version number: Windows Server 2016

GetVersionEx under Windows 8

一曲冷凌霜 提交于 2019-11-30 12:02:05
问题 I'm writing a C++ code to determine what OS it is running on. I use GetVersionEx() API to do that, and this code as a tutorial, but it doesn't seems to handle Windows 8. Does anyone know how to fix it to run under Windows 8? 回答1: According to several comments in the MSDN forums and this article the version number for Windows 8 is 6.2 This is the sample code updated and tested in Windows 8 Developer Preview #include "stdafx.h" #include <windows.h> #include <iostream> using namespace std;

GetVersionEx under Windows 8

别说谁变了你拦得住时间么 提交于 2019-11-30 01:54:27
I'm writing a C++ code to determine what OS it is running on. I use GetVersionEx() API to do that, and this code as a tutorial, but it doesn't seems to handle Windows 8. Does anyone know how to fix it to run under Windows 8? According to several comments in the MSDN forums and this article the version number for Windows 8 is 6.2 This is the sample code updated and tested in Windows 8 Developer Preview #include "stdafx.h" #include <windows.h> #include <iostream> using namespace std; #include <tchar.h> #include <stdio.h> #include <strsafe.h> #pragma comment(lib, "User32.lib") #define BUFSIZE 256

How to check Windows edition in Java?

吃可爱长大的小学妹 提交于 2019-11-29 01:58:38
I want to check Windows edition (Basic or Home or Professional or Business or other) in Java. How do I do this? You can always use Java to call the Windows command 'systeminfo' then parse out the result, I can't seem to find a way to do this natively in Java. import java.io.*; public class GetWindowsEditionTest { public static void main(String[] args) { Runtime rt; Process pr; BufferedReader in; String line = ""; String sysInfo = ""; String edition = ""; String fullOSName = ""; final String SEARCH_TERM = "OS Name:"; final String[] EDITIONS = { "Basic", "Home", "Professional", "Enterprise" };

Getting Windows OS version programmatically

╄→尐↘猪︶ㄣ 提交于 2019-11-27 22:22:53
I am trying to fetch Windows version with C# on my Windows 10 machine. I always get those values (with C#\C++): Major: 6 Minor: 2 Which is Windows 8 OS, accordingly to MSDN C# code: var major = OperatingSystem.Version.Major var minor = OperatingSystem.Version.Minor C++ code void print_os_info() { //http://stackoverflow.com/questions/1963992/check-windows-version OSVERSIONINFOW info; ZeroMemory(&info, sizeof(OSVERSIONINFOW)); info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); LPOSVERSIONINFOW lp_info = &info; GetVersionEx(lp_info); printf("Windows version: %u.%u\n", info.dwMajorVersion, info