r/visualbasic • u/saklovesyao • Dec 21 '20
Detect Window version with VB
Hi everyone. I'm working on a project that needs to install different components on users' machines based on their Windows version. Currently, we need to adapt for a range from Windows 7 to 10, and instead of distributing different version of installer, I have to integrate them into only one MSI file only. My colleague had written VB code for the MSI file, and I think I should continue his work instead of making a new one since it's time consuming (I'll consider this later when I have more time, but it's urgent now).
I'm wondering that if there is any function that help the MSI to detect Windows version (from 7 to 10). Also, I need to identify different version of Windows 10 too (currently, there are Windows 10 version 16, 17, 18, 19). I'll be very appreciate if someone can provide some references or sample codes for this work.
Thank you very much
2
u/Chriand VB.Net Intermediate Dec 21 '20
Maybe some of these links below helps :)
https://stackoverflow.com/questions/39778525/how-to-get-windows-version-as-in-windows-10-version-1607
https://stackoverflow.com/questions/2819934/detect-windows-version-in-net