Moved setup settings to separate file
This commit is contained in:
parent
8add6f634c
commit
af5281626b
2 changed files with 143 additions and 127 deletions
|
|
@ -1,133 +1,7 @@
|
|||
# Wizard Kit: Functions - Setup
|
||||
|
||||
from functions.update import *
|
||||
|
||||
|
||||
# STATIC VARIABLES
|
||||
HKU = winreg.HKEY_USERS
|
||||
HKCR = winreg.HKEY_CLASSES_ROOT
|
||||
HKCU = winreg.HKEY_CURRENT_USER
|
||||
HKLM = winreg.HKEY_LOCAL_MACHINE
|
||||
MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format(
|
||||
os.environ.get('PROGRAMFILES'),
|
||||
r'Mozilla Firefox\distribution\extensions')
|
||||
OTHER_RESULTS = {
|
||||
'Error': {
|
||||
'CalledProcessError': 'Unknown Error',
|
||||
'FileNotFoundError': 'File not found',
|
||||
},
|
||||
'Warning': {}}
|
||||
SETTINGS_CLASSIC_START = {
|
||||
r'Software\IvoSoft\ClassicShell\Settings': {},
|
||||
r'Software\IvoSoft\ClassicStartMenu': {
|
||||
'DWORD Items': {'ShowedStyle2': 1},
|
||||
},
|
||||
r'Software\IvoSoft\ClassicStartMenu\MRU': {},
|
||||
r'Software\IvoSoft\ClassicStartMenu\Settings': {
|
||||
'DWORD Items': {'SkipMetro': 1},
|
||||
'SZ Items': {
|
||||
'MenuStyle': 'Win7',
|
||||
'RecentPrograms': 'Recent',
|
||||
},
|
||||
},
|
||||
}
|
||||
SETTINGS_EXPLORER_SYSTEM = {
|
||||
# Disable Location Tracking
|
||||
r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': {
|
||||
'DWORD Items': {'SensorPermissionState': 0},
|
||||
},
|
||||
r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': {
|
||||
'Status': {'Value': 0},
|
||||
},
|
||||
# Disable Telemetry
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
},
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
r'Software\Policies\Microsoft\Windows\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
},
|
||||
# Disable Wi-Fi Sense
|
||||
r'Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting': {
|
||||
'DWORD Items': {'Value': 0},
|
||||
},
|
||||
r'Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots': {
|
||||
'DWORD Items': {'Value': 0},
|
||||
},
|
||||
}
|
||||
SETTINGS_EXPLORER_USER = {
|
||||
r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': {
|
||||
'DWORD Items': {
|
||||
# Disable silently installed apps
|
||||
'SilentInstalledAppsEnabled': 0,
|
||||
# Disable Tips and Tricks
|
||||
'SoftLandingEnabled ': 0,
|
||||
'SubscribedContent-338389Enabled': 0,
|
||||
},
|
||||
},
|
||||
# Hide People bar
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': {
|
||||
'DWORD Items': {'PeopleBand': 0},
|
||||
},
|
||||
# Hide Search button / box
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Search': {
|
||||
'DWORD Items': {'SearchboxTaskbarMode': 0},
|
||||
},
|
||||
# Change default Explorer view to "Computer"
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced': {
|
||||
'DWORD Items': {'LaunchTo': 1},
|
||||
},
|
||||
}
|
||||
SETTINGS_GOOGLE_CHROME = {
|
||||
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': {
|
||||
'SZ Items': {
|
||||
'update_url': 'https://clients2.google.com/service/update2/crx'},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
r'Software\Google\Chrome\Extensions\pgdnlhfefecpicbbihgmbmffkjpaplco': {
|
||||
'SZ Items': {
|
||||
'update_url': 'https://clients2.google.com/service/update2/crx'},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
}
|
||||
SETTINGS_MOZILLA_FIREFOX_32 = {
|
||||
r'Software\Mozilla\Firefox\Extensions': {
|
||||
'SZ Items': {
|
||||
'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
}
|
||||
SETTINGS_MOZILLA_FIREFOX_64 = {
|
||||
r'Software\Mozilla\Firefox\Extensions': {
|
||||
'SZ Items': {
|
||||
'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH},
|
||||
},
|
||||
}
|
||||
VCR_REDISTS = [
|
||||
{'Name': 'Visual C++ 2010 x32...',
|
||||
'Cmd': [r'2010sp1\x32\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2010 x64...',
|
||||
'Cmd': [r'2010sp1\x64\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2012 Update 4 x32...',
|
||||
'Cmd': [r'2012u4\x32\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2012 Update 4 x64...',
|
||||
'Cmd': [r'2012u4\x64\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2013 x32...',
|
||||
'Cmd': [r'2013\x32\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2013 x64...',
|
||||
'Cmd': [r'2013\x64\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2017 x32...',
|
||||
'Cmd': [r'2017\x32\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2017 x64...',
|
||||
'Cmd': [r'2017\x64\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
]
|
||||
from settings.setup import *
|
||||
|
||||
|
||||
def config_classicstart():
|
||||
|
|
|
|||
142
.bin/Scripts/settings/setup.py
Normal file
142
.bin/Scripts/settings/setup.py
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
# Wizard Kit: Settings - Setup
|
||||
|
||||
# General
|
||||
HKU = winreg.HKEY_USERS
|
||||
HKCR = winreg.HKEY_CLASSES_ROOT
|
||||
HKCU = winreg.HKEY_CURRENT_USER
|
||||
HKLM = winreg.HKEY_LOCAL_MACHINE
|
||||
OTHER_RESULTS = {
|
||||
'Error': {
|
||||
'CalledProcessError': 'Unknown Error',
|
||||
'FileNotFoundError': 'File not found',
|
||||
},
|
||||
'Warning': {},
|
||||
}
|
||||
|
||||
# Browsers
|
||||
MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format(
|
||||
os.environ.get('PROGRAMFILES'),
|
||||
r'Mozilla Firefox\distribution\extensions')
|
||||
SETTINGS_GOOGLE_CHROME = {
|
||||
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': {
|
||||
'SZ Items': {
|
||||
'update_url': 'https://clients2.google.com/service/update2/crx'},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
r'Software\Google\Chrome\Extensions\pgdnlhfefecpicbbihgmbmffkjpaplco': {
|
||||
'SZ Items': {
|
||||
'update_url': 'https://clients2.google.com/service/update2/crx'},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
}
|
||||
SETTINGS_MOZILLA_FIREFOX_32 = {
|
||||
r'Software\Mozilla\Firefox\Extensions': {
|
||||
'SZ Items': {
|
||||
'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
}
|
||||
SETTINGS_MOZILLA_FIREFOX_64 = {
|
||||
r'Software\Mozilla\Firefox\Extensions': {
|
||||
'SZ Items': {
|
||||
'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH},
|
||||
},
|
||||
}
|
||||
|
||||
# Classic Start
|
||||
SETTINGS_CLASSIC_START = {
|
||||
r'Software\IvoSoft\ClassicShell\Settings': {},
|
||||
r'Software\IvoSoft\ClassicStartMenu': {
|
||||
'DWORD Items': {'ShowedStyle2': 1},
|
||||
},
|
||||
r'Software\IvoSoft\ClassicStartMenu\MRU': {},
|
||||
r'Software\IvoSoft\ClassicStartMenu\Settings': {
|
||||
'DWORD Items': {'SkipMetro': 1},
|
||||
'SZ Items': {
|
||||
'MenuStyle': 'Win7',
|
||||
'RecentPrograms': 'Recent',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# Explorer
|
||||
SETTINGS_EXPLORER_SYSTEM = {
|
||||
# Disable Location Tracking
|
||||
r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': {
|
||||
'DWORD Items': {'SensorPermissionState': 0},
|
||||
},
|
||||
r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': {
|
||||
'Status': {'Value': 0},
|
||||
},
|
||||
# Disable Telemetry
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
},
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
'WOW64_32': True,
|
||||
},
|
||||
r'Software\Policies\Microsoft\Windows\DataCollection': {
|
||||
'DWORD Items': {'AllowTelemetry': 0},
|
||||
},
|
||||
# Disable Wi-Fi Sense
|
||||
r'Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting': {
|
||||
'DWORD Items': {'Value': 0},
|
||||
},
|
||||
r'Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots': {
|
||||
'DWORD Items': {'Value': 0},
|
||||
},
|
||||
}
|
||||
SETTINGS_EXPLORER_USER = {
|
||||
r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': {
|
||||
'DWORD Items': {
|
||||
# Disable silently installed apps
|
||||
'SilentInstalledAppsEnabled': 0,
|
||||
# Disable Tips and Tricks
|
||||
'SoftLandingEnabled ': 0,
|
||||
'SubscribedContent-338389Enabled': 0,
|
||||
},
|
||||
},
|
||||
# Hide People bar
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': {
|
||||
'DWORD Items': {'PeopleBand': 0},
|
||||
},
|
||||
# Hide Search button / box
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Search': {
|
||||
'DWORD Items': {'SearchboxTaskbarMode': 0},
|
||||
},
|
||||
# Change default Explorer view to "Computer"
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced': {
|
||||
'DWORD Items': {'LaunchTo': 1},
|
||||
},
|
||||
}
|
||||
|
||||
# Visual C++ Runtimes
|
||||
VCR_REDISTS = [
|
||||
{'Name': 'Visual C++ 2010 x32...',
|
||||
'Cmd': [r'2010sp1\x32\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2010 x64...',
|
||||
'Cmd': [r'2010sp1\x64\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2012 Update 4 x32...',
|
||||
'Cmd': [r'2012u4\x32\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2012 Update 4 x64...',
|
||||
'Cmd': [r'2012u4\x64\vcredist.exe', '/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2013 x32...',
|
||||
'Cmd': [r'2013\x32\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2013 x64...',
|
||||
'Cmd': [r'2013\x64\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2017 x32...',
|
||||
'Cmd': [r'2017\x32\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
{'Name': 'Visual C++ 2017 x64...',
|
||||
'Cmd': [r'2017\x64\vcredist.exe', '/install',
|
||||
'/passive', '/norestart']},
|
||||
]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
Loading…
Reference in a new issue