@@ -62,7 +62,7 @@ private static string CreateExceptionReport(System.Exception ex)
6262 sb . AppendLine ( $ "* Command Line: { Environment . CommandLine } ") ;
6363 sb . AppendLine ( $ "* Timestamp: { DateTime . Now . ToString ( CultureInfo . InvariantCulture ) } ") ;
6464 sb . AppendLine ( $ "* Flow Launcher version: { Constant . Version } ") ;
65- sb . AppendLine ( $ "* OS Version: { GetWindowsBuildVersionFromRegistry ( ) } ") ;
65+ sb . AppendLine ( $ "* OS Version: { GetWindowsFullVersionFromRegistry ( ) } ") ;
6666 sb . AppendLine ( $ "* IntPtr Length: { IntPtr . Size } ") ;
6767 sb . AppendLine ( $ "* x64: { Environment . Is64BitOperatingSystem } ") ;
6868 sb . AppendLine ( $ "* Python Path: { Constant . PythonPath } ") ;
@@ -172,13 +172,14 @@ private static List<string> GetFrameworkVersionFromRegistry()
172172 }
173173
174174 }
175- public static string GetWindowsBuildVersionFromRegistry ( )
175+
176+ public static string GetWindowsFullVersionFromRegistry ( )
176177 {
177178 try
178179 {
179180 using ( RegistryKey registryKey = Registry . LocalMachine . OpenSubKey ( @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\" ) )
180181 {
181- var buildRevision = registryKey . GetValue ( "UBR" ) . ToString ( ) ;
182+ var buildRevision = GetWindowsRevisionFromRegistry ( ) ;
182183 var currentBuild = registryKey . GetValue ( "CurrentBuild" ) . ToString ( ) ;
183184 return currentBuild + "." + buildRevision ;
184185 }
@@ -188,5 +189,21 @@ public static string GetWindowsBuildVersionFromRegistry()
188189 return Environment . OSVersion . VersionString ;
189190 }
190191 }
192+
193+ public static string GetWindowsRevisionFromRegistry ( )
194+ {
195+ try
196+ {
197+ using ( RegistryKey registryKey = Registry . LocalMachine . OpenSubKey ( @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\" ) )
198+ {
199+ var buildRevision = registryKey . GetValue ( "UBR" ) . ToString ( ) ;
200+ return buildRevision ;
201+ }
202+ }
203+ catch
204+ {
205+ return "0" ;
206+ }
207+ }
191208 }
192209}
0 commit comments