/// <summary>
        /// Init OSVersionInfo object by current windows environment
        /// </summary>
        /// <returns></returns>
        public static OSVersionInfo GetOSVersionInfo()
        {
            OperatingSystem osVersionObj  = Environment.OSVersion;
            OSVersionInfo   osVersionInfo = new OSVersionInfo()
            {
                Name  = GetOSName(osVersionObj),
                Major = osVersionObj.Version.Major,
                Minor = osVersionObj.Version.Minor,
                Build = osVersionObj.Version.Build
            };

            return(osVersionInfo);
        }