Hello.
I'm building a script to install some windows updates with a GUI. For this, the script need to know witch windows version to work: Windows 7, Windows 7 SP1, Windows 8, Windows 8.1 and so on. I read this article, but it don't list Windows 10 Anniversary Edition. So, I run into build version, because they are different between them. The first is 10586, and Anniversary is 14393.
So, somewhere on my script I have this:
If @OSVersion = 'win_10' Then
$versao_windows = 'Windows 10'
ElseIf @OSVersion = 'win_10' And @OSBuild = 14393 Then
$versao_windows = 'Windows 10 Edição De Aniversário'
$win10ae = 1
EndIf
As you see, "$versao_windows" is the "friendly" name to be showed on the GUI, and "$win10ae" will be the variable to be used to distinguish the windows version to use. But the script still showing the 'normal' Windows 10 version, even if it is running on Anniversary Edition. On the status bar, it rightly shows the 14393 build, but don't shows "Windows 10 Edição De Aniversário".
I need this to install the correct updates, because they are different from one build to another.
Where I'm wrong on my code?
Thanks in advice!