scripts/create_windows_links.py

branch
eric7-maintenance
changeset 10460
3b34efa2857c
parent 10439
21c28b0f9e41
child 10518
1682f3203ae5
equal deleted inserted replaced
10366:411df92e881f 10460:3b34efa2857c
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # Copyright (c) 2018 - 2023 Detlev Offenbach <detlev@die-offenbachs.de> 4 # Copyright (c) 2018 - 2024 Detlev Offenbach <detlev@die-offenbachs.de>
5 # 5 #
6 # This is the install script for eric. 6 # This is the install script for eric.
7 7
8 """ 8 """
9 Installation script for the eric IDE and all eric related tools. 9 Installation script for the eric IDE and all eric related tools.
26 """ 26 """
27 Create Desktop and Start Menu links. 27 Create Desktop and Start Menu links.
28 """ 28 """
29 if sys.platform.startswith(("win", "cygwin")): 29 if sys.platform.startswith(("win", "cygwin")):
30 regPath = ( 30 regPath = (
31 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" 31 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
32 + "\\User Shell Folders"
33 ) 32 )
34 33
35 # 1. create desktop shortcuts 34 # 1. create desktop shortcuts
36 regName = "Desktop" 35 regName = "Desktop"
37 desktopFolder = os.path.normpath( 36 desktopFolder = os.path.normpath(
68 @param name variable name 67 @param name variable name
69 @type str 68 @type str
70 @param path registry path of the variable 69 @param path registry path of the variable
71 @type str 70 @type str
72 @return value of requested registry variable 71 @return value of requested registry variable
73 @rtype any 72 @rtype Any
74 """ 73 """
75 try: 74 try:
76 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path) 75 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path)
77 value, _ = winreg.QueryValueEx(registryKey, name) 76 value, _ = winreg.QueryValueEx(registryKey, name)
78 winreg.CloseKey(registryKey) 77 winreg.CloseKey(registryKey)

eric ide

mercurial