With windows 10 being marked as 10, like this:
I tried doing this for windows 11 and it did not work:
In short, I am trying to detect the windows version (and more ideally) the feature pack of windows to run certain commands from my batch file and I am having trouble getting it to detect the difference between windows 10 and windows 11.
I would prefer something that works with batch as my entire utility is made in it, and to jump out to que powershell would be a pain. I am sure it's easily doable and I am just missing something. Or perhaps there is a better way than using if version?
Let me know.
Thanks in advance!
Batch:
if "%version%" == "10.0" goto ver_Win10updatefix
I tried doing this for windows 11 and it did not work:
Batch:
if "%version%" == "10.0.22000.0" goto ver_Win11updatefix
In short, I am trying to detect the windows version (and more ideally) the feature pack of windows to run certain commands from my batch file and I am having trouble getting it to detect the difference between windows 10 and windows 11.
I would prefer something that works with batch as my entire utility is made in it, and to jump out to que powershell would be a pain. I am sure it's easily doable and I am just missing something. Or perhaps there is a better way than using if version?
Let me know.
Thanks in advance!
My Computers
System One System Two
-
- OS
- Windows 11 Pro
- Computer type
- Laptop
- Manufacturer/Model
- Dell G15 5525
- CPU
- Ryzen 7 6800H
- Memory
- 32 GB DDR5 4800mhz
- Graphics Card(s)
- RTX 3050 4GB Vram
- Screen Resolution
- 1920 x 1080
- Hard Drives
- 2TB Solidigm™ P41 Plus nvme
- Internet Speed
- 800mbps down, 20 up
-
- Operating System
- Windows 11
- Computer type
- Tablet
- Manufacturer/Model
- Lenovo ideapad flex 14API 2 in 1
- CPU
- Ryzen 5 3500u
- Motherboard
- LENOVO LNVNB161216 (FP5)
- Memory
- 12GB DDR4
- Graphics card(s)
- AMD Radeon Vega 8 Graphics
- Hard Drives
- 256 GB Samsung ssd nvme