Skip to content

Commit b921c74

Browse files
authored
Merge pull request #81 from mre31/main
Fixed Windows Check Issue
2 parents 1460a82 + f9a4293 commit b921c74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

windows_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def is_windows_11():
2020
""" Utility function to check installation date """
2121
def get_installation_date():
2222
try:
23-
windows_path = "C:\\Windows"
24-
creation_time = os.path.getctime(windows_path)
23+
user_folder = os.path.expanduser("~")
24+
creation_time = os.path.getctime(user_folder)
2525
return datetime.fromtimestamp(creation_time)
2626
except Exception as e:
2727
return None

0 commit comments

Comments
 (0)