Re: Can't Get Launch Condition Right...
For right now, I think this points to a custom action to detect the newer OS. There was some .NET method I tried to get the versioning or build number, but I found that too deprecated and not reporting the correct version.
Here's the hack I'm currently using for now...
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows NT\\CurrentVersion");
if (registryKey != null)
string pathName = (string)registryKey.GetValue("productName");
if (pathName.IndexOf("Server 2019") > 0)
session["SERVER2019"] = "1";
session.Log("Server 2019 detected.");
I cobbled this together last week and didn't notice the CurrentBuildNumber value in that that key. I'll ride with what I have for now unless/until it becomes problematic.