Delphi Windows 10 Version Average ratng: 4,9/5 3830 reviews

Can anyone help me detect which version of Windows the user may be using?

I have seen some examples to do this, but they are not updated for Vista/7 Operating Systems.

Additionally it would be useful to detect if the OS is running on x32 or x64 architecture.

Thanks in advance. Isaithenral tamil songs free download.

user741875

4 Answers

On XE2 a new class was introduced to deal with this: TOSVersion.

  • Read TOSVersion.Architecture to check for 32 or 64 bit OS.
  • Read TOSVersion.Platform to check for Windows or Mac.
  • Read TOSVersion.Major and TOSVersion.Minor for version numbers.
  • Read TOSVersion.Name to obtain the basic product name, e.g. Windows 7.
  • Read TOSVersion.ToString to obtain the full product name with version, e.g. Windows 7 Service Pack 1 (Version 6.1, Build 7601, 64-bit Edition).

For older versions of Delphi I recommend the following:

In order to check for 2000, XP, Vista, 7 I suggest you read Win32MajorVersion and Win32MinorVersion.

  • major.minor = 5.0 => Windows 2000
  • major.minor = 5.1 => Windows XP
  • major.minor = 5.2 => Windows 2003 server or XP64
  • major.minor = 6.0 => Windows Vista/2008 server
  • major.minor = 6.1 => Windows 7/2008 server R2

The same information is available on MSDN, but the above came from my head!

If you are wanting very detailed product information then that takes a bit more work. How to install adobe lightroom. Warren's answer gives one good route to obtaining that information. If you are wanting to test capability then version numbers are fine.

Use CheckWin32Version to check if the prevailing OS exceeds a certain version level. Although you should check that the function works correctly in your Delphi since the implementation of that function in Delphi 6 and earlier was incorrect. Life after death biggie smalls album.

To find out what the native OS architecture is (32 or 64 bit), use the GetNativeSystemInfo function. This function is not available on older operating systems so you should load it explicitly with GetProcAddress. Test for wProcessorArchitecture=PROCESSOR_ARCHITECTURE_AMD64 to check for 64 bit OS.

David HeffernanDavid Heffernan

The JEDI JCL already does this, even on versions older than XE2. See David's answer for the built-in solution in XE2 and later.

Using the Jedi JCL, you can add unit JclSysInfo, and call function GetWindowsVersion. It returns an enumerated type TWindowsVersion.

Currently JCL contains all shipped windows versions, and gets changed each time Microsoft ships a new version of Windows in a box:

If you want to know if you're running 64-bit windows 7 instead of 32-bit, then call JclSysInfo.IsWindows64.

Note that JCL allso handles Editions, like Pro, Ultimate, etc. For that call GetWindowsEdition, and it returns one of these:

For historical interest, you can check the NT-level edition too with the NtProductType function, it returns:

Note that 'N editions' are detected above. That's an EU (Europe) version of Windows, created due to EU anti-trust regulations. That's a pretty fine gradation of detection inside the JCL.

Here's a sample function that will help you detect Vista, and do something special when on Vista.

Note that if you want to do 'greater than' checking, then you should just use other techniques. Also note that version checking can often be a source of future breakage. I have usually chosen to warn users and continue, so that my binary code doesn't become the actual source of breakage in the future.

Recently I tried to install an app, and the installer checked my drive free space, and would not install, because I had more than 2 gigabytes of free space. The 32 bit integer signed value in the installer became negative, breaking the installer. I had to install it into a VM to get it to work. Adding 'smart code' often makes your app 'stupider'. Be wary.

Incidentally, I found that from the command line, you can run WMIC.exe, and type path Win32_OperatingSystem (The 'Select * from Win32_OperatingSystem' didn't work for me). In future perhaps JCL could be extended to use the WMI information.

Warren PWarren P

The unit (GetWinVersionInfo) shown here detects up to Vista. I can't imagine updating it for Windows 7 would be that difficult. I don't think it tells you x86.x64 though.

Community
Vic AdamVic Adam

On delphidabbler.com there is a complete article about getting operating system version including 64 bits versions.The article hasn't been updated to include Vista/7 though. But the same functions might still work.

NameName

Delphi 8 is a .NET-only release that compiles Delphi Object Pascal code into .NET CIL. The IDE has been rewritten for this purpose and has changed to a docked interface similar to Microsoft's Visual Studio.NET.

Features
  • Delphi Free & Safe Download!
  • Delphi Latest Version!
  • Works with All Windows versions
  • Users choice!

Delphi is a product developed by Borland. This site is not directly affiliated with Borland. All trademarks, registered trademarks, product names and company names or logos mentioned herein are the property of their respective owners.

All informations about programs or games on this website have been found in open sources on the Internet. All programs and games not hosted on our site. When visitor click 'Download now' button files will downloading directly from official sources(owners sites). QP Download is strongly against the piracy, we do not support any manifestation of piracy. If you think that app/game you own the copyrights is listed on our website and you want to remove it, please contact us. We are DMCA-compliant and gladly to work with you. Please find the DMCA / Removal Request below.

DMCA / REMOVAL REQUEST

Please include the following information in your claim request:

  • Identification of the copyrighted work that you claim has been infringed;
  • An exact description of where the material about which you complain is located within the QPDownload.com;
  • Your full address, phone number, and email address;
  • A statement by you that you have a good-faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law;
  • A statement by you, made under penalty of perjury, that the above information in your notice is accurate and that you are the owner of the copyright interest involved or are authorized to act on behalf of that owner;
  • Your electronic or physical signature.

You may send an email to support [at] qpdownload.com for all DMCA / Removal Requests.

You can find a lot of useful information about the different software on our QP Download Blog page.

Latest Posts:

How do I uninstall Delphi in Windows Vista / Windows 7 / Windows 8?

  • Click 'Start'
  • Click on 'Control Panel'
  • Under Programs click the Uninstall a Program link.
  • Select 'Delphi' and right click, then select Uninstall/Change.
  • Click 'Yes' to confirm the uninstallation.

How do I uninstall Delphi in Windows XP?

  • Click 'Start'
  • Click on 'Control Panel'
  • Click the Add or Remove Programs icon.
  • Click on 'Delphi', then click 'Remove/Uninstall.'
  • Click 'Yes' to confirm the uninstallation.

How do I uninstall Delphi in Windows 95, 98, Me, NT, 2000?

  • Click 'Start'
  • Click on 'Control Panel'
  • Double-click the 'Add/Remove Programs' icon.
  • Select 'Delphi' and right click, then select Uninstall/Change.
  • Click 'Yes' to confirm the uninstallation.
  • How much does it cost to download Delphi?
  • Nothing! Download Delphi from official sites for free using QPDownload.com. Additional information about license you can found on owners sites.

  • How do I access the free Delphi download for PC?
  • It's easy! Just click the free Delphi download button at the top left of the page. Clicking this link will start the installer to download Delphi free for Windows.

  • Will this Delphi download work on Windows?
  • Yes! The free Delphi download for PC works on most current Windows operating systems.