diff --git a/winver.py b/winver.py index e239690..47cda21 100644 --- a/winver.py +++ b/winver.py @@ -26,6 +26,7 @@ def getWindowsVersion(path): version = "" pe = pefile.PE(getWindowsDirectory(path) + "/System32/ntdll.dll") version = str(pe.FileInfo[0].StringTable[0].entries[b'ProductVersion'],'utf-8') + pe.close() if re.match("(3|4)\.",version) != None: return _WIN_NT elif re.match("5\.0", version) != None: