PostgreSQL Version Detection (Windows)

Summary
This script detects the installed version of PostgreSQL and saves the result in KB. The script logs in via smb, searches for PostgreSQL in the registry and gets version from registry.
Detection
registry version check