I have list of few exe files that works according to windows edition for ex. there are different files for windows 10 pro , windows 10 home , windows 7 professional ,windows 7 enterprises and so on .
here I want to create a batch file which will detect the windows edition and according to that windows edition my batch file will install the exe file.
i can get the windows edition details using
wmic os get caption
and
FOR /F "usebackq tokens=3,4,5" %%i IN (REG query "hklm\software\microsoft\windows NT\CurrentVersion" /v ProductName) DO echo %%i %%j %%k
But I do not know how to put if condition on these commands so that I could run exe file according to windows edition