Move repair and setup settings to wk/cfg

This commit is contained in:
2Shirt 2021-10-02 19:19:24 -06:00
parent ba4edcf6f3
commit 659d71c0eb
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
6 changed files with 240 additions and 202 deletions

View file

@ -5,6 +5,8 @@ from . import hw
from . import log
from . import main
from . import net
from . import repairs
from . import setup
from . import sources
from . import ufd
from . import windows_builds

64
scripts/wk/cfg/repairs.py Normal file
View file

@ -0,0 +1,64 @@
"""WizardKit: Config - Repairs"""
# vim: sts=2 sw=2 ts=2
from wk.cfg.main import KIT_NAME_FULL
AUTO_REPAIR_DELAY_IN_SECONDS = 30
AUTO_REPAIR_KEY = fr'Software\{KIT_NAME_FULL}\Auto Repairs'
BLEACH_BIT_CLEANERS = (
# Applications
'adobe_reader.cache',
'adobe_reader.tmp',
'flash.cache',
'gimp.tmp',
'hippo_opensim_viewer.cache',
'java.cache',
'miro.cache',
'openofficeorg.cache',
'pidgin.cache',
'secondlife_viewer.Cache',
'thunderbird.cache',
'vuze.cache',
'yahoo_messenger.cache',
# Browsers
'chromium.cache',
'chromium.session',
'firefox.cache',
'firefox.session_restore',
'google_chrome.cache',
'google_chrome.session',
'google_earth.temporary_files',
'opera.cache',
'opera.session',
'safari.cache',
'seamonkey.cache',
# System
'system.clipboard',
'system.tmp',
'winapp2_windows.jump_lists',
'winapp2_windows.ms_search',
'windows_explorer.run',
'windows_explorer.search_history',
'windows_explorer.thumbnails',
)
POWER_PLANS = {
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
'Custom': '01189998-8199-9119-725c-ccccccccccc3',
'High Performance': '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c',
}
REG_UAC_DEFAULT_SETTINGS = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('ConsentPromptBehaviorUser', 3, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
WIDTH = 50
if __name__ == '__main__':
print("This file is not meant to be called directly.")

154
scripts/wk/cfg/setup.py Normal file
View file

@ -0,0 +1,154 @@
"""WizardKit: Config - Setup"""
# pylint: disable=line-too-long
# vim: sts=2 sw=2 ts=2
BROWSER_PATHS = {
# Relative to PROGRAMFILES_64, PROGRAMFILES_32, LOCALAPPDATA (in that order)
'Google Chrome': 'Google/Chrome/Application/chrome.exe',
'Mozilla Firefox': 'Mozilla Firefox/firefox.exe',
'Microsoft Edge': 'Microsoft/Edge/Application/msedge.exe',
'Opera': 'Opera/launcher.exe',
}
LIBREOFFICE_XCU_DATA = '''<?xml version="1.0" encoding="UTF-8"?>
<oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.presentation.Present
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDoc
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"
<item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="WarnAlienFormat" oor:op="fuse"><value>fal
</oor:items>
'''
REG_CHROME_UBLOCK_ORIGIN = {
'HKLM': {
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': (
('update_url', 'https://clients2.google.com/service/update2/crx', 'SZ', '32'),
)
},
}
REG_WINDOWS_EXPLORER = {
# pylint: disable=line-too-long
'HKLM': {
# Disable Location Tracking
r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': (
('SensorPermissionState', 0, 'DWORD'),
),
r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': (
('Status', 0, 'DWORD'),
),
# Disable Telemetry
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': (
('AllowTelemetry', 0, 'DWORD'),
('AllowTelemetry', 0, 'DWORD', '32'),
),
r'Software\Policies\Microsoft\Windows\DataCollection': (
('AllowTelemetry', 0, 'DWORD'),
),
# Disable Wi-Fi Sense
r'Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting': (
('Value', 0, 'DWORD'),
),
r'Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots': (
('Value', 0, 'DWORD'),
),
},
'HKCU': {
# Desktop theme (<= v1809 default)
r'Software\Microsoft\Windows\CurrentVersion\Themes\Personalize': (
('AppsUseLightTheme', 1, 'DWORD'),
('SystemUsesLightTheme', 0, 'DWORD'),
),
# Disable features
r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': (
('SilentInstalledAppsEnabled', 0, 'DWORD'),
# Tips and Tricks
('SoftLandingEnabled ', 0, 'DWORD'),
('SubscribedContent-338389Enabled', 0, 'DWORD'),
),
# Disable news and interests from opening on hover
r'Software\Microsoft\Windows\CurrentVersion\Feeds': (
('ShellFeedsTaskbarOpenOnHover', 0, 'DWORD'),
),
# File Explorer
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced': (
# Change default Explorer view to "Computer"
('LaunchTo', 1, 'DWORD'),
('SeparateProcess', 1, 'DWORD'),
),
# Hide People bar
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': (
('PeopleBand', 0, 'DWORD'),
),
# Hide Search button / box
r'Software\Microsoft\Windows\CurrentVersion\Search': (
('SearchboxTaskbarMode', 1, 'DWORD'),
),
},
}
REG_OPEN_SHELL_SETTINGS = {
'HKCU': {
r'Software\OpenShell\StartMenu': (
('ShowedStyle2', 1, 'DWORD'),
),
r'Software\OpenShell\StartMenu\Settings': (
('MenuStyle', 'Win7', 'SZ'),
('RecentPrograms', 'Recent', 'SZ'),
('SkinW7', 'Fluent-Metro', 'SZ'),
('SkinVariationW7', '', 'SZ'),
('SkipMetro', 1, 'DWORD'),
(
'SkinOptionsW7',
[
# NOTE: Seems to need all options specified to work?
'DARK_MAIN=1', 'METRO_MAIN=0', 'LIGHT_MAIN=0', 'AUTOMODE_MAIN=0',
'DARK_SUBMENU=0', 'METRO_SUBMENU=0', 'LIGHT_SUBMENU=0', 'AUTOMODE_SUBMENU=1',
'SUBMENU_SEPARATORS=1', 'DARK_SEARCH=0', 'METRO_SEARCH=0', 'LIGHT_SEARCH=1',
'AUTOMODE_SEARCH=0', 'SEARCH_FRAME=1', 'SEARCH_COLOR=0', 'SMALL_SEARCH=0',
'MODERN_SEARCH=1', 'SEARCH_ITALICS=0', 'NONE=0', 'SEPARATOR=0',
'TWO_TONE=1', 'CLASSIC_SELECTOR=1', 'HALF_SELECTOR=0', 'CURVED_MENUSEL=1',
'CURVED_SUBMENU=0', 'SELECTOR_REVEAL=0', 'TRANSPARENT=0', 'OPAQUE_SUBMENU=1',
'OPAQUE_MENU=0', 'OPAQUE=0', 'STANDARD=1', 'SMALL_MAIN2=0',
'SMALL_ICONS=0', 'COMPACT_SUBMENU=0', 'PRESERVE_MAIN2=0', 'LESS_PADDING=0',
'EXTRA_PADDING=1', '24_PADDING=0', 'LARGE_PROGRAMS=0', 'TRANSPARENT_SHUTDOWN=0',
'OUTLINE_SHUTDOWN=0', 'BUTTON_SHUTDOWN=1', 'EXPERIMENTAL_SHUTDOWN=0', 'LARGE_FONT=0',
'CONNECTED_BORDER=1', 'FLOATING_BORDER=0', 'LARGE_SUBMENU=0', 'LARGE_LISTS=0',
'THIN_MAIN2=0', 'EXPERIMENTAL_MAIN2=1', 'USER_IMAGE=1', 'USER_OUTSIDE=0',
'SCALING_USER=1', '56=0', '64=0', 'TRANSPARENT_USER=0',
'UWP_SCROLLBAR=1', 'MODERN_SCROLLBAR=0', 'OLD_ICONS=0', 'NEW_ICONS=1',
'SMALL_ARROWS=0', 'ICON_FRAME=0', 'SEARCH_SEPARATOR=0', 'NO_PROGRAMS_BUTTON=0',
],
'MULTI_SZ',
),
),
},
}
REG_UAC_DEFAULTS_WIN7 = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
REG_UAC_DEFAULTS_WIN10 = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('ConsentPromptBehaviorUser', 3, 'DWORD'),
('EnableInstallerDetection', 1, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('EnableVirtualization', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
UBLOCK_ORIGIN_URLS = {
'Google Chrome': 'https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm',
'Microsoft Edge': 'https://microsoftedge.microsoft.com/addons/detail/ublock-origin/odfafepnkmbhccpbejgmiehpchacaeak',
'Mozilla Firefox': 'https://addons.mozilla.org/addon/ublock-origin/',
'Opera': 'https://addons.opera.com/extensions/details/ublock/',
}
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -1,4 +1,4 @@
"""WizardKit: Config - Tools"""
"""WizardKit: Config - Sources"""
# pylint: disable=line-too-long
# vim: sts=2 sw=2 ts=2

View file

@ -13,6 +13,14 @@ import time
from subprocess import CalledProcessError, DEVNULL
from wk.cfg.main import KIT_NAME_FULL, KIT_NAME_SHORT, WINDOWS_TIME_ZONE
from wk.cfg.repairs import (
AUTO_REPAIR_DELAY_IN_SECONDS,
AUTO_REPAIR_KEY,
BLEACH_BIT_CLEANERS,
POWER_PLANS,
REG_UAC_DEFAULT_SETTINGS,
WIDTH,
)
from wk.exe import (
get_procs,
run_program,
@ -82,48 +90,10 @@ else:
# STATIC VARIABLES
LOG = logging.getLogger(__name__)
AUTO_REPAIR_DELAY_IN_SECONDS = 30
AUTO_REPAIR_KEY = fr'Software\{KIT_NAME_FULL}\Auto Repairs'
BACKUP_BROWSER_BASE_CMD = (
get_tool_path('7-Zip', '7za'),
'a', '-t7z', '-mx=1', '-bso0', '-bse0', '-bsp0',
)
BLEACH_BIT_CLEANERS = (
# Applications
'adobe_reader.cache',
'adobe_reader.tmp',
'flash.cache',
'gimp.tmp',
'hippo_opensim_viewer.cache',
'java.cache',
'miro.cache',
'openofficeorg.cache',
'pidgin.cache',
'secondlife_viewer.Cache',
'thunderbird.cache',
'vuze.cache',
'yahoo_messenger.cache',
# Browsers
'chromium.cache',
'chromium.session',
'firefox.cache',
'firefox.session_restore',
'google_chrome.cache',
'google_chrome.session',
'google_earth.temporary_files',
'opera.cache',
'opera.session',
'safari.cache',
'seamonkey.cache',
# System
'system.clipboard',
'system.tmp',
'winapp2_windows.jump_lists',
'winapp2_windows.ms_search',
'windows_explorer.run',
'windows_explorer.search_history',
'windows_explorer.thumbnails',
)
CONEMU_EXE = get_tool_path('ConEmu', 'ConEmu', check=False)
GPUPDATE_SUCCESS_STRINGS = (
'Computer Policy update has completed successfully.',
@ -135,21 +105,6 @@ PROGRAMFILES_32 = os.environ.get(
'PROGRAMFILES', r'C:\Program Files (x86)',
),
)
POWER_PLANS = {
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
'Custom': '01189998-8199-9119-725c-ccccccccccc3',
'High Performance': '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c',
}
REG_UAC_DEFAULT_SETTINGS = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('ConsentPromptBehaviorUser', 3, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:')
WHITELIST = '\n'.join((
str(CONEMU_EXE),
@ -161,7 +116,6 @@ WHITELIST = '\n'.join((
fr'{PROGRAMFILES_32}\TeamViewer\tv_x64.exe',
sys.executable,
))
WIDTH = 50
TRY_PRINT = TryAndPrint()
TRY_PRINT.width = WIDTH
TRY_PRINT.verbose = True

View file

@ -11,6 +11,16 @@ import re
import sys
from wk.cfg.main import KIT_NAME_FULL
from wk.cfg.setup import (
BROWSER_PATHS,
LIBREOFFICE_XCU_DATA,
REG_CHROME_UBLOCK_ORIGIN,
REG_WINDOWS_EXPLORER,
REG_OPEN_SHELL_SETTINGS,
REG_UAC_DEFAULTS_WIN7,
REG_UAC_DEFAULTS_WIN10,
UBLOCK_ORIGIN_URLS,
)
from wk.exe import kill_procs, run_program, popen_program
from wk.io import case_insensitive_path, get_path_obj
from wk.kit.tools import (
@ -59,6 +69,7 @@ if platform.system() == 'Windows':
reg_write_settings,
)
from wk.repairs.win import (
WIDTH,
backup_all_browser_profiles,
backup_registry,
create_custom_power_plan,
@ -100,23 +111,8 @@ else:
# STATIC VARIABLES
LOG = logging.getLogger(__name__)
BROWSER_PATHS = {
# Relative to PROGRAMFILES_64, PROGRAMFILES_32, LOCALAPPDATA (in that order)
'Google Chrome': 'Google/Chrome/Application/chrome.exe',
'Mozilla Firefox': 'Mozilla Firefox/firefox.exe',
'Microsoft Edge': 'Microsoft/Edge/Application/msedge.exe',
'Opera': 'Opera/launcher.exe',
}
CONEMU_EXE = get_tool_path('ConEmu', 'ConEmu', check=False)
IN_CONEMU = 'ConEmuPID' in os.environ
LIBREOFFICE_XCU_DATA = '''<?xml version="1.0" encoding="UTF-8"?>
<oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.presentation.PresentationDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Impress MS PowerPoint 2007 XML</value></prop></item>
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Calc MS Excel 2007 XML</value></prop></item>
<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS Word 2007 XML</value></prop></item>
<item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="WarnAlienFormat" oor:op="fuse"><value>false</value></prop></item>
</oor:items>
'''
MENU_PRESETS = Menu()
PROGRAMFILES_32 = os.environ.get(
'PROGRAMFILES(X86)', os.environ.get(
@ -128,144 +124,12 @@ PROGRAMFILES_64 = os.environ.get(
'PROGRAMFILES', r'C:\Program Files',
),
)
REG_CHROME_UBLOCK_ORIGIN = {
'HKLM': {
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': (
('update_url', 'https://clients2.google.com/service/update2/crx', 'SZ', '32'),
)
},
}
REG_WINDOWS_EXPLORER = {
# pylint: disable=line-too-long
'HKLM': {
# Disable Location Tracking
r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': (
('SensorPermissionState', 0, 'DWORD'),
),
r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': (
('Status', 0, 'DWORD'),
),
# Disable Telemetry
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': (
('AllowTelemetry', 0, 'DWORD'),
('AllowTelemetry', 0, 'DWORD', '32'),
),
r'Software\Policies\Microsoft\Windows\DataCollection': (
('AllowTelemetry', 0, 'DWORD'),
),
# Disable Wi-Fi Sense
r'Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting': (
('Value', 0, 'DWORD'),
),
r'Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots': (
('Value', 0, 'DWORD'),
),
},
'HKCU': {
# Desktop theme (<= v1809 default)
r'Software\Microsoft\Windows\CurrentVersion\Themes\Personalize': (
('AppsUseLightTheme', 1, 'DWORD'),
('SystemUsesLightTheme', 0, 'DWORD'),
),
# Disable features
r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': (
('SilentInstalledAppsEnabled', 0, 'DWORD'),
# Tips and Tricks
('SoftLandingEnabled ', 0, 'DWORD'),
('SubscribedContent-338389Enabled', 0, 'DWORD'),
),
# Disable news and interests from opening on hover
r'Software\Microsoft\Windows\CurrentVersion\Feeds': (
('ShellFeedsTaskbarOpenOnHover', 0, 'DWORD'),
),
# File Explorer
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced': (
# Change default Explorer view to "Computer"
('LaunchTo', 1, 'DWORD'),
('SeparateProcess', 1, 'DWORD'),
),
# Hide People bar
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': (
('PeopleBand', 0, 'DWORD'),
),
# Hide Search button / box
r'Software\Microsoft\Windows\CurrentVersion\Search': (
('SearchboxTaskbarMode', 1, 'DWORD'),
),
},
}
REG_OPEN_SHELL_SETTINGS = {
'HKCU': {
r'Software\OpenShell\StartMenu': (
('ShowedStyle2', 1, 'DWORD'),
),
r'Software\OpenShell\StartMenu\Settings': (
('MenuStyle', 'Win7', 'SZ'),
('RecentPrograms', 'Recent', 'SZ'),
('SkinW7', 'Fluent-Metro', 'SZ'),
('SkinVariationW7', '', 'SZ'),
('SkipMetro', 1, 'DWORD'),
(
'SkinOptionsW7',
[
# NOTE: Seems to need all options specified to work?
'DARK_MAIN=1', 'METRO_MAIN=0', 'LIGHT_MAIN=0', 'AUTOMODE_MAIN=0',
'DARK_SUBMENU=0', 'METRO_SUBMENU=0', 'LIGHT_SUBMENU=0', 'AUTOMODE_SUBMENU=1',
'SUBMENU_SEPARATORS=1', 'DARK_SEARCH=0', 'METRO_SEARCH=0', 'LIGHT_SEARCH=1',
'AUTOMODE_SEARCH=0', 'SEARCH_FRAME=1', 'SEARCH_COLOR=0', 'SMALL_SEARCH=0',
'MODERN_SEARCH=1', 'SEARCH_ITALICS=0', 'NONE=0', 'SEPARATOR=0',
'TWO_TONE=1', 'CLASSIC_SELECTOR=1', 'HALF_SELECTOR=0', 'CURVED_MENUSEL=1',
'CURVED_SUBMENU=0', 'SELECTOR_REVEAL=0', 'TRANSPARENT=0', 'OPAQUE_SUBMENU=1',
'OPAQUE_MENU=0', 'OPAQUE=0', 'STANDARD=1', 'SMALL_MAIN2=0',
'SMALL_ICONS=0', 'COMPACT_SUBMENU=0', 'PRESERVE_MAIN2=0', 'LESS_PADDING=0',
'EXTRA_PADDING=1', '24_PADDING=0', 'LARGE_PROGRAMS=0', 'TRANSPARENT_SHUTDOWN=0',
'OUTLINE_SHUTDOWN=0', 'BUTTON_SHUTDOWN=1', 'EXPERIMENTAL_SHUTDOWN=0', 'LARGE_FONT=0',
'CONNECTED_BORDER=1', 'FLOATING_BORDER=0', 'LARGE_SUBMENU=0', 'LARGE_LISTS=0',
'THIN_MAIN2=0', 'EXPERIMENTAL_MAIN2=1', 'USER_IMAGE=1', 'USER_OUTSIDE=0',
'SCALING_USER=1', '56=0', '64=0', 'TRANSPARENT_USER=0',
'UWP_SCROLLBAR=1', 'MODERN_SCROLLBAR=0', 'OLD_ICONS=0', 'NEW_ICONS=1',
'SMALL_ARROWS=0', 'ICON_FRAME=0', 'SEARCH_SEPARATOR=0', 'NO_PROGRAMS_BUTTON=0',
],
'MULTI_SZ',
),
),
},
}
REG_UAC_DEFAULTS_WIN7 = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
REG_UAC_DEFAULTS_WIN10 = {
'HKLM': {
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': (
('ConsentPromptBehaviorAdmin', 5, 'DWORD'),
('ConsentPromptBehaviorUser', 3, 'DWORD'),
('EnableInstallerDetection', 1, 'DWORD'),
('EnableLUA', 1, 'DWORD'),
('EnableVirtualization', 1, 'DWORD'),
('PromptOnSecureDesktop', 1, 'DWORD'),
),
},
}
SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:')
WIDTH = 50
TRY_PRINT = TryAndPrint()
TRY_PRINT.width = WIDTH
TRY_PRINT.verbose = True
for error in ('CalledProcessError', 'FileNotFoundError'):
TRY_PRINT.add_error(error)
UBLOCK_ORIGIN_URLS = {
# pylint: disable=line-too-long
'Google Chrome': 'https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm',
'Microsoft Edge': 'https://microsoftedge.microsoft.com/addons/detail/ublock-origin/odfafepnkmbhccpbejgmiehpchacaeak',
'Mozilla Firefox': 'https://addons.mozilla.org/addon/ublock-origin/',
'Opera': 'https://addons.opera.com/extensions/details/ublock/',
}
# Auto Setup