Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2024-06-12 19:30:17 -07:00
commit ae8d59f7e1
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 17 additions and 0 deletions

View file

@ -10,6 +10,15 @@ if __name__ == '__main__':
f'{wk.cfg.main.KIT_NAME_FULL}: Snappy Driver Installer Origin Launcher',
)
log_dir = wk.log.format_log_path(tool=True).parent
# Windows 11 workaround
if wk.os.win.OS_VERSION == 11:
appid_services = ['appid', 'appidsvc', 'applockerfltr']
for svc in appid_services:
wk.os.win.stop_service(svc)
if any([wk.os.win.get_service_status(s) != 'stopped' for s in appid_services]):
raise wk.std.GenericWarning('Failed to stop AppID services')
sdio_path = wk.kit.tools.get_sdio_path(interactive=True)
cmd = [sdio_path, '-log_dir', log_dir]
wk.exe.run_program(cmd, check=False, cwd=sdio_path.parent)

View file

@ -46,12 +46,14 @@ from wk.os.win import (
get_os_activation,
get_os_name,
get_raw_disks,
get_service_status,
get_volume_usage,
is_activated,
is_secure_boot_enabled,
reg_read_value,
reg_set_value,
reg_write_settings,
stop_service,
winget_check,
winget_import,
winget_upgrade,
@ -1083,6 +1085,12 @@ def open_microsoft_store_updates() -> None:
def open_snappy_driver_installer_origin() -> None:
"""Open Snappy Driver Installer Origin."""
if OS_VERSION == 11:
appid_services = ['appid', 'appidsvc', 'applockerfltr']
for svc in appid_services:
stop_service(svc)
if any([get_service_status(s) != 'stopped' for s in appid_services]):
raise GenericWarning('Failed to stop AppID services')
sdio_path = get_sdio_path(interactive=False)
log_dir = format_log_path(tool=True).parent
cmd = [sdio_path, '-log_dir', log_dir]