AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi How to get Windows update number
Thema durchsuchen
Ansicht
Themen-Optionen

How to get Windows update number

Ein Thema von WojTec · begonnen am 11. Apr 2017 · letzter Beitrag vom 12. Apr 2017
Antwort Antwort
Seite 1 von 2  1 2      
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

How to get Windows update number

  Alt 11. Apr 2017, 15:03
How to get Windows 8+ version number? I don't mean TOSVersionInfoEx.dwMajorVersion/TOSVersionInfoEx.dwMinorVersion but something like 1511 or 1607 on Windows 10 This looks to be update version, I don't know how to name it exactly

And also I see in system info build number like this: (TOSVersionInfoEx.dwBuildNumber).953. Where to find the number after dot

Geändert von WojTec (11. Apr 2017 um 15:08 Uhr)
  Mit Zitat antworten Zitat
a.def
(Gast)

n/a Beiträge
 
#2

AW: How to get Windows update number

  Alt 11. Apr 2017, 15:05
I'm not sure but I think you have to get the version string from registry and parse it yourself.
  Mit Zitat antworten Zitat
Der schöne Günther

Registriert seit: 6. Mär 2013
6.156 Beiträge
 
Delphi 10 Seattle Enterprise
 
#3

AW: How to get Windows update number

  Alt 11. Apr 2017, 16:36
Zitat:
In Windows 8.1 and Windows 10, the GetVersion and GetVersionEx functions have been deprecated. In Windows 10, the VerifyVersionInfo function has also been deprecated. While you can still call the deprecated functions, if your application does not specifically target Windows 8.1 or Windows 10, you will get Windows 8 version (6.2.0.0).
=> https://msdn.microsoft.com/de-de/lib...(v=vs.85).aspx

You will have to include the manifest stuff from that page into your application. Then GetVersionEx(..) will return the true build number.
  Mit Zitat antworten Zitat
HolgerX

Registriert seit: 10. Apr 2006
Ort: Leverkusen
969 Beiträge
 
Delphi 6 Professional
 
#4

AW: How to get Windows update number

  Alt 11. Apr 2017, 17:31
A simple option:

http://www.delphipraxis.net/1311524-post27.html
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#5

Re: How to get Windows update number

  Alt 11. Apr 2017, 18:44
Yeah, with manifest old functions are working. But how to get OS version without manifest (I think check some file version from system is not real solution)?

BTW: if functions are deprecated, so why Delphi still uses it?

"Update number" I got from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion: ReleaseId, but I think this is not real solution too.

Some ideas
  Mit Zitat antworten Zitat
a.def
(Gast)

n/a Beiträge
 
#6

AW: How to get Windows update number

  Alt 11. Apr 2017, 18:49
Zitat:
"Update number" I got from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion: ReleaseId, but I think this is not real solution too.
I do it the same way.

Normally the version number is written in registry. If not, the user changed it for sure and this is not the problem of a program creator.
  Mit Zitat antworten Zitat
Der schöne Günther

Registriert seit: 6. Mär 2013
6.156 Beiträge
 
Delphi 10 Seattle Enterprise
 
#7

AW: Re: How to get Windows update number

  Alt 11. Apr 2017, 18:53
Yeah, with manifest old functions are working. But how to get OS version without manifest
I'm puzzled. "Yeah, I can open that door with that key over there, but how can I open the door without the key?"
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#8

Re: AW: Re: How to get Windows update number

  Alt 11. Apr 2017, 19:02
Why? This for sure will stop working some day, also MS told it's deprecated, so I'm looking for new solution
  Mit Zitat antworten Zitat
a.def
(Gast)

n/a Beiträge
 
#9

AW: How to get Windows update number

  Alt 11. Apr 2017, 19:32
Zitat:
Why? This for sure will stop working some day, also MS told it's deprecated, so I'm looking for new solution
Registry as long as it is working?
  Mit Zitat antworten Zitat
Der schöne Günther

Registriert seit: 6. Mär 2013
6.156 Beiträge
 
Delphi 10 Seattle Enterprise
 
#10

AW: How to get Windows update number

  Alt 11. Apr 2017, 19:33
I understand - It's about GetVersionEx being deprecated. Sorry

According to MS, the preferred solution is to use VerifyVersionInfo which (for now) behaves exactly the same except it returns a boolean whether the operating system matches your expectations rather than returning numbers.
Note that the "manifest stuff" still applies to VerifyVersionInfo. It's just not "deprecated", that's all.

This is also what the helper macros use, and they have been around for quite some time now.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz