Hi all,
I have a suggestion for todo.pl / variable $os / handling of new Windows
versions.
In the moment it looks like this, last added Windows version was Windows 10:
...
if ($product_name eq 'Microsoft Windows 2000') {
$os = 'win2k';
}
elsif ($product_name eq 'Microsoft Windows XP') {
$os = 'winxp';
}
elsif ($product_name =~ m/Windows Server.*(2003)/) {
$os = 'ws2k3';
}
elsif ($product_name =~ m/Vista/) {
$os = 'vista';
}
elsif ($product_name =~ m/Windows Server.*(2008)/) {
$os = 'ws2k8';
}
elsif ($product_name =~ m/Windows Server.*(2012)/) {
$os = 'win2012';
}
elsif ($product_name =~ m/Windows 7/) {
$os = 'win7';
}
elsif ($product_name =~ m/Windows 8/) {
$os = 'win8';
}
elsif ($product_name =~ m/Windows 10/) {
$os = 'win10';
}
else {
die "Unrecognized $pn_key: $product_name";
}
...
Of course we could now add an additional elsif for Windows 2016, Windows 2019
and so on. But I wonder if the $os variable is really reused somewhere else...?
So why not use the else-part to catch all OSes >= Windows 2016 at once and
never get the "unknown product name error" again?
Maybe this way?
...
else {
$os = 'win_unspecified';
}
...
What do you think? I must mention that my sole usage for the Unatteded software
are application only installs using appsonly.bat / appsonly.pl which I
contributed years ago to the project. So it might be that $os variable is not
so important in my use case, but may be important in other use cases...
Regards
Gerhard Hofmann
_______________________________________________
unattended-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-devel