from setuphelpers import *
import platform
specific_list = [
"AnimateMinMax",
"ComboBoxAnimation",
"ControlAnimations",
"CursorShadow",
"DragFullWindows",
"DropShadow",
"DWMAeroPeekEnabled",
"DWMEnabled",
"DWMSaveThumbnailEnabled",
"FontSmoothing",
"ListBoxSmoothScrolling",
"ListviewAlphaSelect",
"ListviewShadow",
"MenuAnimation",
"SelectionFade",
"TaskbarAnimations",
"Themes",
"ThumbnailsOrIcon",
"TooltipAnimation",
"TransparentGlass",
]
def install():
# [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]
# "VisualFXSetting"=dword:00000002"
registry_setstring(
HKEY_USERS, r".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", 0x02, type=REG_DWORD
)
for entry in specific_list:
registry_setstring(
HKEY_CURRENT_USER,
r".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\%s" % entry,
"DefaultApplied",
0x00,
type=REG_DWORD,
)
if platform.win32_ver()[0].lower() in ("7", "8"):
# service does not exist on win2k12 or on xp
set_service_start_mode("uxsms", "Disabled")
set_service_start_mode("themes", "Disabled")
def session_setup():
registry_setstring(
HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", 0x02, type=REG_DWORD
)
#'"DefaultApplied"=dword:00000001'
for entry in specific_list:
registry_setstring(
HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\%s" % entry, "DefaultApplied", 0x00, type=REG_DWORD
)
def uninstall():
registry_setstring(
HKEY_USERS, r".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", 0x00, type=REG_DWORD
)
if platform.win32_ver()[0].lower() in ("7", "8"):
# service does not exist on win2k12 or on xp
set_service_start_mode("uxsms", "Auto")
set_service_start_mode("themes", "Auto")