Windows get version info

Which version of Windows operating system am I running?

Find operating system info in Windows 10

To find out which version of Windows your device is running, press the Windows logo key + R, type winver in the Open box, and then select OK.

Here’s how to learn more:

Select the Start button > Settings > System > About .

Under Device specifications > System type, see if you’re running a 32-bit or 64-bit version of Windows.

Under Windows specifications, check which edition and version of Windows your device is running.

If you’re having a problem with activation, see Activate in Windows 10.

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find operating system info in Windows 8.1 or Windows RT 8.1

To find out which version of Windows your device is running, press the Windows logo key + R, type winver in the Open box, and then select OK.

If your device is running Windows 8.1 or Windows RT 8.1, here’s how to learn more:

If you’re using a touch device, swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. Continue to step 3.

If you’re using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.

Select PC and devices > PC info.

Under Windows you’ll see which edition and version of Windows your device is running.

Under PC > System type you’ll see if you’re running a 32-bit or 64-bit version of Windows.

If you’re having a problem with activation, see Activate Windows 7 or Windows 8.1

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find operating system info in Windows 7

Select the Start button, type Computer in the search box, right-click on Computer, and then select Properties.

Under Windows edition, you’ll see the version and edition of Windows that your device is running.

Support for Windows 7 ended on January 14, 2020

We recommend you move to a Windows 10 PC to continue to receive security updates from Microsoft.

If you’re having a problem with activation, see Activate Windows 7 or Windows 8.1.

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find windows OS version from command line

Windows has command line utilities that show us the version of the Windows OS running on the computer, including the service pack number. There are multiple CMD commands that help with finding this, you can pick the one that suits your need. Ver command can show you the OS version whereas Systeminfo command can additionally give you service pack, OS edition and build number etc.

Читайте также:  Код остановки attempted write to readonly memory windows 10

Find OS Version and Service Pack number from CMD

As you can see above, ver command shows only OS version but not the service pack number. We can find service pack number as well with Systeminfo command. Systeminfo dumps lot of other information too, which we can filter out using findstr command.

This command works on XP, Vista and Windows 7 and on Server editions also. Find below example for Win7.

In case of Windows 7 SP1, the output would be slightly different as below.

If you want to print more details, then you can use just ‘OS’ in the findstr search pattern. See example below for Server 2008.

Check Windows version using WMIC command

Run the below WMIC command to get OS version and the service pack number.

Example on Windows 7:

If you want to find just the OS version, you can use ver command. Open command window and execute ver command. But note that this does not show service pack version.

This command does not show version on a Windows 7 system.

GetVersion function (sysinfoapi.h)

GetVersion may be altered or unavailable for releases after WindowsВ 8.1. Instead, use the Version Helper functions. For Windows 10 apps, please see Targeting your applications for Windows.

With the release of WindowsВ 8.1, the behavior of the GetVersion API has changed in the value it will return for the operating system version. The value returned by the GetVersion function now depends on how the application is manifested.

Applications not manifested for WindowsВ 8.1 or WindowsВ 10 will return the WindowsВ 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersion will always return the version that the application is manifested for in future releases. To manifest your applications for WindowsВ 8.1 or WindowsВ 10, refer to Targeting your application for Windows.

Syntax

Parameters

This function has no parameters.

Return value

If the function succeeds, the return value includes the major and minor version numbers of the operating system in the low-order word, and information about the operating system platform in the high-order word.

For all platforms, the low-order word contains the version number of the operating system. The low-order byte of this word specifies the major version number, in hexadecimal notation. The high-order byte specifies the minor version (revision) number, in hexadecimal notation. The high-order bit is zero, the next 7 bits represent the build number, and the low-order byte is 5.

Remarks

The GetVersionEx function was developed because many existing applications err when examining the packed DWORD value returned by GetVersion, transposing the major and minor version numbers. GetVersionEx forces applications to explicitly examine each element of version information. VerifyVersionInfo eliminates further potential for error by comparing the required system version with the current system version for you.

Examples

The following code fragment illustrates how to extract information from the GetVersion return value: OSVERSIONINFOEX

File Version Info Класс

Определение

Содержит сведения о версии физического файла на диске. Provides version information for a physical file on disk.

Примеры

В следующем примере вызывается метод для GetVersionInfo получения FileVersionInfo для блокнота. The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Затем на консоль выводится описание и номер версии файла. Then it prints the file description and version number to the console.

Комментарии

Как правило, номер версии отображается как «основной номер. дополнительный номер. номер сборки. частный номер части». Typically, a version number is displayed as «major number.minor number.build number.private part number». Номер версии файла — это 64-разрядное число, содержащее номер версии файла следующим образом: A file version number is a 64-bit number that holds the version number for a file as follows:

Читайте также:  Linux не освобождает память

Первые 16 бит — это FileMajorPart число. The first 16 bits are the FileMajorPart number.

Следующие 16 бит — это FileMinorPart число. The next 16 bits are the FileMinorPart number.

Третий набор из 16 бит — это FileBuildPart число. The third set of 16 bits are the FileBuildPart number.

Последние 16 разрядов — это FilePrivatePart число. The last 16 bits are the FilePrivatePart number.

Используйте GetVersionInfo метод этого класса для получения FileVersionInfo сведений о файле, а затем просмотрите свойства для получения сведений о файле. Use the GetVersionInfo method of this class to get a FileVersionInfo containing information about a file, then look at the properties for information about the file. FileVersionСвойство предоставляет сведения о версии файла. The FileVersion property provides version information about the file. ProductMajorPartСвойства. ProductMinorPart ProductBuildPart ProductPrivatePart и ProductVersion предоставляют сведения о версии продукта, частью которого является указанный файл. The ProductMajorPart, ProductMinorPart, ProductBuildPart, ProductPrivatePart, and ProductVersion properties provide version information for the product that the specified file is a part of. Вызовите ToString , чтобы получить частичный список свойств и их значений для этого файла. Call ToString to get a partial list of properties and their values for this file.

FileVersionInfoСвойства основаны на сведениях о ресурсах версий, встроенных в файл. The FileVersionInfo properties are based on version resource information built into the file. Ресурсы версий часто встроены в двоичные файлы, такие как exe-или DLL-файлы; текстовые файлы не имеют сведений о ресурсах версии. Version resources are often built into binary files such as .exe or .dll files; text files do not have version resource information.

Ресурсы версии обычно указываются в файле ресурсов Win32 или в атрибутах сборки. Version resources are typically specified in a Win32 resource file, or in assembly attributes. Например, IsDebug свойство отражает VS_FF_DEBUG значение флага в VS_FIXEDFILEINFO блоке файла, созданного на основе VERSIONINFO ресурса в файле ресурсов Win32. For example the IsDebug property reflects the VS_FF_DEBUG flag value in the file’s VS_FIXEDFILEINFO block, which is built from the VERSIONINFO resource in a Win32 resource file. Дополнительные сведения об указании ресурсов версий в файле ресурсов Win32 см. в разделе «сведения о файлах ресурсов» и «ресурс VERSIONINFO» раздела Platform SDK. For more information about specifying version resources in a Win32 resource file, see «About Resource Files» and «VERSIONINFO Resource» in the Platform SDK. Дополнительные сведения об указании ресурсов версий в модуле .NET см. в разделе Установка атрибутов сборки . For more information about specifying version resources in a .NET module, see the Setting Assembly Attributes topic.

Этот класс выполняет запрос ссылки на уровне класса, который применяется ко всем элементам. This class makes a link demand at the class level that applies to all members. SecurityExceptionИсключение возникает, если непосредственный вызывающий объект не имеет разрешения полного доверия. A SecurityException is thrown when the immediate caller does not have full trust permission. Дополнительные сведения о требованиях к ссылкам см. в разделе запросы компоновки. For details about link demands, see Link Demands.

Свойства

Получает комментарии к файлу. Gets the comments associated with the file.

Получает название организации, которая является создателем файла. Gets the name of the company that produced the file.

Получает номер сборки файла. Gets the build number of the file.

Получает описание файла. Gets the description of the file.

Получает основную часть номера версии. Gets the major part of the version number.

Получает вспомогательную часть номера версии файла. Gets the minor part of the version number of the file.

Читайте также:  Виджет для windows 10 таймер отключения

Получает имя файла, который описывается данным экземпляром класса FileVersionInfo. Gets the name of the file that this instance of FileVersionInfo describes.

Получает номер закрытой части файла. Gets the file private part number.

Получает номер версии файла. Gets the file version number.

Получает внутреннее имя файла (если оно существует). Gets the internal name of the file, if one exists.

Получает значение, показывающее, содержит ли файл данные отладки или производится ли его компиляция с помощью доступных средств отладки. Gets a value that specifies whether the file contains debugging information or is compiled with debugging features enabled.

Получает значение, указывающее, был ли файл изменен и не совпадает ли он с исходным файлом той же версии. Gets a value that specifies whether the file has been modified and is not identical to the original shipping file of the same version number.

Получает значение, указывающее, является ли версия файла версией разработчика, или коммерческой версией продукта. Gets a value that specifies whether the file is a development version, rather than a commercially released product.

Получает значение, указывающее, создан ли файл с помощью стандартных процедур. Gets a value that specifies whether the file was built using standard release procedures.

Получает значение, указывающее, является ли файл особой сборкой. Gets a value that specifies whether the file is a special build.

Получает языковую строку по умолчанию для блока сведений о версии. Gets the default language string for the version info block.

Получает все уведомления об авторских правах, применимые к указанному файлу. Gets all copyright notices that apply to the specified file.

Получает товарные знаки и охраняемые товарные знаки, применимые к файлу. Gets the trademarks and registered trademarks that apply to the file.

Получает имя, под которым создавался файл. Gets the name the file was created with.

Получает сведения о закрытой версии файла. Gets information about a private version of the file.

Получает номер сборки продукта, с которым связан файл. Gets the build number of the product this file is associated with.

Получает основную часть номера версии продукта, с которым связан файл. Gets the major part of the version number for the product this file is associated with.

Получает вспомогательную часть номера версии продукта, с которым связан файл. Gets the minor part of the version number for the product the file is associated with.

Получает название продукта, с которым распространяется файл. Gets the name of the product this file is distributed with.

Получает закрытую часть номера продукта, с которым связан файл. Gets the private part number of the product this file is associated with.

Получает версию продукта, с которым распространяется этот файл. Gets the version of the product this file is distributed with.

Получает сведения об особой сборке файла. Gets the special build information for the file.

Методы

Определяет, равен ли указанный объект текущему объекту. Determines whether the specified object is equal to the current object.

(Унаследовано от Object) GetHashCode()

Служит хэш-функцией по умолчанию. Serves as the default hash function.

(Унаследовано от Object) GetType()

Возвращает объект Type для текущего экземпляра. Gets the Type of the current instance.

(Унаследовано от Object) GetVersionInfo(String)

Возвращает класс FileVersionInfo, предоставляющий сведения о версии указанного файла. Returns a FileVersionInfo representing the version information associated with the specified file.

Создает неполную копию текущего объекта Object. Creates a shallow copy of the current Object.

(Унаследовано от Object) ToString()

Возвращает неполный список свойств класса FileVersionInfo с их значениями. Returns a partial list of properties in the FileVersionInfo and their values.

Оцените статью