FILE: C:\Users\All Users\PuppetLabs\puppet\var\facts.d\mariadb_version_major.ps1

--
$MariaDBVersionMajor = if($(Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" | Where-Object {$_.Name -match "^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MariaDB.*"})){$(Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" | Where-Object {$_.Name -match "^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MariaDB.*"}).GetValue("MajorVersion")}else{"0"} $MariaDBVersionMinor = if($(Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" | Where-Object {$_.Name -match "^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MariaDB.*"})){$(Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" | Where-Object {$_.Name -match "^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MariaDB.*"}).GetValue("MinorVersion")}else{"0"} "mariadb_version_major=$($MariaDBVersionMajor)" "mariadb_version_minor=$($MariaDBVersionMinor)"
--