@@ -62,7 +62,7 @@ private static string CreateExceptionReport(System.Exception ex)
62
62
sb . AppendLine ( $ "* Command Line: { Environment . CommandLine } ") ;
63
63
sb . AppendLine ( $ "* Timestamp: { DateTime . Now . ToString ( CultureInfo . InvariantCulture ) } ") ;
64
64
sb . AppendLine ( $ "* Flow Launcher version: { Constant . Version } ") ;
65
- sb . AppendLine ( $ "* OS Version: { GetWindowsBuildVersionFromRegistry ( ) } ") ;
65
+ sb . AppendLine ( $ "* OS Version: { GetWindowsFullVersionFromRegistry ( ) } ") ;
66
66
sb . AppendLine ( $ "* IntPtr Length: { IntPtr . Size } ") ;
67
67
sb . AppendLine ( $ "* x64: { Environment . Is64BitOperatingSystem } ") ;
68
68
sb . AppendLine ( $ "* Python Path: { Constant . PythonPath } ") ;
@@ -172,13 +172,14 @@ private static List<string> GetFrameworkVersionFromRegistry()
172
172
}
173
173
174
174
}
175
- public static string GetWindowsBuildVersionFromRegistry ( )
175
+
176
+ public static string GetWindowsFullVersionFromRegistry ( )
176
177
{
177
178
try
178
179
{
179
180
using ( RegistryKey registryKey = Registry . LocalMachine . OpenSubKey ( @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\" ) )
180
181
{
181
- var buildRevision = registryKey . GetValue ( "UBR" ) . ToString ( ) ;
182
+ var buildRevision = GetWindowsRevisionFromRegistry ( ) ;
182
183
var currentBuild = registryKey . GetValue ( "CurrentBuild" ) . ToString ( ) ;
183
184
return currentBuild + "." + buildRevision ;
184
185
}
@@ -188,5 +189,21 @@ public static string GetWindowsBuildVersionFromRegistry()
188
189
return Environment . OSVersion . VersionString ;
189
190
}
190
191
}
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
+ }
191
208
}
192
209
}
0 commit comments